/* 00-tokens.css */
@layer reset, tokens, base, components, utilities;

/* Fonts: Mona Sans for the interface, Monaspace Neon for titles, code, shas,
   refs and keys. Both are embedded (static/fonts, SIL OFL 1.1, latin subset
   from Fontsource): Mona Sans as one variable-weight file per style, Monaspace
   Neon as one static file per weight in use (400, 600, 700). The asset loader
   turns the relative font and icon references into hashed URLs. */
@font-face {
  font-family: "Mona Sans";
  src: url(/-/static/fonts/mona-sans.a59061e38c5e.woff2) format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Mona Sans";
  src: url(/-/static/fonts/mona-sans-italic.c49879f4099c.woff2) format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Monaspace Neon";
  src: url(/-/static/fonts/monaspace-neon-400.d90b15f2bab2.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Monaspace Neon";
  src: url(/-/static/fonts/monaspace-neon-600.8331226e8f74.woff2) format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Monaspace Neon";
  src: url(/-/static/fonts/monaspace-neon-700.b36e51d63efd.woff2) format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* Palette: grays, in four surface levels, so that blocks read apart without
   hue. Dark: each level is lighter than the one below it; light: each is
   whiter. Hue is kept for code, diffs and verdicts, and one accent, a
   green, marks where you are and what is alive: the current tab, the row
   cursor, links in prose, open folders. */
@layer tokens {
  :root {
    /* the system's scheme, unless the theme switch forces one
       (html[data-theme], set by store.js) */
    color-scheme: light dark;
    &[data-theme="light"] { color-scheme: light; }
    &[data-theme="dark"] { color-scheme: dark; }

    /* surfaces, bottom to top: cool neutral grays */
    --bg-canvas: light-dark(#f6f7f9, #07090c); /* the page */
    --bg-inset:  light-dark(#f6f7f9, #050608); /* code, fields: sunk into a surface */
    --bg-surface:light-dark(#ffffff, #0b0e12); /* cards, header, rail blocks */
    --bg-raised: light-dark(#f0f2f5, #11151b); /* hover, buttons, panel rows */
    --bg-strong: light-dark(#e4e8ed, #191e25); /* selected row, pressed button */
    --bg-cursor: light-dark(#f2f4f7, #0a0d11); /* the keyboard cursor of a flat list */
    --bg-overlay:light-dark(#ffffff, #0f1318); /* dialogs */
    --backdrop:  light-dark(rgb(15 18 22 / .3), rgb(0 0 0 / .65));

    --border:        light-dark(#e1e5ea, #1b2027);
    --border-strong: light-dark(#cbd1d9, #29303a);

    --ink:      light-dark(#1d2127, #d5dae1);
    --ink-hi:   light-dark(#0b0d10, #f1f3f6);
    --ink-dim:  light-dark(#4f5762, #9aa2ad);
    --ink-mute: light-dark(#5a626d, #7d8591);
    --focus:    light-dark(#0b0d10, #f1f3f6);
    --on-ink:   light-dark(#ffffff, #0b0d10); /* text on a filled ink button */

    /* Colour, sparingly: one green accent marks where you are and what is
       alive. Light values are the same hues darkened to AA. */
    --green:   light-dark(#186d44, #5cc98a);
    --accent:  var(--green); /* the one accent of the interface */
    --green-2: light-dark(#2d6650, #4aa676);
    --red:     light-dark(#a52a35, #ef6a72);
    --blue:    light-dark(#3d5f8a, #9db8d9); /* strings: a cool blue */
    --amber:   light-dark(#7a5c10, #e0bd62); /* Markdown warnings only */

    /* the filled primary button */
    --primary:    var(--accent);
    --primary-hi: light-dark(#145c39, #74d69c);
    --on-primary: light-dark(#ffffff, #05140c);

    /* the activity curve of the repository list */
    --chart: var(--accent);

    --syn-plain:   var(--ink);
    --syn-keyword: var(--green);
    --syn-string:  var(--blue);
    --syn-comment: light-dark(#5a626d, #7a8290);
    --syn-number:  var(--green-2);
    --syn-func:    var(--ink-hi);
    --syn-type:    var(--green-2);
    --syn-punct:   var(--ink-dim);

    --add: light-dark(#e3f4ea, #0d1a14);
    --del: light-dark(#fbe6e7, #211216);
    --add-hi: light-dark(#c3e8d1, #153223); /* the gutter of an added line */
    --del-hi: light-dark(#f2c7ca, #3e1c22);

    --font: "Mona Sans", system-ui, sans-serif;
    --mono: "Monaspace Neon", ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
    --fs: 15px;
    --fs-code: 13px;
    --fs-m: 14px; /* notes and comments: content, a step under the page text */
    --fs-s: 13px;
    --fs-xs: 12px;
    --fs-2xs: 11px;
    --lh: 24px;
    --lh-code: 20px;

    /* spacing scale */
    --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
    --r: 8px;   /* cards, dialogs */
    --r-s: 6px; /* buttons, fields */

    --pad: var(--s5);
    --stick: 0px;     /* top offset of sticky headers inside the content */
    --note-w: 760px; /* shared width of notes and composers */
    --measure: 80ch;  /* reading width of prose */
    --rail: 340px;
    --page: 1320px;
    --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 32px rgb(0 0 0 / .18);

    /* names used by the code, diff and merge request sheets */
    --paper: var(--bg-canvas);
    --paper-alt: var(--bg-raised);
    --row: var(--bg-raised);
    --sel: var(--bg-strong);
    --rule: var(--border);
  }
}
/* 10-base.css */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  table { border-collapse: collapse; border-spacing: 0; }
  th, td { padding: 0; text-align: left; font-weight: inherit; }
  button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
  button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
  input { background: transparent; border: 0; }
  summary { cursor: pointer; }
  dialog { color: inherit; border: 0; padding: 0; max-width: none; max-height: none; }
  img { max-width: 100%; }
}

@layer base {
  /* a cross-document fade between pages, where the browser has it */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 120ms; }
  /* the snapshots fade over this layer: transparent, it shows a white canvas
     for a frame when the new page is a little late */
  ::view-transition { background: var(--bg-canvas); }
  @media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
  }

  html { background: var(--bg-canvas); scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
  body {
    min-height: 100dvh;
    display: flex; flex-direction: column;
    font: var(--fs) / var(--lh) var(--font);
    color: var(--ink);
    background: var(--bg-canvas);
    tab-size: 4;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
  }
  /* Monaspace is wide: titles take its semibold and a slightly tighter
     tracking, so a long title stays one calm line instead of a shout */
  h1, h2, h3, h4 { font-family: var(--mono); font-weight: 600; color: var(--ink-hi); letter-spacing: -.02em; text-wrap: balance; }
  h1 { font-size: 21px; line-height: 30px; }
  h2 { font-size: 16px; line-height: 24px; }
  p, li, dd { text-wrap: pretty; }
  h3, h4 { font-size: var(--fs); }
  b, strong { font-weight: 700; }
  small { font-size: var(--fs-s); }
  code, pre, kbd, samp { font-family: var(--mono); }
  a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
  a:hover { text-decoration-color: var(--accent); color: var(--ink-hi); }
  hr { border: 0; border-top: 1px solid var(--border); margin: var(--s5) 0; }
  ::selection { background: var(--ink-hi); color: var(--on-ink); }

  :focus { outline: none; }
  :focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

  [hidden] { display: none !important; }

  kbd {
    display: inline-block; min-width: 20px; padding: 0 5px;
    font: 600 var(--fs-xs) / 18px var(--mono); text-align: center; color: var(--ink-dim);
    background: var(--bg-canvas); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px;
  }

  .skip {
    position: absolute; left: var(--s2); top: var(--s2); z-index: 30; padding: var(--s1) var(--s3);
    background: var(--ink-hi); color: var(--on-ink); border-radius: var(--r-s);
    transform: translateY(-200%);
  }
  .skip:focus { transform: none; }

  main { min-width: 0; }
  main:focus-visible { outline: none; }

  @media (prefers-reduced-motion: no-preference) {
    a, button, tr, li, summary, .btn { transition: background-color 100ms ease, border-color 100ms ease, color 100ms ease; }
  }
}

@layer utilities {
  /* what does nothing without scripts waits for ermite.js, which sets html.js */
  html:not(.js) [data-js], html:not(.js) .filter { display: none; }
  .dim { color: var(--ink-dim); }
  .mute { color: var(--ink-mute); }
  .nowrap { white-space: nowrap; }
  .num { text-align: right; font-variant-numeric: tabular-nums; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .rule { border-top: 1px solid var(--border); }
}
/* 20-shell.css */
@layer components {
  /* buttons: one shape for links and buttons that act */
  .btn {
    display: inline-flex; align-items: center; gap: var(--s2); white-space: nowrap;
    height: 32px; padding: 0 var(--s3);
    font: 600 var(--fs-s) / 1 var(--font); color: var(--ink); text-decoration: none;
    background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: var(--r-s);
    cursor: pointer;
    &:hover { background: var(--bg-strong); color: var(--ink-hi); text-decoration: none; }
    & kbd { margin-right: -4px; }
    &.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
    &.primary:hover { background: var(--primary-hi); border-color: var(--primary-hi); color: var(--on-primary); }
    &.danger:hover { color: var(--red); border-color: var(--red); }
    &.icon { width: 32px; justify-content: center; padding: 0; }
    &[aria-disabled="true"] { opacity: .45; pointer-events: none; }
    &[aria-current="true"], &[aria-pressed="true"] { background: var(--bg-strong); color: var(--ink-hi); border-color: var(--ink-mute); }
  }
  /* icons: SVG files used as masks, so they take the colour of the text */
  .ico { display: inline-block; width: 16px; height: 16px; flex: none; background: currentColor; mask: var(--i) center / contain no-repeat; }
  .i-branch { --i: url(/-/static/icons/branch.eae224ff4088.svg); }
  .i-search { --i: url(/-/static/icons/search.bb4a44c71891.svg); }
  .i-file { --i: url(/-/static/icons/file.8f5e0219262a.svg); }
  .i-chevron { --i: url(/-/static/icons/chevron.8eb2eb585d7a.svg); }
  .i-tag { --i: url(/-/static/icons/tag.a56485bf04ef.svg); }
  .i-history { --i: url(/-/static/icons/history.cca86f6c3622.svg); }
  .i-git-commit { --i: url(/-/static/icons/git-commit.1ee9e94a35ff.svg); }
  .i-eye { --i: url(/-/static/icons/eye.d20b2427cef5.svg); }
  .i-user { --i: url(/-/static/icons/user.59c742dea2a1.svg); }
  .i-key { --i: url(/-/static/icons/key.046a2d2422a2.svg); }
  .i-log-in { --i: url(/-/static/icons/log-in.94f6c50f2dad.svg); }
  .i-log-out { --i: url(/-/static/icons/log-out.bf6af5ac1a7a.svg); }
  .i-refresh-cw { --i: url(/-/static/icons/refresh-cw.a70af81ed5b7.svg); }
  .i-sun-moon { --i: url(/-/static/icons/sun-moon.30131c8a127b.svg); }
  .i-sun { --i: url(/-/static/icons/sun.111ee6e722dc.svg); }
  .i-moon { --i: url(/-/static/icons/moon.6ccafab8a7f1.svg); }
  .i-panel-right-open { --i: url(/-/static/icons/panel-right-open.78fc49e09daa.svg); }
  .i-shield-check { --i: url(/-/static/icons/shield-check.876e9b4c92a6.svg); }
  .i-shield-alert { --i: url(/-/static/icons/shield-alert.c7166c3be0fd.svg); }
  .i-shield-x { --i: url(/-/static/icons/shield-x.6a25da73d614.svg); }
  .i-alert-note { --i: url(/-/static/icons/alert-note.51be01f36dee.svg); }
  .i-alert-tip { --i: url(/-/static/icons/alert-tip.9295a1558084.svg); }
  .i-alert-important { --i: url(/-/static/icons/alert-important.9084a345ad06.svg); }
  .i-alert-warning { --i: url(/-/static/icons/alert-warning.61570962daf4.svg); }
  .i-alert-caution { --i: url(/-/static/icons/alert-caution.01d2e446d6b6.svg); }
  .i-folder-git { --i: url(/-/static/icons/folder-git.1b6a20b1d173.svg); }
  .i-inbox { --i: url(/-/static/icons/inbox.7392c5ab7bd2.svg); }
  .i-git-pull-request { --i: url(/-/static/icons/git-pull-request.51b9837bdecd.svg); }
  .i-activity { --i: url(/-/static/icons/activity.00b47fb790a8.svg); }
  .i-package { --i: url(/-/static/icons/package.21002881031b.svg); }
  .i-chart-line { --i: url(/-/static/icons/chart-line.d2fc25dbee53.svg); }

  /* a small tooltip from data-tip, shown above on hover; the element keeps
     its own hidden text for screen readers */
  [data-tip] { position: relative; }
  [data-tip]:hover::after {
    content: attr(data-tip); content: attr(data-tip) / "";
    position: absolute; bottom: calc(100% + 6px); left: 50%; translate: -50% 0; z-index: 30;
    padding: 4px 8px; white-space: nowrap; pointer-events: none;
    font: 500 var(--fs-xs) / 16px var(--font); font-style: normal; color: var(--ink);
    background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-s);
    box-shadow: var(--shadow);
  }
  /* at a right edge: the tooltip ends on the element instead of overflowing */
  [data-tip].tip-end:hover::after { left: auto; right: 0; translate: none; }

  .pill {
    display: inline-flex; align-items: center; height: 18px; padding: 0 var(--s2); margin-left: var(--s1);
    font: 600 var(--fs-2xs) / 1 var(--mono); color: var(--ink-dim); vertical-align: 1px;
    background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: 999px; white-space: nowrap;
    /* a link pill: no underline; the border lightens on hover and focus */
    &:is(a) { text-decoration: none; cursor: pointer; transition: border-color .12s; }
    &:is(a):hover, &:is(a):focus-visible { text-decoration: none; border-color: var(--ink-dim); }
    &.tag::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border: 1.5px solid currentColor; border-radius: 1px; transform: rotate(45deg); }
    &.new { color: var(--green); border-color: currentColor; }
    /* the signature of a commit: the protocol, then the verdict, always as text
       (colour never carries it alone). Verified takes the accent, a signature
       that cannot be vouched for keeps the neutral pill with the ink of a
       warning, a bad one is red, "unsigned" (commit page) is dim. */
    &.sig { gap: 5px; }
    &.sig .sig-proto { font-weight: 700; letter-spacing: .02em; }
    &.sig-ok { color: var(--green); border-color: currentColor; }
    &.sig-warn { color: var(--ink-hi); border-style: dashed; }
    &.sig-bad { color: var(--red); border-color: currentColor; }
    &.sig-none { color: var(--ink-mute); border-style: dotted; font-weight: 400; }
  }
  /* the signature in a list: the shield alone, its shape carries the verdict,
     the tooltip and the hidden text say which and why */
  .sig-ico {
    display: inline-flex; vertical-align: -2px; margin-left: var(--s1); cursor: help;
    &.sig-ok { color: var(--green); }
    &.sig-warn { color: var(--ink-dim); }
    &.sig-bad { color: var(--red); }
  }
  /* Why a signature is or is not verified, as text: a title alone is not
     reachable by keyboard, touch or every screen reader. */
  .sig-why { display: block; margin-top: 2px; }
  .count {
    display: inline-block; min-width: 22px; padding: 0 7px; margin-left: var(--s1);
    font: 600 var(--fs-xs) / 20px var(--font); text-align: center; color: var(--ink-dim);
    background: var(--bg-raised); border-radius: 999px; vertical-align: 1px;
  }

  /* header: identity, path and actions on top, the repository tabs below.
     --hdr-h is its height, the offset of the sticky bars of the diffs. */
  body { --hdr-h: 57px; }
  body:has(.hdr .tabs) { --hdr-h: 101px; }
  /* A row the cursor scrolls to (j / k, scrollIntoView) stops below the
     sticky header, not under it. */
  [data-rows] > * { scroll-margin-top: calc(var(--hdr-h) + var(--s3)); scroll-margin-bottom: var(--s3); }
  .hdr {
    position: sticky; top: 0; z-index: 20;
    background: var(--bg-surface); border-bottom: 1px solid var(--border);
  }
  .hdr-top {
    display: flex; align-items: center; gap: var(--s4);
    max-width: var(--page); margin: 0 auto; height: 56px; padding: 0 var(--pad);
  }
  .brand {
    display: flex; align-items: center; flex: none; text-decoration: none;
    &:hover { text-decoration: none; }
  }
  /* the hermit by his fire: a grey picture in its own rounded square */
  .brand-mark { width: 32px; height: 32px; flex: none; background: url(/-/static/icons/brand.eb859a5f0b7a.svg) center / contain no-repeat; }
  .crumbs {
    min-width: 0; flex: 1 1 auto; overflow: hidden;
    & ol { display: flex; align-items: center; min-width: 0; font-family: var(--mono); font-size: var(--fs); }
    & li { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
    & li:last-child { overflow: hidden; }
    & li::before { content: "/"; padding: 0 var(--s2); color: var(--border-strong); }
    & a, & span { overflow: hidden; text-overflow: ellipsis; color: var(--ink-dim); text-decoration: none; }
    & a:hover { color: var(--ink-hi); text-decoration: underline; }
    & [aria-current] { color: var(--ink-hi); font-weight: 700; }
  }
  .hdr-acts { display: flex; align-items: center; gap: var(--s2); margin-left: auto; flex: none; }
  .ref {
    font-family: var(--mono); max-width: 28ch;
    & .ref-name { overflow: hidden; text-overflow: ellipsis; }
    & .sha { font-weight: 400; color: var(--ink-mute); }
  }
  .search {
    min-width: 220px; justify-content: flex-start; color: var(--ink-mute); font-weight: 400;
    background: var(--bg-inset);
    & .search-label { flex: 1; }
  }
  .owner {
    display: flex; align-items: center; gap: var(--s2);
    & .owner-badge {
      display: inline-flex; align-items: center; gap: 6px; max-width: 20ch; padding: 0 var(--s1);
      font: 600 var(--fs-s) / 1 var(--mono); color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
  }

  .tabs {
    max-width: var(--page); margin: 0 auto; padding: 0 var(--pad);
    overflow-x: auto; scrollbar-width: none;
    & ul { display: flex; gap: var(--s1); }
    & a {
      position: relative; display: flex; align-items: center; gap: var(--s2); height: 44px; padding: 0 var(--s3);
      color: var(--ink-dim); text-decoration: none; white-space: nowrap; font-weight: 600;
    }
    & a::after { content: ""; position: absolute; left: var(--s2); right: var(--s2); bottom: -1px; height: 2px; border-radius: 2px; }
    & a:hover { color: var(--ink-hi); }
    & a:hover::after { background: var(--border-strong); }
    & a[aria-current] { color: var(--ink-hi); }
    & a[aria-current]::after { background: var(--accent); }
    & kbd { opacity: .55; }
    & a:hover kbd, & a:focus-visible kbd, & a[aria-current] kbd { opacity: 1; }
  }
  /* the owner's spaces: links in the tabs look, below the top row; the
     counts sit in a badge, the Inbox one in the accent when it holds items */
  .owner-nav {
    & a { gap: var(--s2); }
    & .count { margin-left: 0; }
    & .count.hot { color: var(--on-primary); background: var(--primary); }
  }

  /* work area: content and rail, centred, the page scrolls */
  .work {
    flex: 1; width: 100%; max-width: var(--page); margin: 0 auto;
    padding: var(--s5) var(--pad) var(--s7);
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: start;
    /* .work grows to fill the page (flex: 1): without this, the rows share the
       spare height and a short content pushes the rail down */
    align-content: start;
  }
  .work.has-rail { grid-template-columns: minmax(0, 1fr) var(--rail); }
  /* the wide mode (w, ermiteWide): every page takes the whole width of the
     screen; the rail goes to the right edge, the content takes the rest */
  html.wide :is(.work, .hdr-top, .tabs, .foot) { max-width: none; }
  /* the view of an owner page: its sections stacked, evenly spaced. The gap
     alone spaces them: the first heading of a section drops the top margin
     of .rule-h, so every owner page starts right below the nav, with or
     without a heading. */
  #view {
    display: flex; flex-direction: column; gap: var(--s6);
    & > section > .rule-h:first-child, & > section > .journal-head:first-child > .rule-h { margin-top: 0; }
  }
  .rail { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
  .work-lede { grid-column: 1 / -1; margin-bottom: calc(-1 * var(--s2)); }
  main > * + * { margin-top: var(--s4); }

  /* blocks: a surface with a header. Only the primary block of a page (the
     readme, the merge request, the issue) is framed; what follows it, such
     as the discussion, sits on the canvas below. */
  .card {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r);
    min-width: 0;
  }
  .card-h, .rail h2 {
    display: flex; align-items: center; gap: var(--s2);
    padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border);
    font-size: var(--fs); line-height: 20px;
    & a { margin-left: auto; font: 600 var(--fs-s) / 1 var(--font); color: var(--ink-dim); text-decoration: none; }
    & a:hover { color: var(--ink-hi); text-decoration: underline; }
  }
  /* The contextual column stays flat on the canvas, with one divider
     between sections rather than a separate card around each one. */
  .rail section { min-width: 0; background: none; border: 0; border-radius: 0; }
  .rail section + section { border-top: 1px solid var(--border); padding-top: var(--s4); }
  .rail section[hidden] + section, .rail section:first-child:empty + section { border-top: 0; padding-top: 0; }
  /* one inset for the whole column (--rail-x), shared by titles, text,
     inputs and lists, so every block lines up on the same edges */
  /* --s2 leaves room for the highlight of a file row, which bleeds by that
     much, inside a rail that scrolls (and clips) on its own */
  .rail { --rail-x: var(--s2); padding-inline: var(--rail-x); }
  .rail:focus { outline: none; }
  .rail h2 { border-bottom: 0; padding: var(--s2) 0; font-size: 16px; font-weight: 700; }
  .rail section > :not(h2) { margin: var(--s3) 0; }
  .rail section > .list { margin: var(--s2) 0; }
  .rail section > p + p { margin-top: calc(-1 * var(--s2)); }

  /* newest tag, a row of About in the summary rail: one line of text like
     the rows above it ("v0.9.0 · 36h ago · 9 tags") */
  .kv dd.latest-tag {
    & a { color: inherit; text-decoration: none; }
    & .tag-name { font-weight: 700; color: var(--ink-hi); }
    & a:hover { color: var(--ink-hi); text-decoration: underline; }
  }

  .kv {
    display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--s4); row-gap: var(--s1);
    font-size: var(--fs-s);
    & dt { color: var(--ink-mute); }
    & dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
  }
  /* history rail: the ref as a headline, the page in numbers, then the refs
     of the page with their commit */
  .rail .h-ref {
    display: flex; align-items: center; gap: var(--s2);
    font: 700 var(--fs) / 1.3 var(--mono); color: var(--ink-hi);
    & .ico { color: var(--accent); }
    & .h-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  }
  .rail .h-stats {
    display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: var(--fs-s); color: var(--ink-dim);
    & b { color: var(--ink-hi); }
  }
  .rail .h-dates { font-size: var(--fs-s); color: var(--ink-mute); font-variant-numeric: tabular-nums; }
  .page-refs {
    font-size: var(--fs-s);
    & a {
      display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: var(--s2); align-items: center;
      padding: var(--s1) var(--s2); margin: 0 calc(-1 * var(--s2)); border-radius: 4px; text-decoration: none; color: var(--ink);
    }
    & a:hover { background: var(--bg-raised); }
    & a:hover .pr-name { color: var(--ink-hi); text-decoration: underline; }
    & .ico { color: var(--ink-mute); }
    & .i-tag { color: var(--accent); }
    & .pr-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    & .pr-meta { grid-column: 2; color: var(--ink-mute); font-size: var(--fs-xs); }
    & .pr-meta code { font-family: var(--mono); }
  }
  .outline {
    font-size: var(--fs-s);
    & a { display: block; padding: 2px var(--s2); margin: 0 calc(-1 * var(--s2)); border-radius: 4px; color: var(--ink-dim); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    & a:hover { background: var(--bg-raised); color: var(--ink-hi); }
    & .l1 { font-weight: 700; color: var(--ink); }
    & .l3 { padding-left: var(--s5); }
    & .l4, & .l5, & .l6 { padding-left: var(--s6); }
  }

  /* footer: version and source (AGPL §13), then shortcuts and theme */
  .foot {
    display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center;
    width: 100%; max-width: var(--page); margin: 0 auto; padding: var(--s4) var(--pad) var(--s5);
    font-size: var(--fs-s); color: var(--ink-mute);
    &::before { content: ""; flex-basis: 100%; height: 1px; margin-bottom: var(--s2); background: var(--border); }
    & a { color: var(--ink-dim); }
    & .foot-keys { margin-left: auto; color: var(--ink-dim); }
    & .foot-keys:hover { color: var(--ink-hi); }
    & .foot-theme {
      display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
      margin: -6px 0; color: var(--ink-dim); border-radius: var(--r-s);
    }
    & .foot-theme:hover { color: var(--ink-hi); background: var(--bg-raised); }
  }

  /* hint: bottom right, only while it has something to say */
  .hint {
    position: fixed; right: var(--s4); bottom: var(--s4); z-index: 25;
    display: flex; gap: var(--s3); align-items: center;
    padding: var(--s2) var(--s3); font: 600 var(--fs-s) / 18px var(--mono); color: var(--ink-hi);
    background: var(--bg-overlay); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow);
    pointer-events: none;
    & > :empty { display: none; }
    & > [role="status"] { display: contents; }
    & .hint-live { color: var(--red); }
  }
  /* empty, the badge is out of sight but stays a status region (display: none
     would drop it from the accessibility tree and its next message would not be
     announced) */
  .hint:not(:has(.hint-nav:not(:empty), .hint-sel:not(:empty), .hint-flash:not(:empty), .hint-live:not(:empty))) {
    width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); box-shadow: none;
  }

  @media (max-width: 1080px) {
    /* without scripts the panel stacks below the content (86-rail.css) */
    .work.has-rail { grid-template-columns: minmax(0, 1fr); }
    .search { min-width: 0; }
    .search .search-label, .search kbd { display: none; }
    .search { width: 32px; padding: 0; justify-content: center; }
  }
  @media (max-width: 720px) {
    :root { --pad: var(--s4); }
    .hdr-top { gap: var(--s3); height: 52px; }
    .crumbs li:not(:last-child) { display: none; }
    .ref .sha, .owner .owner-badge { display: none; }
    .ref { max-width: 16ch; }
    .work { padding-top: var(--s4); }
    .tabs kbd { display: none; }
    .list .c-who, .list .c-desc, .list .c-sub, .list .c-ref, .list .c-size, .list .c-lang { display: none; }
  }
  @media (max-width: 640px) {
    /* the icons and counts carry the owner's spaces; each link keeps its aria-label */
    .owner-nav { overflow-x: auto; }
    .owner-nav .on-label { display: none; }
  }
}
/* 25-panel.css */
@layer components {
  /* dialogs: the "go to" palette, the ref switcher and the keys, centred over a backdrop */
  .modal {
    position: fixed; inset: 0; margin: 12vh auto auto; z-index: 40;
    width: min(640px, calc(100vw - 2 * var(--s4))); max-height: min(70dvh, 560px);
    display: none; flex-direction: column;
    background: var(--bg-overlay); color: var(--ink);
    border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow);
    overflow: hidden; overscroll-behavior: contain;
    &[open] { display: flex; }
    &::backdrop { background: var(--backdrop); }
    &#panel-help { width: min(820px, calc(100vw - 2 * var(--s4))); }
  }
  @media (prefers-reduced-motion: no-preference) {
    .modal[open] { animation: modal-in 120ms ease-out; }
    @keyframes modal-in { from { opacity: 0; transform: translateY(-6px) scale(.99); } }
  }
  .panel-head {
    display: flex; align-items: center; gap: var(--s3); flex: none;
    padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border);
    & h2 { font-size: var(--fs); flex: 1; }
    & input { flex: 1; min-width: 0; height: 32px; font-size: 16px; }
    & input::placeholder { color: var(--ink-mute); opacity: 1; }
  }
  .panel-x { color: var(--ink-mute); font-size: var(--fs-s); display: flex; gap: var(--s2); align-items: center; }
  .panel-x:hover { color: var(--ink-hi); }
  .panel-foot {
    display: flex; gap: var(--s4); flex: none; padding: var(--s2) var(--s4);
    border-top: 1px solid var(--border); background: var(--bg-surface);
    font-size: var(--fs-xs); color: var(--ink-mute);
    & span { display: flex; gap: var(--s1); align-items: center; }
  }
  .modal > ul, .modal > .panel-cols, .modal > .keys { overflow-y: auto; padding: var(--s2); }

  .panel-cols {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s2);
    & h2 { font: 600 var(--fs-xs) / 1 var(--font); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); padding: var(--s3) var(--s3) var(--s2); }
    & li a {
      display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s3); border-radius: var(--r-s);
      font-family: var(--mono); font-size: var(--fs-s); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    & li a:hover, & li a:focus-visible { background: var(--bg-raised); color: var(--ink-hi); }
    & li a[aria-current] { font-weight: 700; color: var(--ink-hi); box-shadow: inset 2px 0 0 var(--accent); }
    & .mark { display: inline-block; width: 1ch; color: var(--green); }
  }

  .cmd-list {
    & li a {
      display: flex; align-items: center; gap: var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-s);
      text-decoration: none; color: var(--ink);
    }
    & li a:hover { background: var(--bg-raised); }
    & li[data-cursor] a { background: var(--bg-strong); color: var(--ink-hi); box-shadow: inset 2px 0 0 var(--accent); }
    & .lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: var(--fs-s); }
    & .k { flex: none; font-size: var(--fs-xs); color: var(--ink-mute); }
    & .dir { color: var(--ink-dim); }
    & strong { color: var(--ink-hi); font-weight: 700; }
    & mark { background: none; color: var(--green); font-weight: 700; text-decoration: underline; }
  }

  .keys {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); column-gap: var(--s5); row-gap: var(--s1);
    padding: var(--s3) var(--s4) var(--s4) !important;
    & > div { display: grid; grid-template-columns: 130px 1fr; gap: var(--s3); align-items: baseline; padding: var(--s1) 0; border-bottom: 1px solid var(--border); }
    & dt { display: flex; flex-wrap: wrap; gap: var(--s1); min-width: 0; }
    & dd { color: var(--ink-dim); font-size: var(--fs-s); min-width: 0; overflow-wrap: anywhere; }
    @media (max-width: 480px) { & > div { grid-template-columns: minmax(0, 1fr); gap: var(--s1); } }
  }
  /* the preference "single-key shortcuts" of the help dialog */
  .keys-pref {
    flex: none; padding: var(--s3) var(--s4) 0;
    & label { display: flex; align-items: center; gap: var(--s2); cursor: pointer; }
    & input[type=checkbox] { width: 16px; height: 16px; flex: none; accent-color: var(--green); }
    & p { font-size: var(--fs-s); margin-top: var(--s1); }
  }
}
/* 30-list.css */
@layer components {
  /* Traffic labels take the spare width; numeric headers fit their values.
     Alignment and tabular figures come from the shared .num utility. */
  #insights .list .num { width: 1%; white-space: nowrap; }

  /* tables in a card, with a row cursor (j/k) */
  .list {
    width: 100%; table-layout: auto;
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-s);
    border-collapse: separate; overflow: hidden;
    & th {
      height: 40px; padding: 0 var(--s3); white-space: nowrap;
      font: 600 var(--fs-xs) / 1 var(--font); text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute);
      background: var(--bg-raised); border-bottom: 1px solid var(--border);
    }
    & th a { text-decoration: none; }
    & th a:hover { color: var(--ink-hi); }
    & th[aria-sort="ascending"], & th[aria-sort="descending"] { color: var(--ink-hi); }
    & td { width: 1%; height: 40px; padding: 0 var(--s3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-top: 1px solid var(--border); }
    /* Secondary cells fit their text; only the main cell gives way. */
    & .c-subject, & .c-main { width: auto; max-width: 0; }
    & tbody tr:first-child td { border-top: 0; }
    & tbody tr:hover { background: var(--bg-raised); }
    /* the cursor: the row raised, framed by one even line. The frame is drawn
       on the cells (a row takes no radius), so it can follow the card's
       curve when the row sits at a corner. */
    & tbody tr[data-cursor] > td {
      background: var(--bg-raised); border-top-color: transparent;
      box-shadow: inset 0 1px var(--accent), inset 0 -1px var(--accent);
    }
    & tbody tr[data-cursor] > td:first-child { box-shadow: inset 1px 0 var(--accent), inset 0 1px var(--accent), inset 0 -1px var(--accent); }
    & tbody tr[data-cursor] > td:last-child { box-shadow: inset -1px 0 var(--accent), inset 0 1px var(--accent), inset 0 -1px var(--accent); }
    & > tbody:first-child > tr[data-cursor]:first-child > td:first-child { border-top-left-radius: calc(var(--r) - 1px); }
    & > tbody:first-child > tr[data-cursor]:first-child > td:last-child { border-top-right-radius: calc(var(--r) - 1px); }
    & > tbody:last-child > tr[data-cursor]:last-child > td:first-child { border-bottom-left-radius: calc(var(--r) - 1px); }
    & > tbody:last-child > tr[data-cursor]:last-child > td:last-child { border-bottom-right-radius: calc(var(--r) - 1px); }
    & tbody tr[hidden] { display: none; }
    & td > a { text-decoration: none; }
    & td > a:first-child { color: var(--ink-hi); }
    & tr:hover td > a:first-child, & tr[data-cursor] td > a:first-child { text-decoration: underline; }
    & .c-sha, & .c-ref, & .c-kind, & .c-size, & .c-n { font-family: var(--mono); font-size: var(--fs-s); }
    & .c-sha a { color: var(--ink-dim); }
    & .c-when, & .c-who { font-size: var(--fs-s); }
    & .c-sub { color: var(--ink-dim); }
  }

  /* home: the repositories as rows in a vertical list; the page is a stack of
     sections, so others can sit beside or below */
  .home {
    display: flex; flex-direction: column; gap: var(--s5);
    & .home-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); margin-bottom: var(--s4); }
    & .home-bar .filter { flex: 1 1 260px; }
    & .sort { display: flex; align-items: center; gap: var(--s1); font-size: var(--fs-s); }
    & .sort > .mute { margin-right: var(--s1); }
    & .sort a {
      display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 var(--s2);
      color: var(--ink-dim); text-decoration: none; border: 1px solid transparent; border-radius: var(--r-s);
    }
    & .sort a:hover { color: var(--ink-hi); background: var(--bg-raised); }
    & .sort a[aria-current="true"] { color: var(--ink-hi); background: var(--bg-raised); border-color: var(--border-strong); }
  }
  /* The repositories, flat on the page: no surface, a hairline between
     rows. A row: the name and its flags, the description, the topics as
     plain words, then one quiet line of facts with the pulse inline. Hover
     underlines the name in a muted line; the cursor (j/k) colours the name
     and its underline with the accent, on a faint tint. */
  .repos {
    margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border);
    & .repo {
      display: grid; grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "name state" "desc desc" "topics meta";
      align-items: baseline; gap: 2px var(--s6); min-width: 0;
      padding: 12px var(--s3); border-bottom: 1px solid var(--border);
    }
    & .repo[hidden] { display: none; }
    & .repo[data-cursor] { background: var(--bg-cursor); }
    & .repo-name { grid-area: name; display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--s1) var(--s2); min-width: 0; font: 600 var(--fs) / 22px var(--font); overflow-wrap: anywhere; }
    & .repo-name > a:first-child { color: var(--ink-hi); text-decoration: none; }
    & .repo:hover .repo-name > a:first-child, & .repo[data-cursor] .repo-name > a:first-child {
      text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-mute);
    }
    & .repo[data-cursor] .repo-name > a:first-child { color: var(--accent); text-decoration-color: currentColor; }
    & .repo-flag {
      flex: none; padding: 0 7px; font: 500 var(--fs-2xs) / 16px var(--font); color: var(--ink-mute); text-decoration: none;
      border: 1px solid var(--border-strong); border-radius: 999px;
    }
    /* a long release or tag name is cut, never the repository name */
    & a.repo-flag { max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
    & a.repo-flag:hover { border-color: var(--accent); }
    & .repo-activity { display: inline-flex; align-self: center; color: var(--accent); }
    /* the far right of the first line: the last activity, then the CI mark */
    & .repo-state {
      grid-area: state; justify-self: end; display: flex; align-items: center; gap: var(--s2);
      font-size: var(--fs-xs); line-height: 22px; color: var(--ink-mute); white-space: nowrap;
    }
    & .repo-when { display: inline-flex; align-items: center; gap: 5px; }
    & .repo-when .ico { width: 13px; height: 13px; }
    & .repo-ci { display: inline-flex; }
    & .repo-ci .ck { width: 10px; height: 10px; margin: 0; vertical-align: 0; border-width: 1.5px; }
    & .repo-desc { grid-area: desc; max-width: var(--measure); color: var(--ink-dim); font-size: var(--fs-m); line-height: 20px; }
    /* the topics on one line: the words that wrap out of sight are hidden
       and ermiteFit (ermite.js) adds a … button that names them and opens
       the list (data-open) on as many lines as it needs */
    & .repo-topics { grid-area: topics; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s3); height: 18px; overflow: hidden; margin: 2px 0 0; padding: 0; list-style: none; font-size: var(--fs-xs); line-height: 18px; color: var(--accent); }
    & .repo-topics li[hidden] { display: none; }
    & .repo-topics li.more button {
      padding: 0; border: 0; background: none; cursor: pointer;
      font: inherit; line-height: 18px; color: var(--ink-mute);
    }
    & .repo-topics li.more button:hover { color: var(--accent); }
    & .repo-topics[data-open] { height: auto; }
    /* the facts: one quiet line at the right, figures a step brighter */
    & .repo-meta {
      grid-area: meta; justify-self: end; max-width: 60ch; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px var(--s4);
      margin: 2px 0 0; padding: 0; list-style: none;
      font-size: var(--fs-xs); line-height: 18px; color: var(--ink-mute);
    }
    & .repo-meta li { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
    & .repo-meta b { font-family: var(--font); font-weight: 600; color: var(--ink-dim); }
    & .repo-meta a { color: inherit; text-decoration: none; }
    & .repo-meta a:hover { color: var(--ink-hi); text-decoration: underline; }
    & .repo-meta .ico { width: 13px; height: 13px; }
    & .repo-tag .ico { margin-top: 1px; }
    & .repo-tag > :is(a, span:not(.ico)) { display: inline-block; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
    & .repo-quiet { font-style: italic; }
    /* the pulse: the commits per day over 90 days, word-sized, before the
       commits of the last 30 days; its tooltip (ermite.js) tells each day.
       Grey when the repository had no commit in the last week. */
    & .repo-pulse { margin: 0 2px 0 0; }
    & .repo-pulse svg { display: block; width: 72px; height: 16px; overflow: visible; }
    & .pulse-stop-top { stop-color: var(--chart); stop-opacity: .22; }
    & .pulse-stop-bottom { stop-color: var(--chart); stop-opacity: 0; }
    & .pulse-line { fill: none; stroke: var(--chart); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
    & .repo-pulse:not([data-live]) .pulse-line { stroke: var(--ink-mute); }
    & .repo-pulse:not([data-live]) .pulse-stop-top { stop-color: var(--ink-mute); stop-opacity: .18; }
    /* tablet: the facts move under the topics, at the left */
    @media (max-width: 1000px) {
      & .repo { grid-template-areas: "name state" "desc desc" "topics topics" "meta meta"; }
      & .repo-meta { justify-self: start; justify-content: flex-start; max-width: none; }
      /* the facts start at the left: the first tooltip anchors there too */
      & .repo-meta li:first-child[data-tip]:hover::after { left: 0; translate: none; }
    }
    /* phone: the state keeps the top right; the facts wrap */
    @media (max-width: 720px) {
      & .repo { column-gap: var(--s3); padding: var(--s3) var(--s2); }
      & .repo-meta { gap: 2px var(--s3); }
    }
  }
  /* a filter that leaves no row hides the list and its top hairline */
  .home .repos:not(:has(> .repo:not([hidden]))) { display: none; }
  .list.passkeys {
    & .c-name { font-weight: 600; }
    & .c-when { font-size: var(--fs-s); }
    & .c-sync { font-size: var(--fs-s); }
    & .c-act { text-align: right; }
  }
  .passkey-add {
    display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s4);
    & input {
      flex: 1; min-width: 12ch; max-width: 320px; height: 32px; padding: 0 var(--s3);
      background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-s);
    }
    & input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
    & input::placeholder { color: var(--ink-mute); opacity: 1; }
  }
  /* Keep badges beside the subject, without letting them swallow its ellipsis. */
  .subject-line { display: flex; align-items: center; gap: var(--s1); min-width: 0; }
  .subject-line > a:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; text-decoration: none; color: var(--ink-hi); }
  .subject-line > :not(:first-child) { flex: none; }
  .list tr:is(:hover, [data-cursor]) .subject-line > a:first-child { text-decoration: underline; }

  /* filter: a search field above a list */
  .filter {
    position: relative; display: flex; max-width: 420px;
    &::before {
      content: ""; position: absolute; left: 11px; top: 10px; width: 16px; height: 16px; pointer-events: none;
      background: var(--ink-mute); mask: url(/-/static/icons/search.bb4a44c71891.svg) center / contain no-repeat;
    }
    &::after {
      content: "/"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
      font: 600 var(--fs-xs) / 18px var(--mono); color: var(--ink-mute); padding: 0 6px;
      border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; pointer-events: none;
    }
    & input {
      flex: 1; min-width: 0; height: 36px; padding: 0 36px 0 34px;
      background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-s);
    }
    & input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
    & input::placeholder { color: var(--ink-mute); opacity: 1; }
    &:focus-within::after { display: none; }
  }

  /* file finder: the results replace the tree while the field has a query */
  #finder {
    & #finder-status { padding: var(--s3) var(--s4) var(--s2); font-size: var(--fs-s); }
    & #finder-list { padding: 0 var(--s2) var(--s2); }
  }

  /* the Files view: the finder on top, the tree in a card under it */
  .tree-find {
    display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s3);
    & .filter { flex: 1; max-width: none; }
    & .filter::before { top: 14px; left: 14px; }
    & .filter::after { right: 12px; }
    & .filter input { height: 44px; padding-left: 42px; font-size: var(--fs); background: var(--bg-surface); }
  }
  .tree-keys { flex: none; color: var(--ink-mute); font-size: var(--fs-xs); white-space: nowrap; }
  .tree-card {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-s); overflow: hidden;
  }
  .tree-head {
    display: flex; align-items: center; gap: var(--s3); min-height: 40px; padding: 0 var(--s4);
    background: var(--bg-raised); border-bottom: 1px solid var(--border); font-size: var(--fs-s);
    & .tree-path { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 var(--fs-s) / 1 var(--mono); color: var(--ink-hi); }
    & .tree-up { flex: none; font: 600 var(--fs-s) / 1 var(--mono); color: var(--ink-dim); text-decoration: none; }
    & .tree-up:hover { color: var(--ink-hi); text-decoration: underline; }
    & .tree-count { flex: none; color: var(--ink-mute); }
  }
  .tree-card > :is(.lede, .note) { margin: var(--s3) var(--s4); }

  /* The tree: one flat list, a row per entry, each as deep as --depth says
     (files.js sets it on the rows it opens in place). A row draws, from the
     left: a vertical guide per level above it, the branch tick to its node,
     the node, its name; then size, last commit and date, which are secondary. */
  ul.tree {
    --indent: 22px; --rowh: 32px; --guide: var(--border-strong);
    & > li {
      /* the size column holds "1023.9 KiB" on one line: 10ch of the mono
         face plus its padding; the rows share it, so the sizes line up */
      display: grid; grid-template-columns: minmax(0, 1fr) calc(10ch + var(--s4)) minmax(0, 1.2fr) 96px; align-items: center;
      min-height: var(--rowh); padding-right: var(--s4); font-size: var(--fs-s);
    }
    & > li:hover, & > li[data-cursor] { background: var(--bg-raised); }
    & > li[data-cursor] { outline: 1px solid var(--accent); outline-offset: -1px; }
    & > li:focus-visible { outline-offset: -2px; border-radius: 0; }
    & .t-main { display: flex; align-items: stretch; min-width: 0; min-height: var(--rowh); padding-left: var(--s3); }
    & .t-twig {
      flex: none; width: calc(var(--depth, 0) * var(--indent));
      background: repeating-linear-gradient(90deg,
        transparent 0 calc(var(--indent) / 2), var(--guide) calc(var(--indent) / 2) calc(var(--indent) / 2 + 1px),
        transparent calc(var(--indent) / 2 + 1px) var(--indent));
    }
    & .t-node { position: relative; flex: none; width: var(--indent); }
    & .t-node::before, & .t-node::after { content: ""; position: absolute; }
    /* the branch tick, from the guide of the directory to this node */
    & .t-node::before { top: 50%; left: calc(var(--indent) / -2); right: calc(50% + 6px); height: 1px; background: var(--guide); }
    & > li[data-depth="0"] .t-node::before { display: none; }
    /* an open directory continues its guide down, to its first entry */
    & > li[aria-expanded="true"] .t-node {
      background: linear-gradient(var(--guide), var(--guide)) center bottom / 1px calc(50% - 8px) no-repeat;
    }
    /* the node: a ring for a file, a chevron for a directory (it turns down
       once open), a diamond for a link, a square for a submodule */
    & .t-node::after {
      top: 50%; left: 50%; width: 7px; height: 7px; margin: -4px 0 0 -4px;
      background: var(--bg-surface); border: 1px solid var(--ink-mute); border-radius: 50%;
    }
    & > li:hover .t-node::after, & > li[data-cursor] .t-node::after { background: var(--bg-raised); border-color: var(--ink-hi); }
    & > li[data-kind="dir"] .t-node::after {
      width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 0; border-radius: 0; background: var(--ink-dim);
      mask: url(/-/static/icons/chevron.8eb2eb585d7a.svg) center / contain no-repeat; transform: rotate(-90deg);
    }
    & > li[data-kind="dir"][aria-expanded="true"] .t-node::after { transform: none; background: var(--accent); }
    & > li[data-kind="link"] .t-node::after { border-radius: 1px; transform: rotate(45deg); }
    & > li[data-kind="module"] .t-node::after { border-radius: 1px; }
    & > li[aria-busy="true"] .t-node { opacity: .4; }
    & .t-name {
      align-self: center; min-width: 0; padding: 4px var(--s1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
      font-family: var(--mono); font-size: var(--fs); color: var(--ink); text-decoration: none; cursor: pointer;
    }
    & > li[data-kind="dir"] .t-name { font-weight: 700; color: var(--ink-hi); }
    & > li[data-kind="link"] .t-name, & > li[data-kind="module"] .t-name { color: var(--ink-dim); cursor: default; }
    & > li:hover .t-name, & > li[data-cursor] .t-name { text-decoration: underline; }
    & .t-size { padding-right: var(--s4); text-align: right; white-space: nowrap; font: var(--fs-xs) / 1 var(--mono); color: var(--ink-mute); font-variant-numeric: tabular-nums; }
    & .t-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); }
    & .t-sub a { color: inherit; text-decoration: none; }
    & .t-sub a:hover { color: var(--ink-hi); text-decoration: underline; }
    & .t-when { text-align: right; white-space: nowrap; color: var(--ink-mute); font-size: var(--fs-xs); }
    & > li.tree-more { grid-template-columns: minmax(0, 1fr); }
    & > li.tree-more .t-name { font-size: var(--fs-s); font-weight: 400; color: var(--ink-dim); text-decoration: underline; }
    & > li.tree-more .t-node::after { display: none; }
  }
  @media (max-width: 900px) {
    ul.tree > li { grid-template-columns: minmax(0, 1fr) 64px 80px; }
    ul.tree .t-sub { display: none; }
  }
  @media (max-width: 720px) {
    .tree-keys { display: none; }
    ul.tree { --indent: 18px; }
    ul.tree > li { grid-template-columns: minmax(0, 1fr) 72px; }
    ul.tree .t-size { display: none; }
  }

  /* section headings inside a page */
  .rule-h {
    display: flex; align-items: center; gap: var(--s2); margin-top: var(--s5);
    font-size: var(--fs);
    & > :first-child { color: var(--ink-hi); }
    /* a rule after the title closes the heading off, like the rail dividers */
    &::after { content: ""; flex: 1; height: 1px; background: var(--border); }
  }
  main > .rule-h:first-child { margin-top: 0; }

  /* empty / 404 / error / sign in: one card in the middle */
  .state {
    max-width: 560px; margin: var(--s7) auto 0 !important; padding: var(--s6);
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-s);
    & .eyebrow { font: 700 var(--fs-s) / 1 var(--mono); color: var(--ink-mute); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--s2); }
    & h1 { margin-bottom: var(--s3); }
    & p.dim { color: var(--ink-dim); }
    & .state-act { margin-top: var(--s5); }
    & .state-back { margin-top: var(--s5); display: flex; gap: var(--s4); font-size: var(--fs-s); }
    & .clone { margin-top: var(--s4); }
  }

  /* copyable shell lines */
  .clone {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); min-width: 0;
    & .clone-line {
      min-width: 0;
      display: flex; gap: var(--s2); align-items: center; padding: var(--s1) var(--s1) var(--s1) var(--s3);
      background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-s);
      font-size: var(--fs-code);
    }
    & .clone-line > .mute { user-select: none; font-family: var(--mono); }
    & code { flex: 1; min-width: 0; overflow-x: auto; white-space: pre; scrollbar-width: none; }
    & .copy { height: 26px; padding: 0 var(--s2); font-size: var(--fs-xs); }
  }
}

/* Kept outside the row so dense layouts and card clipping cannot hide it. */
.pulse-tooltip {
  position: fixed;
  z-index: 100;
  pointer-events: none;
  max-width: calc(100vw - 16px);
  padding: var(--s2) var(--s3);
  background: var(--bg-raised);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.pulse-swatch { display: inline-block; width: 1.2em; margin-right: .5em; vertical-align: middle; border-top: 2px solid var(--chart); }
.pulse-swatch-visitors { height: .6em; border: 0; border-radius: 2px; background: var(--ink-mute); }
.pulse-guide { stroke: var(--ink-mute); stroke-width: 1; vector-effect: non-scaling-stroke; pointer-events: none; }

@layer components {
  /* the inbox: one row per item awaiting the owner. The kind is a small
     label; its ink tells the kinds apart, the word always says it. The
     actions sit at the right end; under 640px they wrap below the text. */
  .attention {
    list-style: none; margin: 0; padding: 0;
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-s);
    overflow: hidden;
  }
  .att {
    display: grid; grid-template-columns: 11ch minmax(0, 1fr) auto auto; align-items: center;
    gap: var(--s2) var(--s3); padding: var(--s2) var(--s3); min-height: 48px;
    &:not(:first-child) { border-top: 1px solid var(--border); }
    &[data-cursor] { background: var(--bg-cursor); box-shadow: inset 2px 0 0 var(--accent); }
    & form { margin: 0; }
  }
  .att-kind {
    justify-self: start; display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2);
    font: 600 var(--fs-xs) / 1 var(--font); white-space: nowrap; color: var(--ink-dim);
    background: var(--bg-raised); border: 1px solid var(--border-strong); border-radius: 999px;
    &.att-moderation { color: var(--blue); border-color: currentColor; }
    &.att-deps-failed { color: var(--red); border-color: currentColor; }
    &.att-ready { color: var(--green); border-color: currentColor; }
    &.att-release-due { color: var(--ink-hi); border-style: dashed; }
  }
  .att-main { min-width: 0; display: grid; gap: var(--s1); }
  .att-head {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); min-width: 0;
    & .ck-sum { align-self: center; }
  }
  .att-title { font-weight: 600; color: var(--ink-hi); overflow-wrap: anywhere; }
  .att-repo, .att-note { font-size: var(--fs-s); }
  .att-note { overflow-wrap: anywhere; }
  .att-preview {
    margin: 0; font-size: var(--fs-s); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .att-when { font-size: var(--fs-s); white-space: nowrap; }
  .att-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); }
  @media (max-width: 640px) {
    .att { grid-template-columns: auto minmax(0, 1fr) auto; }
    .att-main { grid-column: 1 / -1; grid-row: 2; }
    .att-when { grid-column: 3; grid-row: 1; justify-self: end; }
    .att-acts { grid-column: 1 / -1; justify-content: flex-start; }
    .att-acts:empty { display: none; }
  }
}
/* 40-summary.css */
@layer components {
  .lede { max-width: var(--measure); color: var(--ink-dim); font-size: 16px; }

  /* key/value facts */
  .facts {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: var(--s5);
    & > div { display: grid; grid-template-columns: 120px 1fr; min-width: 0; }
    & dt { color: var(--ink-mute); }
    & dd { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  }

  .tagged { color: var(--ink); font-weight: 700; white-space: nowrap; }
  .list.commits .c-subject { overflow: hidden; text-overflow: ellipsis; }

  /* A rendered document (README, a Markdown file) fills its card, as on
     GitHub: the page width bounds its lines, not the reading measure, so no
     empty band sits on the right of the card. */
  .prose.doc { max-width: none; }
  .readme .prose { padding: var(--s5) var(--s6) var(--s6); }
  /* .card-h.doc-tabs, not .doc-tabs: .card-h pushes its links to the right
     with :is(.card-h, .rail h2) a, which weighs as .rail h2 a */
  .card-h.doc-tabs {
    display: flex; flex-wrap: wrap; gap: var(--s4);
    & a { margin-left: 0; color: var(--ink-dim); }
    & a[aria-current] { color: var(--green); text-decoration: underline; text-underline-offset: 5px; }
  }

  /* rendered Markdown */
  .prose {
    max-width: var(--measure); line-height: 1.7; overflow-wrap: break-word;
    color: var(--ink); letter-spacing: .003em;
    & h1, & h2, & h3, & h4 { margin: 1.8em 0 0; }
    & h1 { font-size: 24px; line-height: 32px; padding-bottom: var(--s2); border-bottom: 1px solid var(--border); }
    & h2 { font-size: 19px; line-height: 28px; padding-bottom: var(--s2); border-bottom: 1px solid var(--border); }
    & h3 { font-size: 16px; }
    & strong { color: var(--ink-hi); }
    & > :first-child { margin-top: 0; }
    & p, & ul, & ol, & pre, & table, & blockquote { margin-top: var(--s4); }
    & ul { list-style: disc; }
    & ul, & ol { padding-left: var(--s5); }
    & ol { list-style: decimal; }
    & li + li { margin-top: var(--s1); }
    & li::marker { color: var(--ink-mute); }
    & a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); }
    & a:hover { color: var(--accent); text-decoration-color: currentColor; }
    & li > ul, & li > ol, & li > p { margin-top: var(--s1); }
    & pre {
      padding: var(--s3) var(--s4); overflow-x: auto;
      background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-s);
      font-size: var(--fs-code); line-height: var(--lh-code);
    }
    & :not(pre) > code {
      padding: 1px 5px; font-size: .86em; overflow-wrap: anywhere;
      background: var(--bg-raised); border: 1px solid var(--border); border-radius: 4px;
      color: var(--ink-hi);
    }
    & blockquote { padding-left: var(--s4); border-left: 3px solid color-mix(in srgb, var(--accent) 45%, var(--border-strong)); color: var(--ink-dim); }
    /* GitHub alerts: > [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION] */
    & .md-alert {
      --alert: var(--green);
      margin-top: var(--s4); padding: var(--s2) var(--s4);
      border-left: 3px solid var(--alert); border-radius: 0 var(--r-s) var(--r-s) 0;
      background: color-mix(in srgb, var(--alert) 7%, transparent);
      & > .md-alert-title { display: flex; align-items: center; gap: var(--s2); margin-top: 0; font-weight: 600; color: var(--alert); }
      & > :nth-child(2) { margin-top: var(--s1); }
    }
    & .md-alert-tip { --alert: var(--blue); }
    & .md-alert-important { --alert: var(--ink-hi); }
    & .md-alert-warning { --alert: var(--amber); }
    & .md-alert-caution { --alert: var(--red); }
    /* the box fits its columns, and scrolls when they overflow the text */
    & table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-s); font-size: var(--fs-s); line-height: 20px; }
    & th, & td { padding: 6px var(--s3); white-space: nowrap; vertical-align: top; border-top: 1px solid var(--border); }
    & th { background: var(--bg-raised); border-top: 0; font-weight: 700; }
    & td code { white-space: nowrap; }
    & hr { margin: var(--s5) 0; }
    & .alt { color: var(--ink-mute); }
    & img { display: none; }
    & video { display: block; max-width: 100%; margin-inline: auto; }
  }
}
/* 50-code.css */
@layer components {
  /* page title for a file: name, then its actions as plain words */
  .file-h {
    display: flex; gap: var(--s2) var(--s4); align-items: center; flex-wrap: wrap; font-size: 18px;
    & > span:first-child { overflow-wrap: anywhere; }
    /* size, lines and language, quiet beside the name */
    & .file-facts { display: inline-flex; flex-wrap: wrap; gap: var(--s3); font: 400 var(--fs-s) / 1 var(--font); color: var(--ink-mute); letter-spacing: 0; }
    & .file-facts > span + span::before { content: "·"; margin-right: var(--s3); color: var(--border-strong); }
    & .file-last { display: inline-flex; min-width: 0; gap: var(--s2); }
    & .file-last a { max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    & .acts { margin-left: auto; display: flex; gap: var(--s2); }
  }
  .rail .r-hint p { font-size: var(--fs-s); line-height: 20px; }
  .notice {
    padding: var(--s3) var(--s4); max-width: var(--measure); font-size: var(--fs-s);
    background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-s);
  }
  .note { color: var(--ink-dim); font-size: var(--fs-s); }
  .pad { padding: var(--s3) var(--s4); }

  /* source view: gutter numbers are links (selectable lines), lines span the full width */
  .code {
    overflow-x: auto; padding: var(--s3) 0; font-family: var(--mono);
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r);
    font-size: var(--fs-code); line-height: var(--lh-code);
    & code { display: grid; min-width: max-content; }
    & .line { padding-right: var(--pad); border-left: 2px solid transparent; }
    & .line:hover { background: var(--row); }
    & .line.sel { background: var(--sel); border-left-color: var(--focus); }
    & .ln {
      display: inline-block; width: 8ch; padding-right: 2ch; text-align: right; /* 8ch: a multiple of tab-size, so tabs after the gutter keep their width */
      color: var(--ink-mute); text-decoration: none; user-select: none;
    }
    & .ln:hover, & .sel .ln { color: var(--ink-hi); }
  }
  .source > summary { color: var(--ink-dim); font-size: var(--fs-s); }
  .source[open] > summary { margin-bottom: var(--s3); }
  .img-view { padding: var(--s4); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); }

  /* commit header, like `git show` */
  .show {
    padding: var(--s5); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r);
    & h1 { max-width: var(--measure); overflow-wrap: anywhere; }
    & .msg { margin-top: var(--s3); white-space: pre-wrap; max-width: var(--measure); color: var(--ink-dim); font-size: var(--fs-s); }
    & .show-kv { margin-top: var(--s4); }
    & .show-kv dd { white-space: normal; overflow-wrap: anywhere; }
  }
  .diff-tools {
    display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap;
    position: sticky; top: var(--hdr-h, 0px); z-index: 5; padding: var(--s2) 0; background: var(--bg-canvas);
    & .grow { flex: 1; }
  }

  /* one file of a diff */
  .dfile { --lnw: 4ch; }
  .lnw-2 { --lnw: 2ch; } .lnw-3 { --lnw: 3ch; } .lnw-4 { --lnw: 4ch; } .lnw-5 { --lnw: 5ch; } .lnw-6 { --lnw: 6ch; } .lnw-7 { --lnw: 7ch; }
  .dfile {
    margin-top: var(--s3); scroll-margin-top: calc(var(--hdr-h, 0px) + var(--bar-h, 48px) + 8px);
    /* a file far from the screen is neither laid out nor painted: a diff of
       hundreds of files scrolls and switches layout like a short one. The
       browser remembers the last size it rendered (auto). */
    content-visibility: auto; contain-intrinsic-size: auto 480px;
    & > summary {
      /* under the diff tools, whose height --bar-h is (two lines when they
         wrap: the merge request bar on a narrow screen) */
      position: sticky; top: calc(var(--hdr-h, 0px) + var(--bar-h, 48px)); z-index: 4;
      /* a band of the page colour above the stuck header covers the gap to
         the bar over it (the space between two files, a rounded pixel), so
         the lines scrolling under it never show through */
      box-shadow: 0 calc(-1 * var(--s3)) 0 var(--bg-canvas);
      background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r) var(--r) 0 0; padding: var(--s2) var(--s3);
      font-family: var(--mono); font-size: var(--fs-s); color: var(--ink);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; list-style: none;
    }
    & > summary:hover { color: var(--ink-hi); }
    & > summary .p { color: var(--ink-hi); }
    & > summary :is(.plus, .minus) { font-size: var(--fs-xs); }
    &:not([open]) > summary { border-radius: var(--r); }
    & > summary::-webkit-details-marker { display: none; }
    & > summary::before { content: "▸ "; }
    &[open] > summary::before { content: "▾ "; }
    & .st { font-weight: bold; }
    & .p { font-weight: bold; }
    & > .note { border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r) var(--r); background: var(--bg-surface); }
  }
  .dt {
    width: max-content; min-width: 100%; font-family: var(--mono);
    font-size: var(--fs-code); line-height: var(--lh-code);
    & td { padding: 0; vertical-align: top; }
    /* the gutter is as wide as the largest line number of the file (lnw-N on
       .dfile), plus 1ch on each side */
    & .ln { width: calc(var(--lnw) + 2ch); min-width: calc(var(--lnw) + 2ch); padding: 0 1ch; text-align: right; color: var(--ink-mute); user-select: none; }
    & .tx { padding-right: var(--s4); }
    & .m { width: 2ch; text-align: center; user-select: none; color: var(--ink-dim); }
    & .tx { white-space: pre; }
    /* the hunk headers and the hidden lines stay quiet: a faint band between
       the code, so that the eye keeps reading */
    & .hunk td, & .gap td { background: color-mix(in srgb, var(--paper-alt) 35%, var(--paper)); }
    & .hunk td { color: var(--ink-mute); padding: 0 1ch; }
    /* a run of hidden lines: the whole row loads them */
    & .gap td { padding: 0; }
    & .gap button {
      display: block; width: 100%; padding: 2px 1ch; text-align: left; cursor: pointer;
      font: inherit; color: var(--ink-mute); background: none; border: 0;
      border-block: 1px dashed color-mix(in srgb, var(--border) 60%, transparent);
    }
    & .gap button:hover, & .gap button:focus-visible { color: var(--ink-hi); background: var(--bg-strong); }
    & .gap button:disabled { cursor: progress; opacity: .6; }
    & .add, & tr.add td { background: var(--add); }
    & .del, & tr.del td { background: var(--del); }
    /* the gutter of a changed line a shade stronger: the eye finds the
       change down the left edge */
    & tr.add td.ln, & td.ln.add { background: var(--add-hi); }
    & tr.del td.ln, & td.ln.del { background: var(--del-hi); }
    & .add.m, & tr.add .m { color: var(--green); font-weight: bold; }
    & .del.m, & tr.del .m { color: var(--red); font-weight: bold; }
    & tr.add .ln, & .ln.add { color: var(--green); }
    & tr.del .ln, & .ln.del { color: var(--red); }
    & .none { background: var(--paper-alt); }
  }
  .dscroll { overflow-x: auto; background: var(--bg-surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r) var(--r); }
  /* split: a fixed layout takes its widths from the colgroup (the first row is
     the hunk header, which spans all columns); long lines wrap in their half */
  .spl {
    width: 100%; table-layout: fixed;
    & .c-ln { width: calc(var(--lnw) + 2ch); } & .c-m { width: 2.5ch; }
    & .tx, & .hunk td { white-space: pre-wrap; overflow-wrap: anywhere; }
    & td.ln:nth-child(4) { border-left: 1px solid var(--border); }
  }
  #diffs[data-diff="unified"] .spl, #diffs[data-diff="split"] .uni { display: none; }

  /* diff table of contents in the rail: one line a file, the name first and
     its directory dimmed after it (cut from its start when long), the
     comments, the counts */
  .files {
    font-size: var(--fs-s); position: relative; /* the offsets of its links count from it (ermite.js) */
    & li[hidden] { display: none; }
    & a {
      /* centred, not on the baseline: the smaller counts on a baseline sit
         a pixel below the row, enough to give the list a scroll bar */
      display: grid; grid-template-columns: 1.5ch minmax(0, 1fr) auto auto; column-gap: var(--s2); align-items: center;
      height: 26px; line-height: 26px; padding: 0 var(--s2); margin: 0 calc(-1 * var(--s2));
      border-radius: 4px; border: 1px solid transparent; text-decoration: none; font-family: var(--mono); color: var(--ink);
    }
    & a:hover { background: var(--bg-raised); }
    & a:hover .p { text-decoration: underline; }
    & a[aria-current="true"] { background: var(--row); border-color: var(--ink-mute); }
    & a[aria-current="true"] .p { font-weight: bold; color: var(--ink-hi); }
    & .st { color: var(--ink-mute); font-weight: bold; }
    & .st[data-st="A"] { color: var(--green); }
    & .st[data-st="D"] { color: var(--red); }
    & .nm { overflow: hidden; white-space: nowrap; display: flex; min-width: 0; }
    /* the name gives way last: the directory shrinks first, down to its
       ellipsis, before the name is cut */
    & .nm .p { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    /* cut from the start (rtl), the path itself kept in its order (bdi) */
    & .nm .d { flex: 0 1000 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; color: var(--ink-mute); padding-left: 1ch; }
    & .nm .d bdi { direction: ltr; }
    & .cn { font: 600 var(--fs-xs) / 16px var(--font); padding: 0 6px; border-radius: 999px; background: var(--ink-hi); color: var(--on-ink); align-self: center; }
    & .cn.done { background: var(--bg-strong); color: var(--ink-dim); }
    & .n { color: var(--ink-dim); font-size: var(--fs-xs); white-space: nowrap; }
  }

  @media (max-width: 700px) {
    .diff-tools .grow { flex-basis: 100%; height: 0; }
    .file-h .acts { margin-left: 0; }
  }
  .pager { display: flex; gap: var(--s3); justify-content: center; }
  .days section[hidden] { display: none; }
  .list.refs {
    & .c-kind { color: var(--ink-mute); }
    & .c-name { font-family: var(--mono); font-size: var(--fs-s); }
  }
  /* the commit table inside a rail block: no frame of its own. The id, the
     checks and the date take the width of their text (an empty checks cell
     next to nothing); the subject takes the rest, cut at its end only. */
  .rail .list.commits {
    border: 0; border-radius: 0; background: none;
    & td { height: 34px; padding: 0 var(--s2); }
    & td:first-child { padding-left: var(--s3); }
    & td:last-child { padding-right: var(--s4); }
    & .c-who { display: none; }
    & .c-subject { font-size: var(--fs-s); }
    /* the pills are hidden here, the signature one too: the rail is narrow and
       the subject is what the row is for; the commit page shows the badge. */
    & .c-subject .pill { display: none; }
    & .c-ck:empty { padding: 0; }
    & .c-when { text-align: right; }
  }
  .rail section > p { overflow-wrap: anywhere; }
  @media (max-width: 700px) {
    /* When the subject is hidden, the ref name takes the remaining width. */
    .list.refs .c-name { width: auto; max-width: 0; }
  }
}

@layer components {
  .gallery section { margin-top: var(--s6); }
  .gallery .rule-h > :last-child { font-weight: normal; color: var(--ink-mute); order: 2; }
  .gallery .rule-h::after { order: 1; }
  .gallery .files { max-width: var(--rail); }
  .linkish { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
  .linkish:hover { text-decoration-color: currentColor; }
}

@layer components {
  /* counts and bars: + in green, - in red, everywhere a change is summarised */
  .plus { color: var(--green); }
  .minus { color: var(--red); }
}
/* 55-diff.css */
@layer components {
  /* an invisible character in code, shown instead of applied (Trojan Source) */
  .inv {
    color: var(--red); font-weight: bold; font-size: var(--fs-s);
    outline: 1px solid var(--red); outline-offset: -1px; padding: 0 2px;
  }
  .eol { color: var(--ink-mute); padding-left: 1ch; user-select: none; }
}

@layer components {
  .sel { outline: 1px solid var(--ink-dim); outline-offset: -1px; }

  /* a range of selected diff lines (shift + click) is one block: one border
     around the run, none between its lines. Each edge is an inset shadow of
     the cells; the top one only on the first line of the run, the bottom one
     only on the last. In split, each side is a block of its own. */
  .dt {
    --sel-edge: var(--ink-dim);
    & .sel { outline: none; }
    & tr.sel > td, & td.sel {
      box-shadow: var(--sel-l, 0 0 transparent), var(--sel-r, 0 0 transparent), var(--sel-t, 0 0 transparent), var(--sel-b, 0 0 transparent);
      --sel-t: inset 0 1px var(--sel-edge); --sel-b: inset 0 -1px var(--sel-edge);
    }
    /* unified: the row is selected */
    & tr.sel > td:first-child { --sel-l: inset 1px 0 var(--sel-edge); }
    & tr.sel > td:last-child { --sel-r: inset -1px 0 var(--sel-edge); }
    & tr.sel + tr.sel > td { --sel-t: 0 0 transparent; }
    & tr.sel:has(+ tr.sel) > td { --sel-b: 0 0 transparent; }
    /* split: the cells of one side (number, mark, text) are selected */
    & td.sel.ln { --sel-l: inset 1px 0 var(--sel-edge); }
    & td.sel.tx { --sel-r: inset -1px 0 var(--sel-edge); }
    & tr:has(> :nth-child(3).sel) + tr > :nth-child(-n + 3).sel,
    & tr:has(> :nth-child(6).sel) + tr > :nth-child(n + 4).sel { --sel-t: 0 0 transparent; }
    & tr:has(> :nth-child(3).sel):has(+ tr > :nth-child(3).sel) > :nth-child(-n + 3).sel,
    & tr:has(> :nth-child(6).sel):has(+ tr > :nth-child(6).sel) > :nth-child(n + 4).sel { --sel-b: 0 0 transparent; }
  }
}
/* 56-chroma.css */
/* Syntax colours of the code view. Generated by scripts/chroma-css.go from
   chroma's token classes; the colours are the --syn-* properties of
   00-tokens.css (the palette hues, dark and light), none is defined here. */
@layer components {
  .chroma { color: var(--syn-plain); }
  .chroma .c { color: var(--syn-comment); font-style: italic }
  .chroma .c1 { color: var(--syn-comment); font-style: italic }
  .chroma .ch { color: var(--syn-comment); font-style: italic }
  .chroma .cm { color: var(--syn-comment); font-style: italic }
  .chroma .cs { color: var(--syn-comment); font-style: italic }
  .chroma .dl { color: var(--syn-string); font-style: italic }
  .chroma .k { color: var(--syn-keyword); font-weight: bold }
  .chroma .kc { color: var(--syn-keyword); font-weight: bold }
  .chroma .kd { color: var(--syn-keyword); font-weight: bold }
  .chroma .kn { color: var(--syn-keyword); font-weight: bold }
  .chroma .kr { color: var(--syn-keyword); font-weight: bold }
  .chroma .nc { color: var(--syn-type); font-weight: bold }
  .chroma .ne { color: var(--syn-type); font-weight: bold }
  .chroma .nn { color: var(--syn-type); font-weight: bold }
  .chroma .ow { color: var(--syn-punct); font-weight: bold }
  .chroma .s { color: var(--syn-string); font-style: italic }
  .chroma .s1 { color: var(--syn-string); font-style: italic }
  .chroma .s2 { color: var(--syn-string); font-style: italic }
  .chroma .sa { color: var(--syn-string); font-style: italic }
  .chroma .sb { color: var(--syn-string); font-style: italic }
  .chroma .sc { color: var(--syn-string); font-style: italic }
  .chroma .sd { color: var(--syn-string); font-style: italic }
  .chroma .se { color: var(--syn-string); font-weight: bold; font-style: italic }
  .chroma .sh { color: var(--syn-string); font-style: italic }
  .chroma .si { color: var(--syn-string); font-weight: bold; font-style: italic }
  .chroma .sr { color: var(--syn-string); font-style: italic }
  .chroma .ss { color: var(--syn-string); font-style: italic }
  .chroma .sx { color: var(--syn-string); font-style: italic }
  .chroma .line { display: block; }

  /* an invisible character in code, shown instead of applied (Trojan Source) */
  .chroma .ctl {
    color: var(--red); font-weight: bold; font-style: normal; font-size: var(--fs-s);
    outline: 1px solid var(--red); outline-offset: -1px; padding: 0 .25ch;
  }
  .img-view { margin-top: var(--lh); & img { max-width: 100%; height: auto; } }
}
/* 60-mr.css */
@layer components {
  /* merge requests: the review page. Hue only where it carries a verdict. */
  .mr-h .show-kv { margin-top: 0; }
  #merge-menu .htmx-indicator { display: none; }
  #merge-menu .htmx-request .htmx-indicator { display: inline; }
  /* one card: the header (title, facts) a shade lighter, the description below */
  .mr-card {
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden;
    & > .mr-h { background: var(--bg-surface); border: 0; border-radius: 0; padding: var(--s4) var(--s5); }
    & > .mr-desc.prose { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
  }
  /* Only no-rail issues and explicitly narrow (zero-file) MRs share
     the notes' border-box width. A hidden rail must not narrow other MRs. */
  .work:not(.has-rail) > main:has(> :is(.issue-card, .mr-card.narrow)) { max-width: var(--note-w); }
  /* the facts of a merge request or an issue: one line under the title,
     "open · feat/x → main · opened by owner 2 min ago", not a table */
  .mr-h {
    & h1 { margin-bottom: var(--s2); }
    /* the title with its actions on the right (close or reopen an issue) */
    & .mr-title { display: flex; align-items: flex-start; gap: var(--s4); }
    & .mr-title h1 { flex: 1; min-width: 0; text-wrap: pretty; }
    & .mr-title-acts { flex: none; display: flex; gap: var(--s2); margin-left: auto; }
    & .mr-title-acts form { margin: 0; }
    & .mr-title-acts:empty { display: none; }
    & .show-kv {
      display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s4);
      font-size: var(--fs-s); color: var(--ink-dim);
    }
    & .show-kv dt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    & .show-kv dd { color: var(--ink-dim); white-space: nowrap; }
    & .show-kv dd a { color: var(--ink); }
    & .show-kv dd.mr-state {
      display: inline-flex; align-items: center; height: 24px; padding: 0 var(--s3); border-radius: 999px;
      font-weight: 650; color: var(--ink-hi); background: var(--bg-raised); border: 1px solid var(--border-strong);
    }
    & .show-kv dd.mr-state[data-state="open"] { color: var(--green); border-color: color-mix(in srgb, var(--green) 50%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
    & .show-kv dd.mr-state[data-state="merged"] { color: var(--green); }
    & .show-kv dd.mr-state[data-state="closed"] { color: var(--red); border-color: color-mix(in srgb, var(--red) 50%, transparent); }
    /* the label of a fact reads as a word before it */
    & .show-kv dd[data-k]::before { content: attr(data-k) " "; color: var(--ink-mute); }
    & .show-kv dd.k-branch { font-family: var(--mono); font-size: var(--fs-xs); }
  }

  .mr-footer {
    border-top: 1px solid var(--border); padding: var(--s2) var(--s5);
    background: var(--bg-surface);
    font-size: var(--fs-s);
    /* the tabs are quiet text buttons, the count in a badge; the open one
       is underlined in the accent, like the page tabs */
    & [data-mr-tabs] { display: flex; flex-wrap: wrap; gap: var(--s1); margin-inline: calc(-1 * var(--s2)); }
    & [data-mr-tabs] button {
      display: inline-flex; align-items: center; gap: var(--s2); height: 30px;
      padding: 0 var(--s2); border: 0; border-radius: var(--r-s);
      color: var(--ink-dim); font-weight: 600; text-decoration: none; cursor: pointer;
    }
    & [data-checks-label] { color: var(--ink-dim); font-size: var(--fs-xs); }
    & [data-mr-tabs] .count { margin-left: 0; color: var(--ink-hi); background: var(--bg-canvas); box-shadow: inset 0 0 0 1px var(--border); }
    & [data-mr-tabs] button:hover { background: var(--bg-raised); color: var(--ink-hi); }
    & [data-mr-tabs] button[aria-expanded="true"] { color: var(--ink-hi); box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--r-s) var(--r-s) 0 0; }
    & [data-mr-panel] { padding-block-start: var(--s2); overflow-x: auto; }
    & [hidden] { display: none; }
    /* Without scripts both panels remain visible; disclosure controls use data-js. */
    & section h2 { font-size: var(--fs-s); color: var(--ink-dim); }
    & table { width: 100%; border-collapse: collapse; }
    & .mr-commits { table-layout: auto; }
    & .mr-commits td { width: 1%; white-space: nowrap; }
    & .mr-commits .c-main { width: auto; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
    & th, & td { text-align: left; padding: var(--s2); border-bottom: 1px solid var(--border); }
    & th { color: var(--ink-dim); font-weight: 500; }
    & tbody tr:last-child > :is(td, th) { border-bottom: 0; }
  }
  .merge-settings { font-size: var(--fs-s); color: var(--ink-dim); }
  .merge-settings h2 { font-size: var(--fs-s); }

  .mr-state[data-state="open"]::before { content: "●\00a0"; color: var(--green); }
  .mr-state[data-state="merged"]::before { content: "✓ "; color: var(--green); }
  .mr-state[data-state="closed"]::before { content: "✗ "; color: var(--red); }
  .mr-state[data-state="draft"]::before { content: "◌ "; color: var(--ink-dim); }
  /* the description: Markdown as a README, as wide as the header card above;
     the text inside keeps the reading measure */
  .mr-desc.prose { max-width: none; padding: var(--s4) var(--s5); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); }
  .mr-desc.prose > * { max-width: var(--measure); }
  .mr-desc.prose > pre, .mr-desc.prose > table { max-width: 100%; }

  .list.mrs .c-ck:empty { padding: 0; }

  .list-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
    & > .since { margin-right: auto; }
  }

  .since {
    display: inline-flex; flex-wrap: wrap; gap: var(--s1); padding: var(--s1);
    background: var(--bg-raised); border-radius: var(--r-s);
    & a { padding: var(--s1) var(--s3); border-radius: 4px; text-decoration: none; color: var(--ink-dim); font-size: var(--fs-s); }
    & a:hover { color: var(--ink-hi); }
    & a[aria-current] { color: var(--ink-hi); font-weight: 700; background: var(--bg-surface); box-shadow: 0 0 0 1px var(--border-strong); }
    & .mute { font-weight: 400; font-family: var(--mono); }
  }

  /* the bar above the diff of a merge request: the diff tools, the checks and
     the menus of the owner, on one line that follows the review */
  /* the checks and the menus stay on the right, also when they wrap under the
     diff tools; mr.js measures the height of the bar (--mr-bar-h) */
  body:has(.mr-bar) { --bar-h: var(--mr-bar-h, 48px); }
  .mr-bar {
    gap: var(--s2);
    & .mr-acts { display: flex; gap: var(--s2); align-items: center; margin-left: auto; }
    & .mr-ck { margin-left: 0; height: 32px; padding: 0 var(--s2); border-radius: var(--r-s); text-decoration: none; color: var(--ink-dim); font-size: var(--fs-s); }
    & .mr-ck:hover { background: var(--bg-raised); color: var(--ink-hi); }
  }

  /* a menu of the bar: a <details> whose panel opens under its button */
  .menu {
    position: relative;
    & > summary { list-style: none; }
    & > summary::-webkit-details-marker { display: none; }
    & > summary.primary::after { content: ""; width: 0; height: 0; margin-left: 2px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
    & .menu-pop {
      position: absolute; right: 0; top: calc(100% + var(--s1)); z-index: 6; width: 320px; max-width: calc(100vw - 2 * var(--pad));
      display: grid; gap: var(--s3); padding: var(--s3) var(--s4);
      background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: 0 8px 24px rgb(0 0 0 / .18);
      font-size: var(--fs-s);
    }
    & .kv { margin: 0; }
  }
  /* the view menu of a diff: the layout and the fold, one row each */
  .vmenu {
    & > summary::after { content: ""; width: 0; height: 0; margin-left: 2px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
    & .menu-pop { left: 0; right: auto; width: 220px; gap: var(--s1); padding: var(--s2); }
    & .menu-pop .btn { width: 100%; justify-content: flex-start; border-color: transparent; background: none; }
    & .menu-pop .btn:hover { background: var(--bg-raised); }
    & .menu-pop .btn[aria-current="true"] { background: var(--bg-raised); color: var(--ink-hi); }
    & .menu-pop .btn kbd { margin-left: auto; }
  }
  .mmenu {
    & .menu-pop { box-sizing: border-box; min-width: 0; overflow-wrap: anywhere; }
    & .menu-pop > *, & form, & .d-modes, & .d-btns { min-width: 0; max-width: 100%; box-sizing: border-box; }
    & .d-acts { display: grid; gap: var(--s3); }
    & .d-modes label, & .d-check { min-width: 0; }
    & code { overflow-wrap: anywhere; }
    & .d-btns .btn { min-width: 0; max-width: 100%; white-space: normal; }
    & .d-modes { display: grid; gap: var(--s1); border: 0; padding: 0; margin: 0; }
    & .d-modes label, & .d-check {
      display: flex; gap: var(--s2); align-items: center; padding: 4px var(--s2); margin: 0 calc(-1 * var(--s2));
      border-radius: var(--r-s); color: var(--ink); cursor: pointer;
    }
    & .d-modes label:hover, & .d-check:hover { background: var(--bg-raised); }
    & .d-modes label:has(:checked) { background: var(--bg-raised); color: var(--ink-hi); font-weight: 600; }
    & .d-modes kbd, & .d-check kbd { margin-left: auto; }
    & input { accent-color: var(--ink-hi); margin: 0; }
    & .d-check { color: var(--ink-dim); }
    & .d-btns { display: flex; margin-top: var(--s1); }
    & .d-btns .btn { flex: 1; justify-content: center; }
    & .d-draft { color: var(--ink-dim); }
    & .d-note { margin: 0; color: var(--ink-dim); }
    & .d-err { margin: 0; padding: var(--s2) var(--s3); color: var(--ink-hi); border: 1px solid var(--red); border-radius: var(--r-s); overflow-wrap: anywhere; }
    /* the badge is a live slot, but not a banner */
    & #mr-mergeability:not(:empty) { padding: 0; font-weight: normal; background: none; border: 0; display: grid; gap: var(--s1); }
    & .mg-paths { margin: 0; padding-left: 2ch; max-height: 8em; overflow: auto; }
    & .mg-paths code { overflow-wrap: anywhere; }
    & .d-modes label:has(:disabled) { color: var(--ink-mute); cursor: not-allowed; }
    & .d-modes label:has(:disabled):hover { background: none; }
    & .btn:disabled { opacity: .5; cursor: not-allowed; }
  }
  .badge[data-state] { display: inline-block; padding: 0 var(--s2); border: 1px solid var(--border-strong); border-radius: var(--r-s); font-weight: 600; color: var(--ink-hi); }
  .badge[data-state="up_to_date"] { border-color: var(--green); color: var(--green); }
  .badge[data-state="behind"] { border-color: var(--green-2); }
  .badge[data-state="conflict"] { border-color: var(--red); color: var(--red); }
  .badge[data-state="checking"] { color: var(--ink-dim); border-style: dashed; }
  .note[role="status"] { color: var(--ink-dim); }
  .omenu {
    & > summary { font-size: 18px; line-height: 1; }
    & .menu-pop { width: 280px; }
    & form .btn { width: 100%; justify-content: flex-start; }
    & .btn kbd { margin-left: auto; }
    & .d-or > summary { cursor: pointer; list-style: none; color: var(--ink-mute); }
    & .d-or > summary::-webkit-details-marker { display: none; }
    & .d-or > summary::before { content: "▸ "; }
    & .d-or[open] > summary::before { content: "▾ "; }
    & .d-or > summary:hover { color: var(--ink-hi); }
    & .d-or[open] > .clone { margin-top: var(--s2); }
    & .clone code { white-space: pre-wrap; overflow-wrap: anywhere; }
    & #mr-signing code { overflow-wrap: anywhere; }
  }

  /* the rail of a merge request follows the review: it sticks under the
     header, one screen high, and scrolls on its own to its verdicts. The list of files keeps its own scroll, under a height, so
     that the blocks below it stay in reach. Only on a two-column layout. */
  @media (width > 720px) {
    .rail:has(.r-files) {
      position: sticky; top: calc(var(--hdr-h, 0px) + var(--s4));
      max-height: calc(100dvh - var(--hdr-h, 0px) - var(--s4) * 2);
      overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    }
    /* the blocks keep their height: the rail scrolls, it does not squeeze them */
    .rail:has(.r-files) > * { flex: none; }
  }
  .rail .r-files > .files { max-height: 55dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .r-files {
    & > h2 kbd { margin-left: auto; }
    & > h2 .fold { width: 24px; height: 24px; margin: -2px -6px -2px 0; background: none; border-color: transparent; color: var(--ink-dim); }
    & > h2 .fold:hover { color: var(--ink-hi); border-color: var(--border-strong); }
    & > h2 .fold .ico { transition: transform .15s; }
    &[data-folded] > h2 { border-bottom: 0; }
    &[data-folded] > h2 .fold .ico { transform: rotate(-90deg); }
    &[data-folded] > :not(h2) { display: none; }
    & > .ffilter { margin: var(--s2) 0 0; }
    & > .ffilter input {
      width: 100%; height: 30px; padding: 0 var(--s2); font: inherit; font-size: var(--fs-s); color: inherit;
      background: var(--bg-inset); border: 1px solid var(--border-strong); border-radius: var(--r-s);
    }
    /* rows keep their own padding: the list bleeds by it so the text of a
       row lines up with the title and the filter */
    & > .files { margin: var(--s2) 0 !important; padding: 0 var(--s2); margin-inline: calc(-1 * var(--s2)) !important; }
  }

  /* the verdicts of the rail: who, then the verdict as a coloured word */
  .verdicts {
    display: grid; gap: var(--s1); font-size: var(--fs-s);
    & li { display: flex; align-items: center; gap: var(--s2); }
    & a { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s1) var(--s2); margin: 0 calc(-1 * var(--s2)); border-radius: var(--r-s); text-decoration: none; }
    & a:hover { background: var(--bg-raised); }
    & .v-who { font-weight: 600; color: var(--ink-hi); overflow: hidden; text-overflow: ellipsis; }
    & .v-label { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-dim); white-space: nowrap; }
    & li[data-verdict="approve"] .v-label { color: var(--green); }
    & li[data-verdict="approve"] .v-label::before { content: "✓ "; }
    & li[data-verdict="changes_requested"] .v-label { color: var(--red); }
    & li[data-verdict="changes_requested"] .v-label::before { content: "✕ "; }
    & li[data-stale] .v-label { opacity: .6; }
  }

  /* a file of the diff whose window is not loaded yet: about its room */
  .dlazy {
    display: flex; align-items: center; justify-content: center;
    background: repeating-linear-gradient(var(--bg-surface) 0 var(--lh-code), var(--paper-alt) var(--lh-code) calc(var(--lh-code) * 2));
    border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r) var(--r);
    font-size: var(--fs-s);
    & a { color: var(--ink-mute); }
    &.dlazy-1 { height: 120px; } &.dlazy-2 { height: 360px; } &.dlazy-3 { height: 900px; } &.dlazy-4 { height: 1600px; }
    /* with scripts the window comes by itself: the link of the page without
       scripts would only flash */
    html.js &:not([data-manual]) > a { visibility: hidden; }
    &[data-manual] { height: auto; padding: var(--s3); }
    &[data-manual][data-loading] > a { opacity: .5; }
    & .notice { margin: 0; }
  }
  .dloose {
    padding: var(--s2) var(--s3) var(--s3); background: var(--bg-surface);
    border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r) var(--r);
  }

  .pcommits { font-size: var(--fs-s); display: grid; gap: var(--s1); }
  .pcommits li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px var(--s2); margin: 0 calc(-1 * var(--s2)); border-radius: 4px; }
  .pcommits li a { font-family: var(--mono); }
  .pcommits li[data-new] { background: var(--bg-raised); }
  .pcommits .s { color: var(--ink); }


  /* a note: one framed thread. A header line (who, when, badges, and the
     actions on the right), the body, the replies under a rule, then one
     quiet Reply line. The actions use muted ink until the note is hovered or
     holds the focus, so that the text reads first. */
  .cmt {
    --c-x: var(--s4);
    margin-top: var(--s3); max-width: var(--note-w);
    background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r);
    white-space: normal; font-family: var(--font); font-size: var(--fs-m); line-height: 1.6;
    & p { white-space: normal; }
    & > .c-head {
      display: flex; align-items: center; gap: var(--s2); min-height: 40px;
      padding: var(--s1) var(--s2) var(--s1) var(--c-x);
    }
    & .c-meta {
      flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2);
      font-size: var(--fs-s); line-height: 20px; color: var(--ink-mute);
    }
    & .c-who { font-weight: 650; color: var(--ink-hi); }
    & .c-when { color: var(--ink-mute); text-decoration: none; }
    & .c-when:hover { color: var(--ink-hi); text-decoration: underline; }
    & .c-where { font-family: var(--mono); font-size: var(--fs-xs); overflow-wrap: anywhere; }
    & .c-tag { font-size: var(--fs-xs); }
    & .c-state[data-state="resolved"] { color: var(--green); border-color: transparent; padding-inline: 0; }
    & .c-state[data-state="resolved"]::before { content: "✓"; }

    & .c-tools { display: flex; align-items: center; gap: 2px; flex: none; }
    & .c-tools form { margin: 0; }
    & > .c-head .c-tools { color: var(--ink-mute); }
    & > .c-head .c-tools > .c-menu > summary,
    & > .c-head .c-tools .c-resolve .btn { color: inherit; }
    &:is(:hover, :focus-within) > .c-head .c-tools { color: var(--ink-hi); }
    & .c-menu .menu-pop { width: 190px; gap: 2px; padding: var(--s1); }
    & .c-menu .menu-pop .btn { width: 100%; justify-content: flex-start; border-color: transparent; background: none; font-weight: 500; }
    & .c-menu .menu-pop .btn:hover { background: var(--bg-raised); }
    & .c-menu .menu-pop .btn .ico { color: var(--ink-mute); }
    & .c-menu .menu-pop .btn.danger:hover, & .c-menu .menu-pop .btn.danger:hover .ico { color: var(--red); }

    & > .c-body, & > .c-text, & > p.mute { padding: 0 var(--c-x) var(--s3); margin: 0; }
    & > .c-body > * { max-width: var(--measure); }
    & > .c-body > pre { max-width: 100%; }
    & > .c-body > :first-child { margin-top: 0; }
    & > .c-body > :last-child { margin-bottom: 0; }
    & .c-body pre { font-size: var(--fs-code); }

    /* edit / delete: opened from the menu; without scripts, plain disclosures */
    & > .c-fold { padding: 0 var(--c-x); }
    & > .c-fold > summary { font-size: var(--fs-s); color: var(--ink-mute); padding-bottom: var(--s2); }
    & > .c-fold[open] { padding-bottom: var(--s3); }
    html.js & > .c-fold > summary { display: none; }
    html.js & > .c-fold:not([open]) { display: none; }
    & .c-edit { display: grid; gap: var(--s2); }
    & .c-edit textarea { width: 100%; min-height: 6lh; }
    & .c-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); border: 1px solid color-mix(in srgb, var(--red) 50%, var(--border)); border-radius: var(--r-s); }
    & .c-confirm p { flex: 1; margin: 0; }

    /* replies: one ruled list inside the root */
    & > [data-replies]:not(:empty) { border-top: 1px solid var(--border); }
    & > [data-replies] > .cmt {
      margin: 0; max-width: none; border: 0; border-radius: 0; background: none;
      border-top: 1px solid var(--border);
      &:first-child { border-top: 0; }
      & > .c-head { padding-left: calc(var(--c-x) + var(--s3)); }
      & > :is(.c-body, .c-text, p.mute, .c-fold) { padding-left: calc(var(--c-x) + var(--s3)); }
    }
    & > .c-reply { border-top: 1px solid var(--border); }
    & > .c-reply > summary {
      display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--c-x);
      font-size: var(--fs-s); color: var(--ink-mute); list-style: none; border-radius: 0 0 var(--r) var(--r);
    }
    & > .c-reply > summary::-webkit-details-marker { display: none; }
    & > .c-reply > summary:hover { color: var(--ink-hi); background: var(--bg-raised); }
    & > .c-reply > div { padding: var(--s3) var(--c-x); }
    & > .c-reply .cform { margin: 0; max-width: none; }

    &[data-resolved="true"] .c-body { color: var(--ink-dim); }
    & .cmt .c-unfold { display: none; }
    & .c-unfold { font-size: var(--fs-xs); color: var(--ink-mute); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; cursor: pointer; }
    /* a resolved root thread folds to its header line (comments.js); the
       button unfolds it */
    html.js &[data-resolved="true"]:not([data-open]):not(.cmt .cmt) {
      background: none;
      & > :not(.c-head) { display: none; }
    }
    &:target, &:has(> .c-head :target) { border-color: var(--ink-mute); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
  }
  /* the notes under a diff line: on the canvas, aligned with the code */
  .dt .fnote td { background: var(--bg-canvas); padding: var(--s3) var(--s4) var(--s3) var(--s3); white-space: normal; font-family: var(--font); }
  .dt .fnote .cmt, .dt .fnote .cform { margin: 0; }
  .dt .fnote .cmt + .cmt, .dt .fnote .cmt + .cform { margin-top: var(--s3); }
  .ln a { color: inherit; text-decoration: none; }
  .ln a:hover, .ln a:focus-visible { text-decoration: underline; color: var(--ink-hi); }

  /* small, quiet buttons: the actions of a note */
  .btn.sm { height: 28px; padding: 0 var(--s2); font-size: var(--fs-xs); gap: 6px; }
  .btn.sm.icon { width: 28px; padding: 0; }
  .btn.sm .ico { width: 14px; height: 14px; }
  .btn.ghost { background: none; border-color: transparent; color: var(--ink-dim); }
  .btn.ghost:hover { background: var(--bg-raised); color: var(--ink-hi); }
  .btn.danger:not(.ghost):not(:hover) { color: var(--red); }
  .i-more { --i: url(/-/static/icons/more.b7c6fccf9c15.svg); }
  .i-check { --i: url(/-/static/icons/check.7d5fedc46e0f.svg); }
  .i-circle-check { --i: url(/-/static/icons/circle-check.30c6baf69072.svg); }
  .i-reply { --i: url(/-/static/icons/reply.d2200901d788.svg); }
  .i-quote { --i: url(/-/static/icons/quote.a4fd6f265f51.svg); }
  .i-pencil { --i: url(/-/static/icons/pencil.209adc00f9d9.svg); }
  .i-trash { --i: url(/-/static/icons/trash.e8c29ca298c7.svg); }

  .cmt .c-state, .c-verdict {
    display: inline-flex; align-items: center; height: 20px; padding: 0 var(--s2); gap: 4px;
    font-size: var(--fs-xs); font-weight: 600; border-radius: 999px; white-space: nowrap;
    color: var(--ink-dim); border: 1px solid var(--border-strong);
  }
  .c-verdict[data-verdict="approve"] { color: var(--green); border-color: color-mix(in srgb, var(--green) 55%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
  .c-verdict[data-verdict="changes_requested"] { color: var(--red); border-color: color-mix(in srgb, var(--red) 55%, transparent); background: color-mix(in srgb, var(--red) 10%, transparent); }
  .c-verdict[data-verdict="approve"]::before { content: "✓"; }
  .c-verdict[data-verdict="changes_requested"]::before { content: "✕"; }

  #mr-verdict-fact .c-verdict { text-decoration: none; }
  #mr-verdict-fact .c-verdict[data-verdict="approve"] { color: var(--green); }
  #mr-verdict-fact .c-verdict[data-verdict="changes_requested"] { color: var(--red); }

  /* the forms: a comment, a new merge request */
  .cform {
    display: grid; gap: var(--s2); margin-top: var(--s3); max-width: var(--note-w);
    font-family: var(--font); font-size: var(--fs-s);
    & label { color: var(--ink-dim); font-weight: 600; }
    & .f-title { color: var(--ink-hi); font-size: var(--fs-s); }
    & .f-title::first-letter { text-transform: uppercase; }
    & textarea, & input[type="text"] {
      display: block; width: 100%; font: inherit; font-size: var(--fs); color: inherit; resize: vertical;
      background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-s); padding: var(--s2) var(--s3);
    }
    & textarea::placeholder { color: var(--ink-mute); opacity: 1; }
    & .f-btns { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s1); }
    & .f-btns:has([value=changes_requested]:checked) .btn.primary { background: var(--red); color: var(--on-ink); }
    & .f-hint { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); color: var(--ink-mute); }
    & .f-hint kbd { font-size: var(--fs-2xs); line-height: 16px; min-width: 0; }
    @media (hover: none) { & .f-hint { display: none; } }
    /* the first line of a range: a small inline number field */
    & .f-range-d { font-size: var(--fs-xs); color: var(--ink-mute); }
    & .f-range-d > summary { cursor: pointer; }
    & .f-range-d[open] > summary { margin-bottom: var(--s2); }
    & .f-range { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 400; color: var(--ink-mute); font-size: var(--fs-xs); }
    & .f-range input {
      width: 9ch; height: 26px; padding: 0 var(--s2); font: var(--fs-xs) var(--mono); color: var(--ink);
      background: var(--bg-inset); border: 1px solid var(--border-strong); border-radius: 4px;
    }
    /* the verdict of a general comment: a segmented control */
    & .f-verdict {
      display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 2px; margin: 0; min-width: 0;
      border: 1px solid var(--border-strong); border-radius: var(--r-s); background: var(--bg-inset);
      & legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
      & label {
        display: inline-flex; align-items: center; height: 28px; padding: 0 var(--s3); border-radius: 4px;
        font-weight: 600; font-size: var(--fs-xs); color: var(--ink-dim); cursor: pointer;
      }
      & label:hover { color: var(--ink-hi); }
      & input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
      & label:has(:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
      & label:has(:checked) { background: var(--bg-strong); color: var(--ink-hi); box-shadow: 0 0 0 1px var(--border-strong); }
      & label[data-verdict="approve"]:has(:checked) { color: var(--green); box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 60%, transparent); }
      & label[data-verdict="changes_requested"]:has(:checked) { color: var(--red); box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 60%, transparent); }
    }
  }

  /* the public issue form: counters, field errors, the honeypot out of sight */
  .cform output { justify-self: end; font: var(--fs-s) var(--mono); color: var(--ink-mute); }
  .cform output.warn { color: var(--ink-hi); font-weight: 700; }
  .cform output.over { color: var(--red); font-weight: 700; }
  .cform .f-error { color: var(--red); margin: 0; }
  .cform .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

  /* the Dependencies page: one collapsible row per repository
     (.deps-repo-row); inside, the patch and minor batch then the majors, one
     .deps-row each: its updates under its summary, the status and the actions
     in the other columns of the grid, a failure (.deps-failure) below. */
  #deps > .rule-h { flex-wrap: wrap; }
  .deps-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-block-end: var(--s2); }
  .deps-filters { display: flex; flex-wrap: wrap; gap: var(--s2); }
  .deps-chip { text-decoration: none; & .count { margin-left: 0; } }
  .deps-chip[aria-current] { color: var(--ink-hi); border-color: var(--accent); font-weight: 700; }
  .deps-sort { display: flex; gap: var(--s2); justify-content: flex-end; font-size: var(--fs-s); }
  .deps-sort a { color: var(--ink-dim); text-decoration: none; }
  .deps-sort a:hover { color: var(--ink-hi); }
  .deps-sort a[aria-current] { color: var(--ink-hi); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
  .deps-repos, .deps-rows { display: grid; list-style: none; padding: 0; margin: 0; }
  .deps-repos { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); }
  .deps-repo-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: var(--s2) var(--s3);
    border-top: 1px solid var(--border);
    &:first-child { border-top: 0; }
    & > .deps-main { min-width: 0; }
    & > .deps-main > summary { min-height: 32px; }
    & .deps-repo { color: var(--ink-hi); font-weight: 600; overflow-wrap: anywhere; }
    & .deps-failed { display: inline-flex; align-items: center; gap: var(--s1); color: color-mix(in srgb, var(--red) 80%, var(--ink-dim)); }
    & .deps-failed .ck { margin-right: 0; }
    & .deps-repo-act { display: flex; align-items: center; gap: var(--s2); }
    & .deps-repo-act form { margin: 0; }
    & .deps-body { padding-left: calc(1ch + var(--s2)); }
    & .deps-group-h { margin: var(--s2) 0 var(--s1); font-size: var(--fs-s); color: var(--ink-dim); font-weight: 600; }
  }
  .deps-repo-row, .deps-row {
    & details:not(.menu) > summary {
      display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); cursor: pointer; list-style: none;
      &::-webkit-details-marker { display: none; }
      &::before { content: "▸" / ""; width: 1ch; color: var(--ink-mute); }
    }
    & details:not(.menu)[open] > summary::before { content: "▾" / ""; }
    & .count, & .pill { margin-left: 0; }
  }
  .deps-row {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 16rem) 10rem; gap: var(--s3); align-items: start; padding: var(--s1) 0;
    border-top: 1px solid var(--border);
    &:first-child { border-top: 0; }
    & > .deps-batch { min-width: 0; }
    & > .deps-batch > summary { min-height: 32px; }
    & .deps-title { color: var(--ink-hi); overflow-wrap: anywhere; }
    & .deps-pkgs { overflow-wrap: anywhere; font-size: var(--fs-s); }
    & .deps-target { white-space: nowrap; }
    & .deps-sub {
      width: 100%; margin: var(--s1) 0 var(--s2); border-collapse: collapse; font-size: var(--fs-s);
      & td { padding: 2px var(--s3) 2px 0; vertical-align: baseline; overflow-wrap: anywhere; }
      & td:first-child { padding-left: calc(1ch + var(--s2)); }
      & td:nth-child(2), & td:nth-child(3), & td:nth-child(4) { white-space: nowrap; }
    }
    & .deps-status { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); min-height: 32px; font-size: var(--fs-s); }
    & .deps-state, & .deps-mr { display: inline-flex; align-items: center; gap: var(--s2); }
    & .deps-state .ck { margin-right: 0; }
    & .deps-act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--s2); }
    & .deps-act form { margin: 0; }
    & .deps-failure { grid-column: 1 / -1; margin: 0 0 var(--s2); font-size: var(--fs-s); }
    & .deps-failure > p { margin: var(--s2) 0 var(--s1); }
    & .deps-failure > pre {
      margin: 0 0 var(--s2); padding: var(--s2); max-height: 20rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
      font: var(--fs-s)/var(--lh-code) var(--mono); background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r);
    }
    & .deps-failure > .deps-error { border-color: var(--red); }
  }
  .deps-menu .menu-pop { width: 170px; gap: var(--s1); padding: var(--s2); }
  .deps-menu .menu-pop .btn { width: 100%; justify-content: flex-start; border-color: transparent; background: none; }
  .deps-menu .menu-pop .btn:hover { background: var(--bg-raised); }
  .deps-menu .menu-pop form { margin: 0; }

  .list.mrs {
    & tr[data-state="open"] .c-state { font-weight: bold; }
    & tr[data-state="open"] .c-state::before { content: "● "; color: var(--green); }
    & tr[data-state="merged"] .c-state::before { content: "✓ "; color: var(--green); }
    & tr[data-state="closed"] .c-state::before { content: "✗ "; color: var(--red); }
  }
  #mr-notice:empty { display: none; }

  /* the journal of Activity and Insights: a heading with the range toggle, warnings as lines,
     then a bare table (no box: hairlines between rows only) */
  .journal {
    & .journal-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s4); }
    & .journal-head .rule-h { margin-block-end: 0; }
    /* the count of the heading: plain muted figures, not a pill */
    & .journal-count { font-size: var(--fs-s); font-weight: 400; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
    & .journal-range { display: inline-flex; gap: var(--s2); font-size: var(--fs-s); }
    & .journal-range a { color: var(--ink-dim); text-decoration: none; }
    & .journal-range a:hover { color: var(--ink-hi); }
    & .journal-range a[aria-current] { color: var(--ink-hi); font-weight: 700; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
    & .unreleased { margin: var(--s3) 0 0; font-size: var(--fs-s); display: grid; gap: var(--s1); }
    & .unreleased li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s2); }
    & .unreleased a { text-decoration: none; }
    & .unreleased a:hover { text-decoration: underline; }
    & .unreleased-group { margin-top: var(--s3); --urgency: var(--ink-mute); }
    & .unreleased-group[data-level="due"] { --urgency: var(--red); }
    & .unreleased-group[data-level="soon"] { --urgency: light-dark(#805b00, #d9ad50); }
    & .unreleased-group summary { cursor: pointer; font-size: var(--fs-s); font-weight: 600; color: var(--urgency); }
    & .unreleased-group summary .num { margin-left: var(--s2); }
    & .u-age { flex: 0 0 5ch; text-align: right; font-variant-numeric: tabular-nums; }
    & .u-mark { color: var(--urgency); }
    & .u-repo { color: var(--ink-hi); font-weight: 600; }
    & .u-tag, & .j-ref { font-family: var(--mono); font-size: var(--fs-s); }
    & .journal-more { margin-top: var(--s2); font-size: var(--fs-s); }
  }
  .list.journal-list {
    margin-top: var(--s3); background: none; border: 0; border-radius: 0;
    font-variant-numeric: tabular-nums;
    & th { height: 32px; padding-inline: 0 var(--s4); text-align: left; background: none; }
    & td { height: 36px; padding-inline: 0 var(--s4); }
    & th:last-child, & td:last-child { padding-inline-end: 0; }
    & tbody tr:first-child td { border-top: 1px solid var(--border); }
    & tbody tr:hover { background: none; }
    & .c-repo a { color: var(--ink); }
    & .c-main a { color: var(--ink-hi); }
    & .c-main a:hover { text-decoration: underline; }
    & .j-ref { color: var(--ink-dim); }
    & .j-kind { font-size: var(--fs-xs); color: var(--ink-dim); }
    & tr:is([data-kind="mr_merged"], [data-kind="release_published"], [data-kind="tag_created"]) .j-kind { color: var(--green); }
    & tr:is([data-kind="mr_closed"], [data-kind="tag_deleted"]) .j-kind { color: var(--red); }
  }

  @media (max-width: 700px) {
    .list.mrs .c-who, .list.journal-list .c-who { display: none; }
    .list.journal-list .c-main { white-space: normal; overflow-wrap: anywhere; padding-block: var(--s2); }
  }
}

@layer components {
  .timeline { list-style: none; padding: 0; margin: 0; }
  .sys { margin-block: var(--s3); padding: var(--s2) var(--s3); border-left: 2px solid var(--border); color: var(--ink-dim); font-size: var(--fs-s); overflow-wrap: anywhere; }
  .sys-icon { margin-inline-end: var(--s2); }
  .sys[data-kind="resolved"] .sys-icon { color: var(--green); }
  .sys[data-kind="closed"] .sys-icon { color: var(--red); }
  .mr-state[data-state="resolved"]::before { content: "✓ "; color: var(--green); }
  .mrs tr[data-state="resolved"] .c-state::before { content: "✓ "; color: var(--green); }

  .c-body { white-space: normal; overflow-wrap: anywhere; }
  /* the counts of the comments heading: the total, then the unresolved */
  .rule-h .c-counts { display: inline-flex; align-items: center; gap: var(--s3); }
  .rule-h .c-open { display: inline-flex; align-items: center; gap: var(--s1); font: 500 var(--fs-xs) / 1 var(--font); color: var(--ink-mute); letter-spacing: 0; }
  .rule-h .c-open::before { content: "·"; }
  .rule-h .c-open .count { margin-left: 0; min-width: 0; background: none; box-shadow: none; padding: 0; color: inherit; }
  .rule-h .c-open:has([data-count="0"]) { color: var(--ink-mute); }
  .c-body.prose > * { margin-block: .5em; }
  .c-body .ref { font-variant-numeric: tabular-nums; text-decoration: underline; }
}
/* 61-md-editor.css */
@layer components {
  /* one block: the toolbar is the header strip of the field */
  .md-editor {
    min-width: 0; width: 100%; max-width: var(--note-w); background: var(--bg-surface);
    border: 1px solid var(--border-strong); border-radius: var(--r-s); overflow: clip;
  }
  /* the field's focus ring is drawn around the whole block */
  .md-editor:has(textarea:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
  .md-toolbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: var(--s1);
    border-bottom: 1px solid var(--border); background: var(--bg-inset);
  }
  .md-toolbar button {
    display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
    background: transparent; color: var(--ink-dim); border: 0; border-radius: var(--r-s); cursor: pointer;
  }
  .md-toolbar button::before { content: ""; width: 16px; height: 16px; background: currentColor; mask: var(--i) center / contain no-repeat; }
  .md-toolbar button:hover { color: var(--ink-hi); background: var(--bg-raised); }
  .md-toolbar button:active { background: var(--bg-strong); }
  .md-toolbar button:focus-visible { outline-offset: -2px; }
  .md-sep { width: 1px; height: 16px; margin: 0 var(--s1); background: var(--border-strong); }
  .md-i-heading { --i: url(/-/static/icons/md-heading.7412cc307ab5.svg); }
  .md-i-bold { --i: url(/-/static/icons/md-bold.5ed71405fddd.svg); }
  .md-i-italic { --i: url(/-/static/icons/md-italic.1e6945403563.svg); }
  .md-i-code { --i: url(/-/static/icons/md-code.59a2d1667262.svg); }
  .md-i-fence { --i: url(/-/static/icons/md-fence.4aa3a1aa38c8.svg); }
  .md-i-link { --i: url(/-/static/icons/md-link.3d9eec9dc99c.svg); }
  .md-i-quote { --i: url(/-/static/icons/md-quote.fe80ec413daa.svg); }
  .md-i-bullet { --i: url(/-/static/icons/md-bullet.c61610a4a9d7.svg); }
  .md-i-number { --i: url(/-/static/icons/md-number.261c38bb389e.svg); }
  .md-i-task { --i: url(/-/static/icons/md-task.c1e77ec9c48b.svg); }
  .md-surface { position: relative; min-width: 0; }
  .md-surface .md-backdrop, .md-surface textarea {
    box-sizing: border-box; margin: 0; width: 100%; padding: var(--s2) var(--s3);
    font: var(--fs)/1.6 var(--mono); letter-spacing: 0; tab-size: 4;
    scrollbar-gutter: stable; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal;
    border: 0; border-radius: 0;
  }
  .md-surface .md-backdrop { position: absolute; inset: 0; height: 100%; overflow: auto; scrollbar-width: auto; pointer-events: none; color: var(--ink); background: transparent; }
  .md-surface textarea { position: relative; display: block; color: transparent; caret-color: var(--ink-hi); background: transparent; resize: vertical; }
  .md-surface textarea:focus-visible { outline: none; }
  .md-surface textarea::selection { background: var(--bg-strong); color: var(--ink); }
  .md-marker { color: var(--ink-mute); }
  .md-heading, .md-bold { font-weight: 700; color: var(--ink-hi); }
  .md-italic { font-style: italic; }
  .md-code { background: var(--bg-raised); }
  .md-quote { color: var(--ink-dim); }
  .md-link { color: var(--accent); }
  @media (forced-colors: active) {
    .md-surface textarea { color: CanvasText; }
    .md-backdrop { visibility: hidden; }
    .md-toolbar button::before { background: ButtonText; }
  }
}
/* 65-ci.css */
@layer components {
  /* CI: runs, jobs, steps, checks and the log. Hue only where it carries a
     verdict, and every mark has its word beside it or in its label. */
  .ck {
    display: inline-block; width: 14px; height: 14px; margin-right: var(--s1); vertical-align: -2px;
    border: 2px solid var(--ink-dim); border-radius: 50%; box-sizing: border-box; flex: none;
  }
  .ck-ok { background: var(--green); border-color: var(--green); }
  .ck-bad { background: var(--red); border-color: var(--red); border-radius: 3px; transform: rotate(45deg) scale(.85); }
  .ck-cancelled { border-style: dashed; }
  .ck-skipped { border-color: var(--border-strong); background: var(--bg-raised); }
  .ck-queued { border-style: dotted; }
  .ck-running { border-color: var(--green); border-top-color: transparent; animation: ck-spin 1s linear infinite; }
  @keyframes ck-spin { to { transform: rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .ck-running { animation: none; border-top-color: var(--green); } }

  .ck-sum { display: inline-flex; align-items: center; gap: var(--s1); margin-left: var(--s2); font-size: var(--fs-xs); white-space: nowrap; }
  /* the recent runs of the summary rail */
  .rruns {
    display: grid; padding: 0; list-style: none; font-size: var(--fs-s);
    & li { display: flex; align-items: center; gap: var(--s1); min-width: 0; padding: 2px 0; }
    & .ck { margin-right: var(--s1); }
    & .rr-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-hi); text-decoration: none; }
    & .rr-name:hover { text-decoration: underline; }
    & .rr-ref { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: var(--s1); font-family: var(--mono); color: var(--ink-dim); text-decoration: none; }
    & time { flex: none; margin-left: auto; padding-left: var(--s2); white-space: nowrap; }
  }
  @media (max-width: 720px) {
    .list.runs .c-name { width: auto; max-width: 0; }
  }
  .runs .c-dur, .runs .c-who { white-space: nowrap; }
  .runs tr[data-new] { background: var(--bg-raised); }

  .run-h { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); }
  .run-err, .job-err {
    max-width: var(--measure); padding: var(--s3) var(--s4); margin: 0 0 var(--s4); white-space: pre-wrap; overflow-wrap: anywhere;
    background: var(--bg-surface); border: 1px solid var(--red); border-radius: var(--r-s);
    font: inherit; font-size: var(--fs-s);
  }

  .jobs { display: grid; gap: var(--s4); padding: 0; list-style: none; }
  .jobs > li { padding: var(--s3) var(--s4); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); }
  .job-h { display: flex; align-items: center; gap: var(--s2); font-weight: 700; }
  .steps { display: grid; gap: 2px; padding: 0; margin: var(--s2) 0 0; list-style: none; font-size: var(--fs-s); }
  /* a long step name (a whole shell command) wraps inside the rail; the icon
     stays on its first line and the duration at the right */
  .steps li { display: flex; align-items: flex-start; gap: var(--s1); min-width: 0; }
  .steps li > .ck { flex: none; margin-top: 3px; }
  .steps li > :is(a, span:not(.ck, .dim)) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .steps li > .dim { flex: none; margin-left: auto; }
  .attempts { padding: 0; margin: var(--s2) 0 0; list-style: none; font-size: var(--fs-s); }
  .checks { display: grid; gap: var(--s1); padding: 0; margin: 0; list-style: none; font-size: var(--fs-s); }
  .checks li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
  .checks .ck-group { font-size: var(--fs-xs); color: var(--ink-dim); margin-top: var(--s2); }
  .checks .ck-group:first-child { margin-top: 0; }
  .checks .ck-group a { color: inherit; }
  /* the merge rule under the checks: a note about them, not one of them */
  .rail section > .rule-note {
    display: flex; gap: 6px; margin-top: var(--s3); padding-top: var(--s2); border-top: 1px dashed var(--border);
    font-size: var(--fs-xs); font-style: italic; line-height: 1.4; color: var(--ink-mute);
    &::before { content: "i"; flex: none; width: 14px; height: 14px; margin-top: 1px; border: 1px solid currentColor; border-radius: 50%; font: 700 9px / 12px var(--mono); font-style: normal; text-align: center; }
  }

  /* annotations and summaries of a run */
  .annots { margin: 0 0 var(--s4); }
  .annots h3, .summaries h3 { display: flex; align-items: baseline; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--fs-s); }
  .annot-list { display: grid; gap: var(--s2); padding: 0; margin: 0; list-style: none; }
  .annot {
    display: flex; gap: var(--s2); align-items: flex-start; padding: var(--s2) var(--s3);
    background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: var(--r-s);
    font-size: var(--fs-s);
  }
  .annot-failure { border-color: var(--red); }
  .annot-warning { border-style: dashed; border-color: var(--ink-dim); }
  .annot-notice { border-color: var(--green); }
  .annot p { margin: 0; }
  .annot-step { flex-basis: 100%; font-weight: 700; }
  .annot:has(.annot-step) { flex-wrap: wrap; }
  .annot-body { min-width: 0; }
  .annot-head { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; }
  .annot-level { font-weight: 700; }
  .annot-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
  .annot-where { color: var(--ink-dim); font-family: var(--mono); overflow-wrap: anywhere; }
  .an { display: inline-block; flex: none; width: 14px; height: 14px; margin-top: 2px; border: 2px solid var(--ink-dim); box-sizing: border-box; }
  .an-failure { background: var(--red); border-color: var(--red); border-radius: 3px; transform: rotate(45deg) scale(.85); }
  .an-warning { border-radius: 50% 50% 0 0; border-style: dashed; }
  .an-notice { border-radius: 50%; border-color: var(--green); }
  .summaries { margin: var(--s5) 0 0; }
  .summary { padding: var(--s3) var(--s4); background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r); }
  .summary + .summary { margin-top: var(--s3); }
  .summary-step { margin: 0 0 var(--s2); font-size: var(--fs-s); color: var(--ink-dim); }

  .joblog { margin-top: var(--s4); }
  .log {
    margin: 0; padding: var(--s2) 0; list-style: none; overflow-x: auto;
    font: var(--fs-s) / 1.5 var(--mono); background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-s);
  }
  .log .lg { display: flex; gap: var(--s3); padding: 0 var(--s3); white-space: pre-wrap; overflow-wrap: anywhere; }
  .log .lg:target { background: var(--bg-raised); }
  .log .lg time { flex: none; color: var(--ink-dim); user-select: none; }
  .log .lg .t { min-width: 0; }
  .log .group .t { font-weight: 700; }
  .log .endgroup { display: none; }
  .log .error .t { color: var(--red); }
  .joblog .more { margin: var(--s2) 0; font-size: var(--fs-s); }
}
/* 80-live.css */
@layer components {
  /* live updates: a slot is a status region that stays in the page; its banner
     comes and goes as its content. Empty, it is out of the way but still in the
     accessibility tree (display: none would drop the region, and the next banner
     would not be announced). */
  .live-slot:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .live-slot:not(:empty) {
    padding: var(--s3) var(--s4); font-weight: 700;
    background: var(--bg-surface); border: 1px solid var(--green); border-radius: var(--r-s);
  }
  /* A deferred MR refresh must not insert height above a long diff. */
  #mr-refresh-status:has(a) {
    position: fixed; bottom: var(--s4); left: var(--s4); z-index: 24;
    max-width: min(42rem, calc(100vw - 2 * var(--s4))); font-size: var(--fs-s);
  }
  .live-slot a { color: var(--ink-hi); }
}
/* 85-mobile.css */
@layer components {
  .mr-touch-range { display: none; }

  /* MR only: retain the shell's desktop layout and other pages' spacing. */
  @media (max-width: 720px) {
    body:has(#diffs[data-mr]) {
      --pad: 0px;
      --hdr-h: 40px;
      overflow-x: clip;
    }
    body:has(#diffs[data-mr]) .work { padding-inline: 0; margin-inline: 0; gap: var(--s3); }
    body:has(#diffs[data-mr]) main { min-width: 0; padding-inline: 0; }
    body:has(#diffs[data-mr]) :is(.card, .mr-card, .mr-desc, .dfile, .dscroll, .code, .rail section) {
      margin-inline: 0; border-inline: 0; border-radius: 0; min-width: 0; max-width: 100%;
    }
    body:has(#diffs[data-mr]) :is(.mr-h, .mr-desc.prose, .card-h, .mr-footer) { padding-inline: 4px; }
    body:has(#diffs[data-mr]) .mr-footer :is(th, td) { padding-inline: var(--s1); }
    body:has(#diffs[data-mr]) .mr-desc.prose > pre { margin-inline: -4px; padding-inline: 0; max-width: calc(100% + 8px); }
    #diffs[data-mr] .dfile > summary { padding-inline: 0; border-inline: 0; border-radius: 0; }
    #diffs[data-mr] :is(.dscroll, .code) { overflow-x: auto; overscroll-behavior-x: contain; padding-inline: 0; }
    #diffs[data-mr] .dt .ln { width: calc(var(--lnw) + .5ch); min-width: calc(var(--lnw) + .5ch); padding-inline: .25ch; }
    #diffs[data-mr] .dt .m { width: 1ch; }
    #diffs[data-mr][data-diff] .uni { display: table; }
    #diffs[data-mr][data-diff] .spl { display: none; }
    #diffs[data-mr] .fnote td { padding-inline: 0; }
    #diffs[data-mr] :is(.cform, .cmt) { width: min(65ch, calc(100vw - 5rem)); max-width: calc(100vw - 5rem); overflow-wrap: anywhere; }
    body:has(#diffs[data-mr]) :is(input, textarea, select, .md-backdrop) { font-size: 16px; line-height: 1.6; }
    body:has(#diffs[data-mr]) .f-btns { flex-wrap: wrap; }
    body:has(#diffs[data-mr]) .menu .menu-pop {
      position: fixed; inset: auto 0 0; width: auto; max-width: 100%;
      max-height: 75dvh; overflow-y: auto; border-radius: var(--r) var(--r) 0 0;
      padding-bottom: max(var(--s4), env(safe-area-inset-bottom));
    }
    body:has(#diffs[data-mr]) .mr-bar { position: static; }
    /* A wrapping toolbar has no reliable fixed sticky height. */
    body:has(#diffs[data-mr]) { --bar-h: 0px; }
  }

  /* the dependency rows stack: the status and the actions go below */
  @media (max-width: 720px) {
    .deps-repo-row { grid-template-columns: minmax(0, 1fr); }
    .deps-row {
      grid-template-columns: minmax(0, 1fr);
      & .deps-act > :is(form, a.btn) { flex: 1; }
      & .deps-act > form .btn { width: 100%; justify-content: center; }
      & .deps-act > a.btn { justify-content: center; }
    }
  }

  @media (pointer: coarse), (hover: none) {
    .mr-touch-range { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
    /* Real, disjoint cells: never expand invisible targets into other lines
       or into the neighbouring old/new gutter. */
    #diffs[data-mr] .dt { line-height: max(var(--lh-code), 40px); }
    #diffs[data-mr] .dt .ln { width: max(calc(var(--lnw) + .5ch), 40px); min-width: 40px; padding: 0; }
    #diffs[data-mr] .spl .c-ln { width: max(calc(var(--lnw) + .5ch), 40px); }
    #diffs[data-mr] .ln a { display: block; width: 100%; min-height: 40px; text-align: center; text-decoration: underline; }
    .mr-touch-range[hidden] { display: none; }
    #diffs[data-mr] .ln a[data-range-start] { outline: 2px solid var(--focus); background: var(--sel); }
    body:has(#diffs[data-mr]) :is(.cform .btn, .menu .btn, .mr-touch-range .btn, .c-act button) { min-height: 40px; height: auto; padding-block: var(--s2); }
    #diffs[data-mr] .cform { scroll-margin-block: calc(var(--hdr-h) + 12px); }
    .mr-footer [data-mr-tabs] button { display: inline-flex; align-items: center; min-height: 40px; }
  }
}
/* 86-rail.css */
@layer components {
  .rail-controls, .rail-backdrop { display: none; }
  /* the toggle sits at the right end of the tabs row (sticky), at every width */
  .rail-context:not([hidden]) { display: inline-flex; order: 99; flex: none; }
  /* the icon points the way the panel will go: open it, or push it away */
  .rail-context .ico { transition: transform .2s ease; }
  .rail-context[aria-expanded="true"] .ico { transform: rotate(180deg); }
  /* the tabs scroll sideways; the toggle stays pinned at the right end */
  .tabs:has(> .rail-context:not([hidden])) {
    display: flex; align-items: center; gap: var(--s2); overflow: visible;
    & > ul { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
    & > .rail-context { margin-left: auto; }
  }
  /* rail.js drives the panel (rail-js, set by store.js before the first
     paint); without scripts the rail stays a column, or stacks below */
  .rail-js {
    & .rail { visibility: hidden; min-width: 0; }
    & body:not(.rail-open) .work > .rail { max-height: 0; overflow: hidden; }
    & .work.has-rail { grid-template-columns: minmax(0, 1fr) minmax(0, 0px); column-gap: 0; transition: grid-template-columns .2s ease, column-gap .2s ease; }
    & .rail-open .work.has-rail { grid-template-columns: minmax(0, 1fr) minmax(0, var(--rail)); column-gap: var(--s5); }
    & .rail-open .rail { visibility: visible; }
  }
  /* before rail.js runs: a wide page draws in its remembered state */
  @media (width > 1080px) {
    html.rail-js:not(.rail-hidden) body:not(:has(.rail-context)) .work.has-rail { grid-template-columns: minmax(0, 1fr) minmax(0, var(--rail)); column-gap: var(--s5); transition: none; }
    html.rail-js:not(.rail-hidden) body:not(:has(.rail-context)) .work > .rail { visibility: visible; max-height: none; overflow: visible; }
  }

  @media (max-width: 1080px) {
    body { --hdr-h: 0px; }
    body:has(.hdr .tabs) { --hdr-h: 40px; }
    /* Review tools scroll away too, leaving file headers directly below the band. */
    body:has(#diffs[data-mr]) { --bar-h: 0px; }
    body:has(#diffs[data-mr]) .mr-bar { position: static; }
    /* The identity row scrolls away; only the compact navigation remains. */
    .hdr { position: static; }
    .hdr:has(.tabs) { position: sticky; top: -48px; }
    .hdr-top { height: 48px; gap: var(--s2); }
    .tabs { height: 39px; padding-inline: var(--s2); }
    .tabs a { height: 39px; padding-inline: var(--s2); font-size: var(--fs-s); }
    .tabs kbd { display: none; }
  }
  @media (max-width: 720px) {
    /* on a phone the rail never takes a grid column, open or closed: it
       overlays the page, so the content keeps the full width */
    .rail-js .work.has-rail { grid-template-columns: minmax(0, 1fr); column-gap: 0; }
    .rail-js body:not(.rail-open) .work > .rail { position: fixed; }
    .rail-open .rail {
      display: flex; position: fixed; inset: 0 0 0 auto; z-index: 41;
      width: min(var(--rail), calc(100vw - 48px));
      max-height: none; overflow-y: auto; overscroll-behavior: contain;
      --rail-x: var(--s4);
      padding-bottom: max(var(--s4), env(safe-area-inset-bottom));
      background: var(--bg-canvas); border-left: 1px solid var(--border);
      box-shadow: -8px 0 24px #0006;
    }
    /* rail.js adds rail-enter when the sheet opens: a live refresh of an open
       sheet does not slide it in again */
    .rail-open .rail.rail-enter { animation: rail-in .2s ease; }
    .rail-open .rail-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: #0008; }
    .rail-controls { display: flex; justify-content: flex-end; position: sticky; top: 0; z-index: 1; margin-inline: calc(-1 * var(--rail-x)); padding: var(--s2) var(--s3); background: var(--bg-canvas); }
    .rail-modal { overflow: hidden; }
  }
  @keyframes rail-in { from { transform: translateX(100%); } }
  @media (prefers-reduced-motion: reduce) {
    .work.has-rail { transition: none; }
    .rail-open .rail.rail-enter { animation: none; }
    .rail-context .ico { transition: none; }
  }
}
