internal/web/static/style.css

1521 lines · 58026 bytes

   1/* gitbay stylesheet. Tokens first, on :root and again in the dark media
   2   query; components use tokens only. Two accents with separate jobs:
   3   blue is what you can do (links, primary buttons, focus, pressed
   4   toggles), orange is where you are and what wants you (current tab,
   5   rail counts, pending state, unverified signatures). Orange is never a
   6   button ground. internal/web/tokens_test.go measures every token;
   7   internal/web/classes_test.go checks every template class has a rule.
   8   No external requests: fonts are served from this origin. */
   9
  10@font-face {
  11  font-family: "Atkinson Hyperlegible Next";
  12  font-style: normal;
  13  font-weight: 400 700;
  14  font-display: swap;
  15  src: url(/static/fonts/atkinson-next-roman.woff2) format("woff2");
  16}
  17@font-face {
  18  font-family: "Atkinson Hyperlegible Next";
  19  font-style: italic;
  20  font-weight: 400 700;
  21  font-display: swap;
  22  src: url(/static/fonts/atkinson-next-italic.woff2) format("woff2");
  23}
  24@font-face {
  25  font-family: "Atkinson Hyperlegible Mono";
  26  font-style: normal;
  27  font-weight: 400 600;
  28  font-display: swap;
  29  src: url(/static/fonts/atkinson-mono-roman.woff2) format("woff2");
  30}
  31
  32:root {
  33  /* declare native light+dark support: correct form controls and
  34     scrollbars per scheme, and opt out of browser auto-darkening */
  35  color-scheme: light dark;
  36
  37  /* grounds: canvas, surface and inset are three steps, not one */
  38  --canvas: #ffffff;
  39  --surface: #ebedf1;
  40  --inset: #ffffff;
  41  --hover: #e1e4ea;
  42  --line: #8d939c;           /* 3.09:1 on canvas — a border you can see */
  43  --faint: #d8dce2;
  44
  45  /* ink */
  46  --fg: #1c1f24;
  47  --muted: #5a6270;
  48  --neutral: var(--muted);
  49
  50  /* blue: what you can do. --link is text, --fill is a ground; one blue
  51     cannot clear 4.5:1 as text and 3:1 as a ground in both schemes. */
  52  --link: #0033d6;
  53  --fill: #0000f0;
  54  --fill-fg: #ffffff;
  55  --focus: var(--link);
  56
  57  /* orange: where you are, what wants you. Two cuts because the floor
  58     differs by size: --mark for bars, --warn at text size. */
  59  --mark: #e4572e;
  60  --warn: #b8400f;
  61
  62  /* state */
  63  --ok: #0a7536;
  64  --bad: #c62828;
  65  --done: #6b21a8;
  66
  67  /* diff row tints: enough to scan, light enough that the syntax
  68     palette stays legible on them (TestSyntaxPaletteContrast) */
  69  --diff-add: #e4f6ea;
  70  --diff-del: #fdeaea;
  71
  72  /* the rail is black in both schemes: the one brand constant */
  73  --shell-bg: #000000;
  74  --shell-fg: #f2f2f2;
  75  --shell-muted: #8f8f8f;
  76  --shell-line: #1c1c1c;
  77  --shell-hover: #141414;
  78  --shell-mark: #ff6b3d;
  79
  80  /* the languages' own colours; the same in both schemes */
  81  --lang-go: #00add8;
  82  --lang-rust: #dea584;
  83  --lang-c: #555555;
  84  --lang-python: #3572a5;
  85  --lang-javascript: #f1e05a;
  86  --lang-typescript: #3178c6;
  87  --lang-shell: #89e051;
  88  --lang-ruby: #701516;
  89  --lang-java: #b07219;
  90  --lang-swift: #f05138;
  91  --lang-html: #e34c26;
  92  --lang-css: #563d7c;
  93  --lang-org: #77aa99;
  94  --lang-markdown: #083fa1;
  95  --lang-emacs-lisp: #c065db;
  96  --lang-nix: #7e7eff;
  97  --lang-sql: #e38c00;
  98
  99  --sans: "Atkinson Hyperlegible Next", -apple-system, BlinkMacSystemFont,
 100          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 101  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono",
 102          SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
 103
 104  /* 12, 13, 14, 16, 20, 24, 32 */
 105  --fs-0: 0.75rem;
 106  --fs-1: 0.8125rem;
 107  --fs-2: 0.875rem;
 108  --fs-3: 1rem;
 109  --fs-4: 1.25rem;
 110  --fs-5: 1.5rem;
 111  --fs-6: 2rem;
 112
 113  /* 4, 8, 12, 16, 24, 32, 48 */
 114  --sp-1: 4px;
 115  --sp-2: 8px;
 116  --sp-3: 12px;
 117  --sp-4: 16px;
 118  --sp-5: 24px;
 119  --sp-6: 32px;
 120  --sp-7: 48px;
 121
 122  --r-ctl: 4px;   /* controls and chips */
 123  --r-card: 6px;  /* cards, lists, code blocks */
 124  --shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
 125
 126  /* the native select arrow cannot be restyled, so draw our own;
 127     --chev carries the stroke colour per scheme */
 128  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235a6270' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 129}
 130@media (prefers-color-scheme: dark) {
 131  :root {
 132    --canvas: #101114;
 133    --surface: #212429;
 134    --inset: #0b0c0e;
 135    --hover: #2b2f36;
 136    --line: #61666f;
 137    --faint: #2f333a;
 138
 139    --fg: #e9eaec;
 140    --muted: #a3a9b3;
 141    --neutral: var(--muted);
 142
 143    --link: #8b9bff;
 144    --fill: #4d61f0;
 145    --fill-fg: #ffffff;
 146    --focus: var(--link);
 147
 148    --mark: #ff6b3d;
 149    --warn: #ff8a63;
 150
 151    --ok: #3fce7a;
 152    --bad: #ff6b6b;
 153    --done: #c084fc;
 154
 155    --diff-add: #0d2a18;
 156    --diff-del: #2c1113;
 157
 158    --shell-bg: #000000;
 159    --shell-fg: #f2f2f2;
 160    --shell-muted: #8f8f8f;
 161    --shell-line: #1c1c1c;
 162    --shell-hover: #141414;
 163    --shell-mark: #ff6b3d;
 164
 165    /* the languages' own colours; the same in both schemes */
 166    --lang-go: #00add8;
 167    --lang-rust: #dea584;
 168    --lang-c: #555555;
 169    --lang-python: #3572a5;
 170    --lang-javascript: #f1e05a;
 171    --lang-typescript: #3178c6;
 172    --lang-shell: #89e051;
 173    --lang-ruby: #701516;
 174    --lang-java: #b07219;
 175    --lang-swift: #f05138;
 176    --lang-html: #e34c26;
 177    --lang-css: #563d7c;
 178    --lang-org: #77aa99;
 179    --lang-markdown: #083fa1;
 180    --lang-emacs-lisp: #c065db;
 181    --lang-nix: #7e7eff;
 182    --lang-sql: #e38c00;
 183
 184    --shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
 185    --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a3a9b3' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 186  }
 187}
 188
 189/* ---- base ---- */
 190* { box-sizing: border-box; }
 191html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
 192body {
 193  margin: 0;
 194  background: var(--canvas);
 195  color: var(--fg);
 196  font: var(--fs-3)/1.5 var(--sans);
 197  min-height: 100vh;
 198}
 199h1, h2, h3 { line-height: 1.25; font-weight: 600; }
 200h1 { font-size: var(--fs-5); margin: 0 0 var(--sp-3); text-wrap: balance; }
 201h2 { font-size: var(--fs-4); margin: var(--sp-6) 0 var(--sp-3); }
 202h3 { font-size: var(--fs-3); margin: var(--sp-5) 0 var(--sp-2); }
 203p { margin: 0 0 var(--sp-3); }
 204a { color: var(--link); text-decoration: none; }
 205a:hover { text-decoration: underline; }
 206a.xref { color: var(--link); text-decoration: none; }
 207
 208code, pre, .mono, .code, td.mode, td.size {
 209  font-family: var(--mono);
 210  font-size: var(--fs-1);
 211}
 212.mono { overflow-wrap: anywhere; }
 213
 214/* ---- focus: one authored ring, so keyboard position is never the
 215   browser's guess ---- */
 216:focus-visible {
 217  outline: 2px solid var(--focus);
 218  outline-offset: 2px;
 219  border-radius: 1px;
 220}
 221/* the rail is black in both schemes and --focus is a dark blue in the
 222   light one — a ring nobody could see there */
 223.rail :focus-visible { outline-color: var(--shell-mark); }
 224
 225/* visually hidden, still read aloud */
 226.vh {
 227  position: absolute;
 228  width: 1px; height: 1px;
 229  margin: -1px; padding: 0; border: 0;
 230  clip-path: inset(50%);
 231  overflow: hidden;
 232  white-space: nowrap;
 233}
 234
 235/* ---- skip link: the rail runs ahead of the content in source order ---- */
 236a.skip {
 237  position: absolute;
 238  left: var(--sp-3); top: -3rem;
 239  z-index: 50;
 240  background: var(--fill);
 241  color: var(--fill-fg);
 242  padding: var(--sp-2) var(--sp-4);
 243  font-weight: 600;
 244}
 245a.skip:focus { top: var(--sp-3); text-decoration: none; }
 246
 247/* ---- rail ---- */
 248.rail {
 249  flex: none;
 250  width: 14rem;
 251  background: var(--shell-bg);
 252  color: var(--shell-fg);
 253  border-right: 1px solid var(--shell-line);
 254  position: sticky;
 255  top: 0;
 256  height: 100vh;
 257  display: flex;
 258  flex-direction: column;
 259}
 260a.brand {
 261  display: flex;
 262  align-items: center;
 263  gap: var(--sp-2);
 264  padding: var(--sp-4) var(--sp-4) var(--sp-3);
 265  color: var(--shell-fg);
 266  font-weight: 600;
 267  font-size: var(--fs-3);
 268}
 269a.brand:hover { text-decoration: none; }
 270a.brand svg.mark { display: block; flex: none; }
 271a.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 272
 273.railbody { flex: 1; overflow-y: auto; padding: 0 var(--sp-3); }
 274.railtop { display: block; }
 275/* search is reachable from every page, so it sits above the rail's links
 276   rather than on one page of its own */
 277form.railsearch { margin-bottom: var(--sp-3); }
 278form.railsearch input[type="search"] {
 279  width: 100%;
 280  background: var(--shell-hover);
 281  border: 1px solid var(--shell-line);
 282  color: var(--shell-fg);
 283  border-radius: var(--r-ctl);
 284  padding: 6px 10px;
 285  height: 32px;
 286  font: inherit;
 287  font-size: var(--fs-2);
 288}
 289form.railsearch input[type="search"]::placeholder { color: var(--shell-muted); }
 290ul.raillist { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
 291ul.raillist a {
 292  display: flex;
 293  align-items: center;
 294  gap: var(--sp-2);
 295  padding: 5px var(--sp-2);
 296  color: var(--shell-fg);
 297  font-size: var(--fs-2);
 298  border-radius: var(--r-ctl);
 299  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
 300}
 301ul.raillist a:hover { background: var(--shell-hover); text-decoration: none; }
 302/* orange marks position — the rail's only accent */
 303ul.raillist a[aria-current] {
 304  background: var(--shell-hover);
 305  box-shadow: inset 3px 0 0 var(--shell-mark);
 306  font-weight: 600;
 307}
 308ul.raillist .owner { color: var(--shell-muted); }
 309ul.raillist.wide a { white-space: normal; display: block; }
 310ul.raillist.wide b { display: block; font-weight: 500; font-size: var(--fs-1); }
 311ul.raillist.wide .owner { display: block; font-size: var(--fs-0); }
 312
 313.railgroup { margin-bottom: var(--sp-4); }
 314.raillabel {
 315  display: flex;
 316  align-items: center;
 317  gap: var(--sp-2);
 318  margin: 0 var(--sp-2) var(--sp-1);
 319  font-size: var(--fs-0);
 320  font-weight: 500;
 321  letter-spacing: 0.08em;
 322  text-transform: uppercase;
 323  color: var(--shell-muted);
 324}
 325.count {
 326  font-size: var(--fs-0);
 327  font-weight: 600;
 328  letter-spacing: 0;
 329  background: var(--shell-mark);
 330  color: var(--shell-bg);
 331  padding: 0 5px;
 332  border-radius: var(--r-ctl);
 333  margin-left: auto;
 334}
 335/* pinned above the account cell: always reachable, never scrolled away */
 336.railpinned {
 337  flex: none;
 338  padding: var(--sp-2) var(--sp-3);
 339  margin: 0;
 340  border-top: 1px solid var(--shell-line);
 341}
 342.railfoot {
 343  flex: none;
 344  border-top: 1px solid var(--shell-line);
 345  padding: var(--sp-3) var(--sp-4);
 346  display: flex;
 347  align-items: center;
 348  justify-content: space-between;
 349  gap: var(--sp-3);
 350  font-size: var(--fs-2);
 351}
 352.railfoot a { color: var(--shell-fg); }
 353a.railuser { display: inline-flex; align-items: center; gap: var(--sp-2); }
 354/* a descendant cannot cancel an ancestor's underline, so the link carries
 355   none and the name draws its own */
 356a.railuser:hover { text-decoration: none; }
 357a.railuser:hover .uname { text-decoration: underline; }
 358.railfoot form { margin-left: auto; }
 359.railfoot button.linklike { color: var(--shell-muted); text-decoration: underline; }
 360.railfoot button.linklike:hover { color: var(--shell-fg); }
 361.avatar {
 362  display: inline-grid;
 363  place-items: center;
 364  width: 22px; height: 22px;
 365  flex: none;
 366  border-radius: 50%;
 367  background: var(--fill);
 368  color: var(--fill-fg);
 369  font-size: var(--fs-0);
 370  font-weight: 600;
 371}
 372
 373/* ---- shell ---- */
 374.shell { display: flex; align-items: stretch; min-height: 100vh; }
 375.pane { flex: 1; min-width: 0; display: flex; flex-direction: column; }
 376main.content {
 377  flex: 1;
 378  width: 100%;
 379  padding: var(--sp-5) var(--sp-6) var(--sp-7);
 380}
 381main.wide { max-width: none; }
 382main.reading { max-width: calc(72rem + 2 * var(--sp-6)); }
 383main.bounded { max-width: calc(48rem + 2 * var(--sp-6)); }
 384footer {
 385  width: 100%;
 386  padding: var(--sp-4) var(--sp-6);
 387  border-top: 1px solid var(--faint);
 388  color: var(--muted);
 389  font-size: var(--fs-1);
 390}
 391footer p { margin: 0; }
 392footer a { color: var(--muted); text-decoration: underline; }
 393footer a:hover { color: var(--link); }
 394
 395/* ---- repository header ---- */
 396.repohead {
 397  padding: var(--sp-4) var(--sp-6) 0;
 398  border-bottom: 1px solid var(--line);
 399}
 400.identity { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
 401.grow { flex: 1; }
 402/* h1 on the repo home, p elsewhere so each page keeps its own h1 — but
 403   identical in size, because the tabs sit below and navigation must not
 404   move when you use it */
 405.repotitle {
 406  margin: 0;
 407  font-size: var(--fs-4);
 408  font-weight: 600;
 409  line-height: 1.25;
 410}
 411.repotitle a { color: var(--fg); }
 412.repotitle a.owner { color: var(--muted); font-weight: 400; }
 413.repotitle a:hover { color: var(--link); text-decoration: none; }
 414.repotitle .sep { color: var(--muted); margin: 0 2px; font-weight: 400; }
 415.repodesc {
 416  margin: var(--sp-2) 0 0;
 417  color: var(--fg);
 418  font-size: var(--fs-2);
 419  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
 420}
 421.repometa { margin: var(--sp-1) 0 0; color: var(--muted); font-size: var(--fs-1); }
 422.toggles { margin: var(--sp-2) 0 0; color: var(--muted); font-size: var(--fs-1); }
 423
 424nav.tabs {
 425  display: flex;
 426  gap: var(--sp-1);
 427  margin-top: var(--sp-3);
 428  overflow-x: auto;
 429  /* with overflow-y left visible the browser computes it to auto, which
 430     is a vertical drag on touch; the strip scrolls sideways only */
 431  overflow-y: hidden;
 432  scrollbar-width: none;
 433}
 434nav.tabs::-webkit-scrollbar { display: none; }
 435nav.tabs a {
 436  display: inline-flex;
 437  align-items: center;
 438  gap: var(--sp-1);
 439  padding: var(--sp-2) var(--sp-3) 10px;
 440  color: var(--muted);
 441  font-size: var(--fs-2);
 442  white-space: nowrap;
 443  border-bottom: 2px solid transparent;
 444  margin-bottom: -1px;
 445}
 446nav.tabs a:hover { color: var(--fg); text-decoration: none; }
 447nav.tabs a[aria-current] { color: var(--fg); font-weight: 600; border-bottom-color: var(--mark); }
 448/* a count in a tab is plain metadata, not a badge */
 449nav.tabs a i { font-style: normal; color: var(--muted); margin-left: 4px; }
 450
 451/* ---- page heads ---- */
 452.pagehead, .listhead, .headrow {
 453  display: flex;
 454  align-items: center;
 455  gap: var(--sp-3);
 456  flex-wrap: wrap;
 457  margin-bottom: var(--sp-5);
 458}
 459.pagehead h1, .listhead h1, .headrow h1, .listhead h2, .headrow h2 { margin: 0; }
 460.pagehead .grow, .listhead .spacer, .headrow .spacer { flex: 1; }
 461.issuetitle { margin: 0 0 var(--sp-2); font-size: var(--fs-5); }
 462.issuenumber { color: var(--muted); font-weight: 400; }
 463.issuemeta { color: var(--muted); font-size: var(--fs-2); margin: 0 0 var(--sp-4); }
 464.commithead p { margin: var(--sp-1) 0; }
 465.commithead h2 { margin-top: 0; margin-bottom: var(--sp-1); }
 466
 467nav.filters { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; }
 468nav.filters a {
 469  display: inline-flex;
 470  align-items: center;
 471  height: 32px;
 472  padding: 0 var(--sp-3);
 473  background: var(--canvas);
 474  border: 1px solid var(--line);
 475  border-radius: var(--r-ctl);
 476  color: var(--fg);
 477  font-size: var(--fs-2);
 478  font-weight: 500;
 479}
 480nav.filters a:hover { background: var(--hover); text-decoration: none; }
 481nav.filters a.active { background: var(--surface); border-color: var(--link); color: var(--link); }
 482
 483form.searchform, form.logfilter, form.compareform {
 484  display: flex;
 485  align-items: center;
 486  gap: var(--sp-2);
 487  flex-wrap: wrap;
 488  margin: 0 0 var(--sp-4);
 489}
 490form.searchform input[type="search"], form.searchform input[type="text"], form.logfilter input { flex: 1; min-width: 12rem; max-width: 32rem; }
 491form.searchform.compact { margin: 0; }
 492form.searchform.compact input[type="search"], form.searchform.compact input[type="text"] { min-width: 18rem; }
 493form.compareform label { display: inline-flex; align-items: center; gap: var(--sp-2); margin: 0; }
 494
 495/* ---- buttons: one family, 32px tall, so a row of them lines up ---- */
 496button, .button {
 497  display: inline-flex;
 498  align-items: center;
 499  justify-content: center;
 500  gap: 6px;
 501  height: 32px;
 502  padding: 0 var(--sp-3);
 503  font: inherit;
 504  font-size: var(--fs-2);
 505  font-weight: 500;
 506  border: 1px solid transparent;
 507  border-radius: var(--r-ctl);
 508  cursor: pointer;
 509  text-decoration: none;
 510  white-space: nowrap;
 511  /* a bare <button> is the primary action of its form group */
 512  background: var(--fill);
 513  color: var(--fill-fg);
 514}
 515button:hover, .button.primary:hover { filter: brightness(1.12); text-decoration: none; }
 516button.btn, .button.btn {
 517  background: var(--canvas);
 518  color: var(--fg);
 519  border-color: var(--line);
 520  filter: none;
 521}
 522button.btn:hover, .button.btn:hover { background: var(--hover); filter: none; text-decoration: none; }
 523button.btn[aria-pressed="true"] { background: var(--surface); color: var(--link); border-color: var(--link); }
 524button.linklike {
 525  background: none;
 526  border: 0;
 527  padding: 0;
 528  height: auto;
 529  color: var(--link);
 530  font-weight: 400;
 531  filter: none;
 532}
 533button.linklike:hover { text-decoration: underline; filter: none; }
 534button.danger, .button.danger {
 535  background: var(--canvas);
 536  color: var(--bad);
 537  border-color: var(--bad);
 538  filter: none;
 539}
 540/* --canvas, not --fill-fg: white on the dark scheme's --bad is 2.3:1 */
 541button.danger:hover, .button.danger:hover { background: var(--bad); color: var(--canvas); filter: none; }
 542button:disabled { opacity: 0.55; cursor: default; filter: none; }
 543.btngroup { display: inline-flex; gap: var(--sp-2); flex-wrap: wrap; }
 544form.inline { display: inline; }
 545.act { text-align: right; }
 546
 547/* ---- forms ---- */
 548/* not button: it sets its own colour above, and this rule comes later at
 549   the same specificity */
 550input, textarea, select { font: inherit; color: inherit; }
 551input[type="text"], input[type="search"], input[type="email"],
 552input[type="password"], input[type="number"], input:not([type]), textarea, select {
 553  background: var(--inset);
 554  color: var(--fg);
 555  border: 1px solid var(--line);
 556  border-radius: var(--r-ctl);
 557  padding: 0 10px;
 558  height: 32px;
 559  font-size: var(--fs-2);
 560  line-height: 1.4;
 561}
 562textarea {
 563  width: 100%;
 564  height: auto;
 565  padding: 8px 10px;
 566  resize: vertical;
 567  line-height: 1.5;
 568}
 569textarea[name="content"] { font-family: var(--mono); font-size: var(--fs-1); }
 570select {
 571  appearance: none;
 572  padding-right: 1.9rem;
 573  background-image: var(--chev);
 574  background-repeat: no-repeat;
 575  background-position: right 0.6rem center;
 576  background-size: 0.62rem;
 577  cursor: pointer;
 578}
 579input:hover, textarea:hover, select:hover { border-color: var(--muted); }
 580input[type="radio"] { accent-color: var(--fill); }
 581label { display: block; font-weight: 500; font-size: var(--fs-2); margin-bottom: 4px; }
 582label:has(> input[type="radio"]), label:has(> input[type="checkbox"]),
 583label:has(> select) { display: inline-flex; align-items: center; gap: var(--sp-2); }
 584.fieldname { display: block; font-size: var(--fs-2); font-weight: 500; }
 585.hint { display: block; color: var(--muted); font-size: var(--fs-1); font-weight: 400; margin: 0 0 6px; }
 586.field { margin-bottom: var(--sp-4); }
 587.field input[type="text"], .field input[type="email"], .field select { width: 100%; }
 588.check { display: flex; align-items: center; gap: var(--sp-2); font-weight: 400; }
 589::placeholder { color: var(--muted); opacity: 1; }
 590::selection { background: var(--fill); color: var(--fill-fg); }
 591/* :user-invalid, not :invalid — a required field is invalid the moment
 592   the page loads, and colouring it red before anyone has typed is a
 593   scolding, not a hint */
 594input:user-invalid, textarea:user-invalid { border-color: var(--bad); }
 595input[name="confirm"] { width: auto; margin-right: var(--sp-2); }
 596
 597/* A radio keeps the native control: a circle takes one answer, a square
 598   takes any number, and that shape survives greyscale and colour
 599   blindness. The checkbox is drawn so it matches the rest of the family. */
 600input[type="checkbox"] {
 601  appearance: none;
 602  flex: none;
 603  width: 16px;
 604  height: 16px;
 605  margin: 0;
 606  /* an empty box has nothing but its border to announce it */
 607  border: 1px solid var(--muted);
 608  border-radius: var(--r-ctl);
 609  background: var(--inset);
 610  cursor: pointer;
 611}
 612input[type="checkbox"]:not(:checked):hover { border-color: var(--fg); }
 613input[type="checkbox"]:checked {
 614  background: var(--fill);
 615  border-color: var(--fill);
 616  /* the mark sits on the blue ground, so it is white in both schemes */
 617  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.4 3.4L11 1.4' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 618  background-repeat: no-repeat;
 619  background-position: center;
 620  background-size: 11px;
 621}
 622
 623/* a segmented control for a small, mutually exclusive set: real radios
 624   underneath, so arrow keys and screen readers behave as they always did */
 625fieldset.segmented { border: 0; margin: 0 0 var(--sp-4); padding: 0; }
 626fieldset.segmented legend { padding: 0; margin-bottom: var(--sp-2); color: var(--muted); font-size: var(--fs-2); }
 627fieldset.segmented .options { display: inline-flex; }
 628fieldset.segmented label { gap: 0; margin: 0; }
 629fieldset.segmented input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
 630fieldset.segmented span {
 631  display: flex;
 632  align-items: center;
 633  height: 32px;
 634  padding: 0 var(--sp-4);
 635  border: 1px solid var(--line);
 636  font-size: var(--fs-2);
 637  cursor: pointer;
 638}
 639fieldset.segmented label + label span { border-left: 0; }
 640fieldset.segmented label:first-child span { border-radius: var(--r-ctl) 0 0 var(--r-ctl); }
 641fieldset.segmented label:last-child span { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
 642fieldset.segmented span:hover { border-color: var(--muted); }
 643fieldset.segmented input:checked + span {
 644  background: var(--fill);
 645  border-color: var(--fill);
 646  color: var(--fill-fg);
 647  font-weight: 600;
 648}
 649fieldset.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
 650
 651p.branchpick { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
 652p.branchpick label { color: var(--muted); font-size: var(--fs-2); margin: 0; }
 653p.branchpick select { flex: 1 1 12rem; }
 654
 655form.signupform, form.editform { max-width: 40rem; }
 656form.signupform label, form.editform label { margin-bottom: 4px; }
 657.editform textarea { width: 100%; }
 658.editform input[name="message"] { width: 100%; }
 659
 660form.commentform { margin: var(--sp-4) 0; max-width: 48rem; }
 661form.commentform p:last-child { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: 0; }
 662
 663details.editbox { margin: var(--sp-2) 0; max-width: 48rem; }
 664details.editbox > summary {
 665  display: inline-flex;
 666  align-items: center;
 667  height: 32px;
 668  padding: 0 var(--sp-3);
 669  background: var(--canvas);
 670  border: 1px solid var(--line);
 671  border-radius: var(--r-ctl);
 672  color: var(--fg);
 673  font-size: var(--fs-2);
 674  font-weight: 500;
 675  cursor: pointer;
 676  list-style: none;
 677}
 678details.editbox > summary::-webkit-details-marker { display: none; }
 679details.editbox > summary:hover { background: var(--hover); }
 680details.editbox[open] > summary { margin-bottom: var(--sp-2); }
 681details.editbox input[type="text"] { width: 100%; }
 682
 683/* ---- settings: one row per control, label then input then its own
 684   button. The name stays setform because the templates carry it. ---- */
 685form.setform {
 686  display: grid;
 687  grid-template-columns: 14rem minmax(0, 28rem) auto;
 688  gap: var(--sp-4);
 689  align-items: start;
 690  padding: var(--sp-3) 0;
 691  border-bottom: 1px solid var(--faint);
 692}
 693form.setform label { margin-top: 6px; }
 694form.setform .hint { margin: 2px 0 0; }
 695form.setform input[type="text"], form.setform input[type="number"], form.setform select { width: 100%; }
 696/* the third column takes the leftover width; the button keeps its own */
 697form.setform > button, form.setform > .btngroup { justify-self: start; }
 698form.setform.stack { grid-template-columns: 1fr; }
 699form.setform.stack textarea, form.setform.stack select { width: 100%; max-width: 48rem; }
 700nav.sections { display: flex; gap: var(--sp-4); flex-wrap: wrap; font-size: var(--fs-2); margin-bottom: var(--sp-5); }
 701ul.protlist { list-style: none; margin: var(--sp-2) 0; padding: 0; }
 702ul.protlist li {
 703  display: flex;
 704  align-items: center;
 705  gap: var(--sp-3);
 706  padding: var(--sp-2) 0;
 707  border-bottom: 1px solid var(--faint);
 708}
 709ul.protlist li:last-child { border-bottom: 0; }
 710ul.protlist form { margin-left: auto; }
 711ul.plain { list-style: none; margin: 0 0 var(--sp-3); padding: 0; }
 712ul.plain li { padding: var(--sp-1) 0; display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
 713
 714/* ---- messages: .error and .notice are one family. The names stay
 715   because e2e tests match class="error". ---- */
 716.error, .notice {
 717  border-left: 3px solid var(--bad);
 718  background: color-mix(in srgb, var(--bad) 6%, transparent);
 719  color: var(--fg);
 720  border-radius: 0 var(--r-ctl) var(--r-ctl) 0;
 721  padding: var(--sp-2) var(--sp-3);
 722  margin: 0 0 var(--sp-4);
 723  font-size: var(--fs-2);
 724}
 725.notice { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 6%, transparent); }
 726.empty-note, .none, .empty, li.empty, td.empty { color: var(--muted); }
 727
 728/* ---- containers: one recipe for cards, lists and tables ---- */
 729.card, ul.list, ul.loglist, ul.repolist, ul.issuelist,
 730ul.milestonelist, .readme, .code, article.release, .blame, .teambody {
 731  background: var(--surface);
 732  border: 1px solid var(--line);
 733  border-radius: var(--r-card);
 734  overflow: hidden;
 735}
 736.cardhead {
 737  display: flex;
 738  align-items: center;
 739  gap: var(--sp-3);
 740  padding: var(--sp-2) var(--sp-4);
 741  border-bottom: 1px solid var(--line);
 742  font-size: var(--fs-1);
 743  color: var(--muted);
 744}
 745.cardhead b { color: var(--fg); font-weight: 500; }
 746.cardbody { padding: var(--sp-4) var(--sp-5); }
 747ul.list { list-style: none; margin: 0 0 var(--sp-4); padding: 0; }
 748ul.list li { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--faint); }
 749ul.list li:last-child { border-bottom: 0; }
 750ul.list li:hover { background: var(--hover); }
 751
 752table { border-collapse: collapse; width: 100%; font-size: var(--fs-2); }
 753th {
 754  text-align: left;
 755  font-weight: 500;
 756  font-size: var(--fs-1);
 757  color: var(--muted);
 758  padding: 6px var(--sp-4);
 759  border-bottom: 1px solid var(--line);
 760}
 761td { padding: 7px var(--sp-4); border-bottom: 1px solid var(--faint); vertical-align: top; }
 762tr:last-child td { border-bottom: 0; }
 763tbody tr:hover td { background: var(--hover); }
 764/* every header row a template writes, by the class it or its table
 765   carries: TestHeaderRowsAreLeftAligned reads these selectors */
 766tr.cols th, table.tree th, table.refs th, table.keys th, table.assets th { text-align: left; }
 767tr.cols th { background: var(--canvas); }
 768/* right-aligned columns keep their header with their values */
 769tr.cols th.age, tr.cols th.size { text-align: right; }
 770/* wide listings scroll inside their own box; the page never does. The
 771   wrapper is the scroller only — the table inside carries the card. */
 772.tablewrap { overflow-x: auto; max-width: 100%; }
 773
 774table.tree, table.refs {
 775  background: var(--surface);
 776  border: 1px solid var(--line);
 777  border-radius: var(--r-card);
 778  /* collapsed borders defeat a radius on the table itself */
 779  border-collapse: separate;
 780  border-spacing: 0;
 781  overflow: hidden;
 782  margin-bottom: var(--sp-4);
 783}
 784table.tree tr:last-child td, table.refs tr:last-child td { border-bottom: 0; }
 785table.tree tr:hover td, table.refs tr:hover td { background: var(--hover); }
 786td.name a { color: var(--fg); }
 787td.name a:hover { color: var(--link); }
 788table.tree td.name { width: 25%; white-space: nowrap; }
 789table.tree td.name.dir a { color: var(--link); }
 790table.tree th.lastcommit, table.tree td.lastcommit { width: 55%; }
 791table.tree td.lastcommit {
 792  max-width: 0;
 793  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
 794}
 795table.tree td.lastcommit a {
 796  color: var(--muted);
 797  display: block;
 798  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
 799}
 800table.tree td.lastcommit a:hover { color: var(--link); }
 801table.tree th.age, table.tree td.age { width: 20%; }
 802td.age, th.age { text-align: right; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
 803td.size, td.mode { color: var(--muted); white-space: nowrap; }
 804table.tree th.size, table.tree td.size { text-align: right; }
 805table.refs td.name { width: 100%; }
 806table.refs td.sha, td.sha { color: var(--muted); }
 807
 808/* these tables sit flush with the page text: no outer border, and the
 809   header row drops the ground and the left padding */
 810table.keys, table.assets { background: none; border: 0; border-radius: 0; }
 811table.keys th, table.assets th, table.keys tr.cols th { background: transparent; padding-left: 0; }
 812table.keys td { padding-left: 0; }
 813table.keys td.act, table.assets td.size { text-align: right; }
 814table.assets td.name { width: 100%; font-family: var(--mono); font-size: var(--fs-1); }
 815table.assets { margin-top: var(--sp-2); }
 816
 817/* the tip commit is the first row of the file table */
 818tr.tipbar td {
 819  background: var(--surface);
 820  padding: var(--sp-3) var(--sp-4);
 821  border-bottom: 1px solid var(--line);
 822  max-width: 0;
 823}
 824.tipbar .tip {
 825  display: flex;
 826  align-items: center;
 827  gap: var(--sp-2);
 828  flex-wrap: wrap;
 829  min-width: 0;
 830  font-size: var(--fs-2);
 831}
 832.tipbar .who { font-weight: 600; }
 833.tipbar .subject { color: var(--fg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 834.tipbar .subject:hover { color: var(--link); }
 835.tipbar .spacer { flex: 1; }
 836.tipbar .age { color: var(--muted); white-space: nowrap; }
 837
 838.readme { margin-top: var(--sp-5); }
 839.readme .cardbody { max-width: 78ch; }
 840/* until every card wraps its body in .cardbody, the rendered block is
 841   the body */
 842.readme > .rendered { padding: var(--sp-4) var(--sp-5); }
 843.code { background: var(--inset); padding: var(--sp-3) var(--sp-4); overflow-x: auto; }
 844.code pre { margin: 0; background: transparent !important; border: 0; padding: 0; }
 845pre.bigcode, .bigcode {
 846  font-family: var(--mono);
 847  /* the 404 numeral is a picture of a number, not body type */
 848  font-size: 4rem;
 849  color: var(--faint);
 850  -webkit-text-stroke: 1px var(--line);
 851  margin: 0;
 852  line-height: 1;
 853}
 854.notfound { text-align: center; padding: var(--sp-6) 0; }
 855.notfound h1 { margin-top: var(--sp-3); }
 856
 857ul.loglist { list-style: none; margin: var(--sp-3) 0; padding: 0; }
 858ul.loglist li {
 859  display: flex;
 860  align-items: baseline;
 861  gap: var(--sp-3);
 862  padding: var(--sp-3) var(--sp-4);
 863  border-bottom: 1px solid var(--faint);
 864}
 865ul.loglist li:last-child { border-bottom: 0; }
 866ul.loglist li:hover { background: var(--hover); }
 867ul.loglist p { margin: 0; }
 868ul.loglist .commitmain { flex: 1 1 auto; min-width: 0; }
 869ul.loglist .subject a { color: var(--fg); font-weight: 500; }
 870ul.loglist .subject a:hover { color: var(--link); }
 871ul.loglist .commitside { flex: none; display: flex; gap: var(--sp-2); align-items: center; white-space: nowrap; }
 872
 873ul.repolist { list-style: none; margin: var(--sp-3) 0 var(--sp-5); padding: 0; }
 874ul.repolist li { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--faint); }
 875ul.repolist li:last-child { border-bottom: 0; }
 876ul.repolist li:hover { background: var(--hover); }
 877ul.repolist p { margin: 0; }
 878ul.repolist .reponame { font-size: var(--fs-3); }
 879ul.repolist .reponame a { color: var(--fg); }
 880ul.repolist .reponame a strong { color: var(--link); font-weight: 600; }
 881ul.repolist .reponame .sep { color: var(--muted); margin: 0 2px; }
 882ul.repolist .desc { margin-top: 2px; }
 883ul.repolist .topics, ul.repolist .meta { margin-top: var(--sp-1); }
 884
 885/* pinned repos: a compact wrap of names, no description or meta */
 886ul.pinlist { list-style: none; margin: var(--sp-3) 0 var(--sp-5); padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
 887ul.pinlist li {
 888  background: var(--surface);
 889  border: 1px solid var(--line);
 890  border-radius: var(--r-ctl);
 891  padding: var(--sp-1) var(--sp-3);
 892}
 893ul.pinlist li:hover { background: var(--hover); }
 894ul.pinlist li a { color: var(--fg); }
 895ul.pinlist li a:hover { color: var(--link); text-decoration: none; }
 896ul.pinlist .sep { color: var(--muted); margin: 0 2px; }
 897
 898ul.issuelist { list-style: none; margin: var(--sp-3) 0; padding: 0; }
 899ul.issuelist li {
 900  display: flex;
 901  align-items: baseline;
 902  gap: var(--sp-3);
 903  padding: var(--sp-3) var(--sp-4);
 904  border-bottom: 1px solid var(--faint);
 905}
 906ul.issuelist li:last-child { border-bottom: 0; }
 907ul.issuelist li:hover { background: var(--hover); }
 908ul.issuelist li.empty { display: block; }
 909ul.issuelist p { margin: 0; }
 910ul.issuelist .issuemain { flex: 1 1 auto; min-width: 0; }
 911ul.issuelist .title a { color: var(--fg); font-weight: 500; }
 912ul.issuelist .title a:hover { color: var(--link); }
 913
 914ul.milestonelist { list-style: none; margin: var(--sp-3) 0; padding: 0; }
 915ul.milestonelist li { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--faint); }
 916ul.milestonelist li:last-child { border-bottom: 0; }
 917ul.milestonelist li:hover { background: var(--hover); }
 918ul.milestonelist p { margin: 0; }
 919ul.milestonelist .msmain { min-width: 0; }
 920ul.milestonelist .title { font-weight: 500; }
 921.progress {
 922  height: 6px;
 923  max-width: 24rem;
 924  margin-top: var(--sp-2);
 925  background: var(--faint);
 926  border-radius: var(--r-ctl);
 927  overflow: hidden;
 928}
 929.progress .bar { height: 100%; background: var(--ok); }
 930
 931article.release { padding: var(--sp-4); margin: var(--sp-4) 0; }
 932.releasehead { background: none; border: 0; padding: 0; }
 933.releasehead h3 { margin: 0 0 var(--sp-1); }
 934.releasehead .meta { margin: 0 0 var(--sp-2); }
 935
 936ul.matchlist { list-style: none; margin: var(--sp-3) 0; padding: 0; }
 937ul.matchlist li { margin-bottom: var(--sp-3); }
 938.matchpath { font-family: var(--mono); font-size: var(--fs-1); }
 939pre.matchline {
 940  background: var(--inset);
 941  border: 1px solid var(--line);
 942  border-radius: var(--r-card);
 943  padding: var(--sp-1) var(--sp-3);
 944  margin: var(--sp-1) 0 0;
 945  overflow-x: auto;
 946}
 947pre.matchline mark { background: color-mix(in srgb, var(--mark) 25%, transparent); color: inherit; border-radius: 2px; }
 948p.pager { margin-top: var(--sp-4); }
 949.snippetfile { margin-bottom: var(--sp-5); }
 950p.filefacts { color: var(--muted); font-size: var(--fs-1); margin: 0 0 var(--sp-3); }
 951pre.buildlog { max-height: 40rem; overflow: auto; }
 952
 953/* ---- rendered prose ---- */
 954pre {
 955  background: var(--inset);
 956  border: 1px solid var(--line);
 957  border-radius: var(--r-card);
 958  padding: var(--sp-3) var(--sp-4);
 959  margin: 0 0 var(--sp-4);
 960  overflow-x: auto;
 961  font-size: var(--fs-2);
 962  line-height: 1.6;
 963}
 964code {
 965  background: var(--inset);
 966  border: 1px solid var(--faint);
 967  border-radius: var(--r-ctl);
 968  padding: 0 0.3em;
 969}
 970pre code { background: none; border: 0; padding: 0; font-size: inherit; }
 971code.fullsha { color: var(--muted); overflow-wrap: anywhere; }
 972pre.message {
 973  white-space: pre-wrap;
 974  overflow-wrap: anywhere;
 975}
 976.rendered { max-width: 100%; overflow-wrap: anywhere; }
 977.rendered a { text-decoration: underline; }
 978.prose, .rendered > p, .rendered > ul, .rendered > ol, .rendered > blockquote { max-width: 78ch; }
 979.rendered blockquote { border-left: 3px solid var(--line); margin-left: 0; padding-left: var(--sp-4); color: var(--muted); }
 980.rendered img { max-width: 100%; }
 981.rendered h1, .rendered h2 { border-bottom: 1px solid var(--faint); padding-bottom: var(--sp-1); }
 982.rendered table { border-collapse: collapse; margin: var(--sp-3) 0; display: block; max-width: 100%; overflow-x: auto; }
 983.rendered th, .rendered td {
 984  border: 1px solid var(--line);
 985  padding: var(--sp-1) var(--sp-3);
 986  text-align: left;
 987  overflow-wrap: normal; /* scroll the table, don't shatter words */
 988}
 989.rendered th { background: var(--surface); font-weight: 600; }
 990/* GFM task lists: the box sits in the line, sized to the prose */
 991.rendered li input[type="checkbox"] { width: 0.9em; height: 0.9em; margin: 0 0.35em 0 0; vertical-align: -0.05em; background-size: 0.7em; }
 992.rendered li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.2em; }
 993.blobimage { text-align: center; }
 994.blobimage img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
 995
 996/* ---- two-column: conversation and aside ---- */
 997.withaside { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: var(--sp-6); align-items: start; }
 998.withaside .mainside { min-width: 0; }
 999aside.aside { font-size: var(--fs-2); }
1000.aside .grp { border-top: 1px solid var(--line); padding: var(--sp-3) 0; }
1001.aside .grp:first-child { border-top: 0; padding-top: 0; }
1002.aside h2 {
1003  margin: 0 0 var(--sp-2);
1004  font-size: var(--fs-0);
1005  font-weight: 500;
1006  letter-spacing: 0.08em;
1007  text-transform: uppercase;
1008  color: var(--muted);
1009}
1010.aside .row { display: flex; align-items: center; gap: 6px; margin: 0 0 var(--sp-1); flex-wrap: wrap; }
1011.aside .row:last-child { margin-bottom: 0; }
1012/* a row's second line: when it happened, under what it happened to */
1013.aside .row .sub { flex-basis: 100%; padding-left: 14px; color: var(--muted); font-size: var(--fs-1); }
1014.aside .row:has(.sub) { margin-bottom: var(--sp-2); }
1015.aside .none { color: var(--muted); }
1016.dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--neutral); margin-right: 2px; vertical-align: middle; }
1017.dot.ok { background: var(--ok); }
1018.dot.bad { background: var(--bad); }
1019.dot.pend { background: var(--mark); }
1020.ok { color: var(--ok); }
1021.bad { color: var(--bad); }
1022form.actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
1023form.actions button { flex: 1 1 auto; }
1024form.actions select, form.actions textarea { width: 100%; }
1025.feedline { margin-bottom: var(--sp-2); }
1026
1027/* ---- comments and threads ---- */
1028article.comment {
1029  max-width: 48rem;
1030  border: 1px solid var(--line);
1031  border-radius: var(--r-card);
1032  margin: var(--sp-4) 0;
1033  overflow: hidden;
1034}
1035article.comment .commenthead {
1036  display: flex;
1037  gap: var(--sp-2);
1038  flex-wrap: wrap;
1039  background: var(--surface);
1040  border-bottom: 1px solid var(--line);
1041  padding: var(--sp-2) var(--sp-4);
1042  margin: 0;
1043  font-size: var(--fs-1);
1044  color: var(--muted);
1045}
1046article.comment .commenthead b { color: var(--fg); font-weight: 500; }
1047article.comment .commenthead .when { color: var(--muted); }
1048article.comment .rendered { padding: var(--sp-3) var(--sp-4); }
1049article.comment .rendered > :first-child { margin-top: 0; }
1050article.comment .rendered > :last-child { margin-bottom: 0; }
1051a.authorlink { color: var(--fg); font-weight: 500; }
1052a.authorlink:hover { color: var(--link); }
1053
1054.syscomment {
1055  max-width: 48rem;
1056  color: var(--muted);
1057  font-size: var(--fs-1);
1058  margin: 0 0 var(--sp-4) var(--sp-3);
1059  padding: var(--sp-2) 0 var(--sp-2) var(--sp-4);
1060  border-left: 2px solid var(--faint);
1061}
1062.syscomment p { display: inline; margin: 0; }
1063
1064.thread {
1065  border: 1px solid var(--faint);
1066  border-left: 3px solid var(--link);
1067  border-radius: var(--r-ctl);
1068  padding: var(--sp-2) var(--sp-4);
1069  margin: var(--sp-2) 0 var(--sp-2) var(--sp-6);
1070}
1071.thread.resolved { border-left-color: var(--ok); opacity: 0.75; }
1072/* an unsubmitted comment is the viewer's own note, not the conversation */
1073.thread.pending { border-left-color: var(--neutral); border-left-style: dashed; }
1074.thread.stale { border-left-color: var(--warn); }
1075.thread.composing { border-left-color: var(--mark); }
1076.thread:target { outline: 2px solid var(--mark); outline-offset: 2px; }
1077.thread p.commenthead { font-size: var(--fs-2); margin: var(--sp-2) 0 0; }
1078.thread .when { color: var(--muted); }
1079.thread .rendered p { margin: var(--sp-1) 0; }
1080.thread .threadstate { color: var(--muted); font-size: var(--fs-1); margin: var(--sp-1) 0 0; }
1081.thread details.threadreply { margin: var(--sp-2) 0 0; }
1082.thread details.threadreply > summary { color: var(--link); font-size: var(--fs-1); cursor: pointer; }
1083.thread textarea { width: 100%; }
1084.thread.composing p, .thread details.threadreply p { margin: var(--sp-2) 0 0; }
1085form.threadact { margin: var(--sp-1) 0 0; padding: 0 var(--sp-3) var(--sp-2); }
1086
1087nav.subtabs {
1088  display: flex;
1089  gap: var(--sp-4);
1090  border-bottom: 1px solid var(--line);
1091  margin: 0 0 var(--sp-4);
1092}
1093nav.subtabs a {
1094  display: inline-flex;
1095  align-items: center;
1096  gap: var(--sp-1);
1097  padding: var(--sp-2) 0 10px;
1098  color: var(--muted);
1099  font-size: var(--fs-2);
1100  border-bottom: 2px solid transparent;
1101  margin-bottom: -1px;
1102}
1103nav.subtabs a:hover { color: var(--fg); text-decoration: none; }
1104nav.subtabs a[aria-current] { color: var(--fg); font-weight: 600; border-bottom-color: var(--mark); }
1105nav.subtabs a i { font-style: normal; color: var(--muted); margin-left: 4px; }
1106
1107/* ---- diffs and code ---- */
1108p.diffstat { color: var(--muted); font-size: var(--fs-2); margin: 0 0 var(--sp-3); }
1109p.diffstat .add { color: var(--ok); }
1110p.diffstat .del { color: var(--bad); }
1111
1112details.difffold {
1113  border: 1px solid var(--line);
1114  border-radius: var(--r-card);
1115  margin: 0 0 var(--sp-3);
1116  background: var(--inset);
1117  overflow: hidden;
1118}
1119details.difffold summary {
1120  display: flex;
1121  align-items: baseline;
1122  gap: var(--sp-3);
1123  padding: var(--sp-2) var(--sp-3);
1124  background: var(--surface);
1125  font-size: var(--fs-2);
1126  cursor: pointer;
1127  list-style: none;
1128}
1129details.difffold[open] summary { border-bottom: 1px solid var(--line); }
1130details.difffold summary::-webkit-details-marker { display: none; }
1131/* flex summaries lose the native disclosure marker; draw our own */
1132details.difffold summary::before { content: "\25b8"; color: var(--muted); }
1133details.difffold[open] summary::before { content: "\25be"; }
1134details.difffold summary:hover { background: var(--hover); }
1135details.difffold summary .fpath { font-family: var(--mono); overflow-wrap: anywhere; }
1136details.difffold summary .fpath .was { color: var(--muted); }
1137details.difffold summary .fstat { margin-left: auto; font-family: var(--mono); white-space: nowrap; }
1138details.difffold summary .add { color: var(--ok); }
1139details.difffold summary .del { color: var(--bad); }
1140details.difffold > .none { padding: var(--sp-3); margin: 0; }
1141details.difffold .tablewrap { background: none; border: 0; border-radius: 0; }
1142
1143table.difftable {
1144  border-collapse: collapse;
1145  width: 100%;
1146  font-family: var(--mono);
1147  font-size: var(--fs-1);
1148  line-height: 1.5;
1149}
1150table.difftable td { border: 0; padding: 0; vertical-align: top; font-size: inherit; }
1151table.difftable tbody tr:hover td { background: none; }
1152table.difftable td.ln {
1153  width: 1%;
1154  min-width: 2.5rem;
1155  padding: 0 var(--sp-2);
1156  text-align: right;
1157  color: var(--muted);
1158  user-select: none;
1159  border-right: 1px solid var(--line);
1160  white-space: nowrap;
1161}
1162/* not .code: that class carries its own ground, which painted over the
1163   row tints */
1164table.difftable td.src { padding: 0 var(--sp-3); white-space: pre-wrap; overflow-wrap: anywhere; }
1165/* the marker is decoration, so it lives in CSS and stays out of a copied
1166   selection */
1167table.difftable tr.add td.src::before { content: "+"; color: var(--ok); }
1168table.difftable tr.del td.src::before { content: "\2212"; color: var(--bad); }
1169table.difftable tr.ctx td.src::before { content: " "; }
1170table.difftable tr.add { background: var(--diff-add); }
1171table.difftable tr.del { background: var(--diff-del); }
1172table.difftable tr.hunk td, table.difftable tr.dmeta td {
1173  color: var(--muted);
1174  padding: var(--sp-1) var(--sp-3);
1175  background: var(--surface);
1176  border-top: 1px solid var(--line);
1177  border-bottom: 1px solid var(--line);
1178}
1179table.difftable tr.hunk td.src { color: var(--link); }
1180table.difftable tr.threadrow td { padding: var(--sp-2) var(--sp-3); background: var(--canvas); }
1181/* a line number is the handle for commenting on that line; it stays a
1182   plain number until pointed at, so the gutter is not a wall of links */
1183table.difftable td.ln a.cmt { color: inherit; text-decoration: none; }
1184table.difftable td.ln a.cmt:hover,
1185table.difftable td.ln a.cmt:focus { color: var(--link); text-decoration: underline; }
1186/* A linked line: f2-n17 on a diff, L17 on a file (see issue 118). */
1187.difftable tr:target td, .code .line:has(a:target) { background: color-mix(in srgb, var(--mark) 18%, transparent); }
1188.difftable tr:target td.ln, .code .line:has(a:target) .ln { border-left: 3px solid var(--mark); }
1189/* chroma writes the highlighted spans; the container only supplies the
1190   ground and the face */
1191.chroma { font-family: var(--mono); background: none; }
1192
1193.blamehunk { display: flex; gap: var(--sp-3); border-top: 1px solid var(--line); align-items: flex-start; }
1194.blamehunk:first-child { border-top: 0; }
1195.blameinfo { flex: none; width: 17rem; min-width: 0; padding: var(--sp-2) var(--sp-3); }
1196.blameinfo .subject { margin: 0; font-size: var(--fs-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1197.blameinfo .meta { margin: 0; font-size: var(--fs-1); color: var(--muted); }
1198.blamecode {
1199  flex: 1;
1200  margin: 0;
1201  padding: var(--sp-2) var(--sp-3) var(--sp-2) 0;
1202  background: var(--inset);
1203  border: 0;
1204  border-left: 1px solid var(--line);
1205  border-radius: 0;
1206  overflow-x: auto;
1207  align-self: stretch;
1208}
1209.lineno {
1210  display: inline-block;
1211  min-width: 3.5em;
1212  padding-right: 1em;
1213  text-align: right;
1214  color: var(--muted);
1215  user-select: none;
1216}
1217
1218/* ---- chips and badges ---- */
1219.chip, .badge {
1220  --chip: var(--neutral);
1221  display: inline-block;
1222  padding: 1px 8px;
1223  border-radius: var(--r-ctl);
1224  font-size: var(--fs-0);
1225  font-weight: 500;
1226  line-height: 1.5;
1227  color: var(--chip);
1228  border: 1px solid color-mix(in srgb, var(--chip) 40%, transparent);
1229  background: color-mix(in srgb, var(--chip) 10%, var(--canvas));
1230  white-space: nowrap;
1231  vertical-align: middle;
1232}
1233.chip-open { --chip: var(--ok); }
1234.chip-closed { --chip: var(--bad); }
1235.chip-merged, .chip-done { --chip: var(--done); }
1236.chip-neutral, .chip-source_gone { --chip: var(--neutral); }
1237.chip-stale { --chip: var(--warn); }
1238.chip.topic { --chip: var(--link); }
1239.chip.topic:hover { text-decoration: none; background: color-mix(in srgb, var(--chip) 18%, transparent); }
1240/* a label carries its own colour inline, from the label's hex */
1241.chip.label { font-weight: 500; }
1242.badge-verified { --chip: var(--ok); }
1243.badge-unsigned { --chip: var(--neutral); }
1244.badge-signed_unknown_key, .badge-signed_key_expired { --chip: var(--warn); }
1245.badge-signed_email_mismatch, .badge-signed_key_revoked, .badge-bad_signature { --chip: var(--bad); }
1246.badge.check-success, .chip.check-success { --chip: var(--ok); }
1247.badge.check-pending, .chip.check-pending,
1248.badge.check-running, .chip.check-running { --chip: var(--warn); }
1249.badge.check-failure, .chip.check-failure,
1250.badge.check-error, .chip.check-error { --chip: var(--bad); }
1251.badge.check-cancelled, .chip.check-cancelled,
1252.badge.check-skipped, .chip.check-skipped { --chip: var(--neutral); }
1253span.check-success { color: var(--ok); }
1254span.check-pending, span.check-running { color: var(--warn); }
1255span.check-failure, span.check-error { color: var(--bad); }
1256
1257a.memberchip {
1258  display: inline-block;
1259  border: 1px solid var(--line);
1260  border-radius: var(--r-ctl);
1261  padding: 1px 8px;
1262  margin: 0 2px 2px 0;
1263  color: var(--fg);
1264  font-size: var(--fs-1);
1265}
1266a.memberchip:hover { text-decoration: none; border-color: var(--link); color: var(--link); }
1267a.memberchip .role { color: var(--muted); }
1268
1269.pathbar { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-3); flex-wrap: wrap; font-size: var(--fs-2); }
1270.pathbar .spacer { flex: 1; }
1271.pathbar .actions { display: flex; gap: var(--sp-2); }
1272.pathbar .acts { display: flex; gap: var(--sp-2); }
1273.crumbs { color: var(--muted); }
1274.crumbs a { color: var(--link); }
1275.crumbs strong { color: var(--fg); }
1276.refchip {
1277  display: inline-flex;
1278  align-items: center;
1279  gap: 6px;
1280  height: 32px;
1281  padding: 0 10px;
1282  background: var(--canvas);
1283  border: 1px solid var(--line);
1284  border-radius: var(--r-ctl);
1285  font-family: var(--mono);
1286  font-size: var(--fs-2);
1287  font-weight: 500;
1288  color: var(--fg);
1289}
1290details.refmenu { position: relative; }
1291details.refmenu summary { cursor: pointer; list-style: none; }
1292details.refmenu summary::-webkit-details-marker { display: none; }
1293details.refmenu summary::after { content: " \25be"; color: var(--muted); }
1294details.refmenu .refdrop {
1295  position: absolute;
1296  z-index: 10;
1297  top: calc(100% + 4px);
1298  left: 0;
1299  min-width: 12rem;
1300  max-height: 20rem;
1301  overflow-y: auto;
1302  background: var(--canvas);
1303  border: 1px solid var(--line);
1304  border-radius: var(--r-card);
1305  box-shadow: var(--shadow);
1306  padding: var(--sp-1) 0;
1307}
1308details.refmenu .refdrop a {
1309  display: block;
1310  padding: var(--sp-1) var(--sp-3);
1311  color: var(--fg);
1312  font-family: var(--mono);
1313  font-size: var(--fs-1);
1314}
1315details.refmenu .refdrop a:hover { background: var(--hover); text-decoration: none; }
1316details.refmenu .refdrop a.allrefs {
1317  color: var(--link);
1318  font-family: var(--sans);
1319  border-top: 1px solid var(--faint);
1320  margin-top: var(--sp-1);
1321}
1322
1323/* ---- repository facts ---- */
1324.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); margin: var(--sp-5) 0 var(--sp-4); max-width: 72rem; }
1325.facts h2 {
1326  margin: 0 0 var(--sp-2);
1327  font-size: var(--fs-1);
1328  font-weight: 500;
1329  letter-spacing: 0.08em;
1330  text-transform: uppercase;
1331  color: var(--muted);
1332}
1333.clone { margin: 0 0 var(--sp-3); }
1334.facts .about { min-width: 0; }
1335.clone .fieldname { font-size: var(--fs-1); color: var(--muted); font-weight: 500; margin-bottom: 2px; }
1336.clone pre { margin-bottom: var(--sp-3); user-select: all; }
1337.factgrid { display: grid; grid-template-columns: repeat(4, auto); gap: var(--sp-2) var(--sp-4); font-size: var(--fs-2); margin-bottom: var(--sp-3); }
1338.factgrid b { font-weight: 600; }
1339.factgrid a { color: var(--fg); }
1340.factgrid a:hover { color: var(--link); }
1341.counts { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); margin: 0 0 var(--sp-3); font-size: var(--fs-2); }
1342.counts a { color: var(--fg); }
1343.counts a:hover { color: var(--link); }
1344.counts strong { font-weight: 600; }
1345.fact { color: var(--muted); }
1346.langbar { display: flex; height: 8px; margin: 0 0 var(--sp-2); border-radius: var(--r-ctl); overflow: hidden; gap: 1px; background: var(--faint); }
1347.langbar .lang { display: block; height: 100%; min-width: 2px; }
1348.langs { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin: 0 0 var(--sp-3); font-size: var(--fs-1); color: var(--muted); }
1349.langs .lang-name { display: inline-flex; align-items: center; gap: var(--sp-1); }
1350.langs .dot { width: 8px; height: 8px; }
1351/* named where it reads as the language's own colour, neutral otherwise */
1352.lang { background: var(--neutral); }
1353.lang-go { background: var(--lang-go); }
1354.lang-rust { background: var(--lang-rust); }
1355.lang-c, .lang-c- { background: var(--lang-c); }
1356.lang-python { background: var(--lang-python); }
1357.lang-javascript { background: var(--lang-javascript); }
1358.lang-typescript { background: var(--lang-typescript); }
1359.lang-shell { background: var(--lang-shell); }
1360.lang-ruby { background: var(--lang-ruby); }
1361.lang-java { background: var(--lang-java); }
1362.lang-swift { background: var(--lang-swift); }
1363.lang-html { background: var(--lang-html); }
1364.lang-css { background: var(--lang-css); }
1365.lang-org { background: var(--lang-org); }
1366.lang-markdown { background: var(--lang-markdown); }
1367.lang-emacs-lisp { background: var(--lang-emacs-lisp); }
1368.lang-nix { background: var(--lang-nix); }
1369.lang-sql { background: var(--lang-sql); }
1370.contribs { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); margin: 0; font-size: var(--fs-1); }
1371.contribs .label { color: var(--muted); }
1372.teambody { padding: var(--sp-3); }
1373.teambody .memberchip { margin-right: var(--sp-2); }
1374
1375/* ---- landing ---- */
1376/* the width class on main carries this too; the cap here keeps the page
1377   readable on the templates that do not set one yet */
1378.landing { max-width: 48rem; padding: var(--sp-6) 0; }
1379.landing h1 { font-size: var(--fs-6); display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
1380.landing h1 .mark { width: 32px; height: 32px; }
1381.lede { font-size: var(--fs-4); color: var(--muted); line-height: 1.5; max-width: 40rem; margin: 0 0 var(--sp-5); }
1382pre.quickstart { margin: 0 0 var(--sp-4); }
1383.shot { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; margin: var(--sp-5) 0; }
1384.shot img { display: block; width: 100%; height: auto; }
1385.facets { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); margin: var(--sp-5) 0; }
1386.facets h2 { font-size: var(--fs-3); margin: 0 0 var(--sp-1); }
1387.facets p { color: var(--muted); font-size: var(--fs-2); margin: 0; }
1388.routes { display: flex; gap: var(--sp-3); align-items: center; margin: var(--sp-5) 0 var(--sp-3); }
1389
1390/* ---- profile ---- */
1391.profilehead { border-bottom: 1px solid var(--faint); padding-bottom: var(--sp-4); margin-bottom: var(--sp-4); }
1392.profilehead h1 { margin: 0 0 var(--sp-1); }
1393.profilehead .lede { font-size: var(--fs-3); margin: 0 0 var(--sp-1); }
1394.profilehead .meta { margin: var(--sp-1) 0 0; }
1395.activity { margin-bottom: var(--sp-5); }
1396h2 .count { background: none; color: var(--muted); font-weight: 400; font-size: var(--fs-2); margin-left: var(--sp-2); padding: 0; }
1397h2.empty { color: var(--muted); font-weight: 500; font-size: var(--fs-3); margin: var(--sp-2) 0; }
1398/* 53 week columns x 7 day rows, tinted with the link blue */
1399.actgraph-scroll { overflow-x: auto; padding-bottom: var(--sp-1); }
1400.actgraph { display: flex; gap: 3px; width: max-content; padding-top: 18px; }
1401.actweek { display: flex; flex-direction: column; gap: 3px; position: relative; }
1402.actmonth { position: absolute; top: -16px; left: 0; font-size: var(--fs-0); color: var(--muted); }
1403.actday { width: 11px; height: 11px; border-radius: 2px; background: var(--faint); }
1404.actday.pad { background: transparent; }
1405.actday.l0 { background: var(--faint); }
1406.actday.l1 { background: color-mix(in srgb, var(--link) 25%, var(--canvas)); }
1407.actday.l2 { background: color-mix(in srgb, var(--link) 50%, var(--canvas)); }
1408.actday.l3 { background: color-mix(in srgb, var(--link) 75%, var(--canvas)); }
1409.actday.l4 { background: var(--link); }
1410.actlegend { display: flex; align-items: center; gap: 3px; margin-top: var(--sp-2); font-size: var(--fs-0); color: var(--muted); }
1411.actlegend span:first-child { margin-right: var(--sp-1); }
1412.actlegend span:last-child { margin-left: var(--sp-1); }
1413
1414/* ---- wiki ---- */
1415.wikilayout { display: flex; gap: var(--sp-5); align-items: flex-start; }
1416.wikipage { flex: 1; min-width: 0; }
1417.wikinav { flex: none; width: 14rem; }
1418.wikinav ul { list-style: none; margin: var(--sp-1) 0 var(--sp-4); padding: 0; }
1419.wikinav li a {
1420  display: block;
1421  padding: 5px var(--sp-2);
1422  border-radius: var(--r-ctl);
1423  color: var(--fg);
1424  font-size: var(--fs-2);
1425}
1426.wikinav li a:hover { background: var(--hover); color: var(--fg); text-decoration: none; }
1427.wikinav li a.active { background: var(--surface); color: var(--link); font-weight: 500; }
1428
1429/* ---- misc ---- */
1430.meta { color: var(--muted); font-size: var(--fs-1); }
1431.muted { color: var(--muted); }
1432.desc, td.desc { color: var(--muted); }
1433.spacer { flex: 1; }
1434.compact { margin: 0; }
1435.name { min-width: 0; }
1436svg.icon { vertical-align: -0.125em; }
1437.sep { color: var(--muted); }
1438.owner { color: var(--muted); }
1439.title { margin: 0; }
1440.subject { min-width: 0; }
1441.sha { font-family: var(--mono); }
1442.when { color: var(--muted); }
1443.who { font-weight: 500; }
1444.was { color: var(--muted); }
1445.role { color: var(--muted); }
1446.age { color: var(--muted); }
1447.size { color: var(--muted); }
1448.review { font-size: var(--fs-2); }
1449
1450/* ---- breakpoints ---- */
1451@media (max-width: 62rem) {
1452  .withaside { grid-template-columns: 1fr; }
1453  .withaside .aside { order: -1; }
1454}
1455
1456@media (max-width: 52rem) {
1457  /* the rail becomes a single strip, not a wall of links */
1458  .shell { display: block; }
1459  .rail {
1460    width: auto;
1461    height: auto;
1462    position: static;
1463    flex-direction: row;
1464    align-items: center;
1465    gap: var(--sp-2);
1466    border-right: 0;
1467    border-bottom: 1px solid var(--shell-line);
1468    overflow-x: auto;
1469  }
1470  a.brand { padding: var(--sp-2) var(--sp-3); }
1471  .railbody { flex: 1; overflow: visible; padding: 0; display: flex; flex-direction: column; }
1472  .railtop { display: flex; align-items: center; gap: var(--sp-2); overflow-x: auto; }
1473  .railtop > * { flex-shrink: 0; }
1474  form.railsearch { margin: 0 var(--sp-2); }
1475  form.railsearch input[type="search"] { min-width: 8rem; }
1476  /* the strip hides the review queue, reachable from the dashboard, and
1477     shows pinned repositories as a second row of the strip */
1478  .railgroup { display: none; }
1479  .railgroup.pinned {
1480    display: block;
1481    border-top: 1px solid var(--shell-line);
1482    padding: 0 var(--sp-2);
1483  }
1484  .railgroup.pinned .raillabel { display: none; }
1485  .railgroup.pinned ul.raillist { overflow-x: auto; }
1486  ul.raillist { display: flex; margin: 0; }
1487  ul.raillist a { border-radius: 0; border-bottom: 2px solid transparent; padding: var(--sp-2) var(--sp-3); }
1488  ul.raillist a[aria-current] { box-shadow: none; border-bottom-color: var(--shell-mark); }
1489  .railfoot { border-top: 0; padding: var(--sp-2); }
1490  .railpinned { border-top: 0; padding: 0; }
1491  main.content { padding: var(--sp-4) var(--sp-4) var(--sp-5); }
1492  footer { padding: var(--sp-4); }
1493  .repohead { padding: var(--sp-3) var(--sp-4) 0; }
1494  /* seven tabs do not fit a phone in one row; a hidden scrollbar made the
1495     ones past the edge look absent. Two rows show all of them. */
1496  nav.tabs { flex-wrap: wrap; overflow: visible; }
1497  .facts { grid-template-columns: 1fr; }
1498}
1499
1500@media (max-width: 40rem) {
1501  .facets { grid-template-columns: 1fr; gap: var(--sp-4); }
1502  .wikilayout { flex-direction: column; align-items: stretch; }
1503  .wikinav { width: auto; }
1504  form.setform { grid-template-columns: 1fr; gap: var(--sp-2); }
1505  form.setform label { margin-top: 0; }
1506  /* the commit subject is the widest thing in a file table and the one
1507     column a phone can do without: the tipbar above already names the
1508     latest commit */
1509  table.tree td.lastcommit, table.tree th.lastcommit { display: none; }
1510  table.tree td.mode, table.tree th.mode { display: none; }
1511  .clone pre { white-space: pre-wrap; word-break: break-all; }
1512  .pathbar { overflow-wrap: anywhere; }
1513  .readme .cardbody, .code { padding: var(--sp-3); }
1514  .thread { margin-left: var(--sp-3); }
1515  .blamehunk { flex-direction: column; gap: 0; }
1516  .blameinfo { width: auto; }
1517  .blamecode { border-left: 0; padding-left: var(--sp-3); width: 100%; }
1518  .factgrid { grid-template-columns: repeat(2, auto); }
1519  ul.loglist li { flex-wrap: wrap; }
1520  ul.loglist .commitside { width: 100%; justify-content: flex-start; }
1521}