/* ─────────────────────────────────────────────────────────────────────────────
   A polished git browser: black, quiet, teal accent.

   The design brief was "pgit but with the rough edges sanded off", so the
   deliberate choices are:

     · every table row carries real content in every column — no flexible
       spacer columns, which is what produced pgit's empty middle;
     · the commit message is *shown*, not hidden in a title attribute;
     · prose is width-limited for reading, code is not;
     · the accent appears only on links, the active tab, directory names,
       keywords and focus — nowhere else;
     · monospace for everything that is data (shas, sizes, dates, paths);
     · no JavaScript required. Relative dates are computed at build time.
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --background: #000000;
  --card: #0a0a0a;
  --bg-hover: #101010;
  --border: #1a1a1a;
  --border-soft: #141414;

  --foreground: #cfcfcf;
  --fg-strong: #ededed;
  --muted-foreground: #7a7a7a;
  --fg-faint: #4a4a4a;

  --primary: #5bc0ae;
  --accent-dim: #3f8d80;
  --secondary: rgba(91, 192, 174, 0.10);
  --destructive: #d97b7b;
  --destructive-soft: rgba(217, 123, 123, 0.10);

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
  /* headings and the brand; the font picker sets all three */
  --display: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;

  --radius: 6px;
  --wrap: 84rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--background);
  color: var(--foreground);
  font: 15px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--border) var(--background);
}

body { margin: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
::selection { background: rgba(91, 192, 174, 0.25); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.mono { font-family: var(--mono); }
.dim  { color: var(--muted-foreground); }

/* ── top bar ──────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.topbar .inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0.6rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.brand { font-size: 0.95rem; font-weight: 600; color: var(--fg-strong); }
.brand .sep { color: var(--fg-faint); font-weight: 400; margin: 0 0.4rem; }
.brand .sub { color: var(--muted-foreground); font-weight: 400; }

.tabs { display: flex; gap: 0.2rem; margin-left: auto; }
.tabs a {
  padding: 0.3rem 0.65rem; border-radius: var(--radius);
  font-size: 0.85rem; color: var(--muted-foreground);
}
.tabs a:hover { color: var(--foreground); background: var(--bg-hover); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--primary); background: var(--secondary); }

main { padding: 1.75rem 0 4rem; }

/* ── headings ─────────────────────────────────────────────────────────────── */
h1 { font-size: 1.2rem; font-weight: 600; color: var(--fg-strong); margin: 0 0 0.4rem; }
h2 {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted-foreground);
  margin: 2.25rem 0 0.7rem;
}
h2:first-child { margin-top: 0; }

/* ── breadcrumb ───────────────────────────────────────────────────────────── */
.crumbs { font-size: 0.9rem; margin-bottom: 1rem; }
.crumbs a { color: var(--primary); }
.crumbs .crumb-sep { color: var(--fg-faint); margin: 0 0.35rem; }
.crumbs .here { color: var(--foreground); }

/* ── the "latest commit" bar ──────────────────────────────────────────────── */
.headcommit {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  padding: 0.7rem 0.85rem; margin-bottom: 1rem;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.headcommit .msg { color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.headcommit .meta { color: var(--muted-foreground); font-size: 0.8rem; white-space: nowrap; }
.headcommit .meta .who { color: var(--foreground); }

/* ── tree table ───────────────────────────────────────────────────────────── */
.tree { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

.row {
  display: grid;
  /* name | commit message | date | size — every column has content, which is
     precisely what removes the dead space in the middle of the row */
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) 7.5rem 5rem;
  gap: 1.25rem; align-items: center;
  padding: 0.42rem 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.875rem;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--bg-hover); }

.row .name { display: flex; align-items: center; gap: 0.55rem; min-width: 0; }
.row .name a { color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.dir .name a { color: var(--primary); font-weight: 500; }
.row .name svg { flex: none; color: var(--fg-faint); }
.row.dir .name svg { color: var(--primary-dim); }

.row .msg  { color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .when { color: var(--muted-foreground); font-size: 0.78rem; text-align: right; white-space: nowrap; }
.row .size {
  color: var(--fg-faint); font-size: 0.78rem; text-align: right; white-space: nowrap;
  font-family: var(--mono); font-variant-numeric: tabular-nums;
}

/* on narrow screens the secondary columns go rather than the name wrapping */
@media (max-width: 820px) {
  .row { grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 0.75rem; }
  .row .msg, .row .size { display: none; }
}

/* ── overview layout ──────────────────────────────────────────────────────── */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 3rem; align-items: start;
}
@media (max-width: 1000px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
}

.aside { display: flex; flex-direction: column; gap: 1rem; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1rem;
}
.card h3 {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--muted-foreground); margin: 0 0 0.6rem;
}
.card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.75rem; }
.card dt { color: var(--muted-foreground); font-size: 0.8rem; }
.card dd { margin: 0; font-size: 0.8rem; text-align: right; font-family: var(--mono); }

.clone {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--background); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.45rem 0.6rem; margin-bottom: 0.6rem;
}
.clone code {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 0.78rem; color: var(--muted-foreground);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.clone button {
  flex: none; background: transparent; border: 1px solid var(--border);
  color: var(--muted-foreground); border-radius: 4px; padding: 0.15rem 0.45rem;
  font-size: 0.72rem; cursor: pointer; font-family: var(--sans);
}
.clone button:hover { color: var(--primary); border-color: var(--primary-dim); }

/* ── language bar ─────────────────────────────────────────────────────────── */
.langbar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 0.7rem; }
.langbar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.78rem; color: var(--muted-foreground); }
.legend i {
  display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%;
  margin-right: 0.4rem; vertical-align: middle;
}

/* ── chips ────────────────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  display: inline-block; padding: 0.08rem 0.5rem;
  border: 1px solid var(--border); border-radius: 999px;
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted-foreground);
}
.chip.accent { color: var(--primary); border-color: var(--primary-dim); }

/* ── prose (rendered markdown) ────────────────────────────────────────────── */
.prose { max-width: 74ch; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  text-transform: none; letter-spacing: 0; color: var(--fg-strong);
  font-size: 1.05rem; font-weight: 600; margin: 1.75rem 0 0.6rem;
}
.prose h1 { font-size: 1.3rem; }
.prose h3 { font-size: 0.95rem; }
.prose p, .prose li { color: var(--foreground); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin: 0.2rem 0; }
.prose a { text-decoration: underline; text-decoration-color: var(--primary-dim); }
.prose code {
  font-family: var(--mono); font-size: 0.85em;
  background: var(--card); border: 1px solid var(--border-soft);
  border-radius: 4px; padding: 0.08em 0.35em;
}
.prose pre {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.8rem 1rem; overflow-x: auto;
}
.prose pre code { background: none; border: 0; padding: 0; font-size: 0.82rem; }
.prose blockquote {
  margin: 1rem 0; padding: 0.1rem 0 0.1rem 1rem;
  border-left: 2px solid var(--primary-dim); color: var(--muted-foreground);
}
.prose table { border-collapse: collapse; margin: 1rem 0; font-size: 0.875rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.35rem 0.7rem; }
.prose th { color: var(--muted-foreground); font-weight: 600; text-align: left; }
.prose img { max-width: 100%; height: auto; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 1.75rem 0; }

/* ── file / blob page ─────────────────────────────────────────────────────── */
.filemeta {
  display: flex; flex-wrap: wrap; gap: 1rem;
  color: var(--muted-foreground); font-size: 0.8rem; margin: 0.75rem 0;
  font-family: var(--mono);
}
.filemeta .actions { margin-left: auto; }

/* Pygments emits <table class="hl"> with a .linenos gutter cell */
.hl {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: auto; background: var(--background);
}
.hl table { border-collapse: collapse; width: 100%; }
.hl pre { margin: 0; font-family: var(--mono); font-size: 0.82rem; line-height: 1.55; }
.hl .linenos {
  color: var(--fg-faint); background: var(--background); padding: 0.85rem 0.7rem;
  border-right: 1px solid var(--border-soft);
  text-align: right; user-select: none; width: 1%;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.55;
  vertical-align: top;
}
.hl .linenos a { color: var(--fg-faint); }
.hl .linenos a:hover { color: var(--primary); text-decoration: none; }
.hl .code { vertical-align: top; padding: 0.85rem 1rem; }
.hl .code pre { background: none; padding: 0; }
.hl .code a { text-decoration: none; }

.note {
  border: 1px solid var(--border); border-left: 2px solid var(--primary-dim);
  border-radius: var(--radius); background: var(--card);
  padding: 0.75rem 1rem; color: var(--muted-foreground); font-size: 0.85rem;
}

/* ── commit list ──────────────────────────────────────────────────────────── */
.clist { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.crow {
  display: grid; grid-template-columns: minmax(0, 1fr) 11rem 4.5rem;
  gap: 1.25rem; align-items: baseline;
  padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--border-soft);
  font-size: 0.875rem;
}
.crow:last-child { border-bottom: 0; }
.crow:hover { background: var(--bg-hover); }
.crow .subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow .who { color: var(--muted-foreground); font-size: 0.8rem; }
.crow .sha {
  color: var(--fg-faint); font-family: var(--mono); font-size: 0.78rem;
  text-align: right;
}
.crow .sha:hover { color: var(--primary); }
@media (max-width: 820px) {
  .crow { grid-template-columns: minmax(0, 1fr) 4.5rem; }
  .crow .who { display: none; }
}

/* ── diff ─────────────────────────────────────────────────────────────────── */
.diff {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: auto; font-family: var(--mono); font-size: 0.8rem; line-height: 1.5;
}
.diff .fhead {
  background: var(--card); color: var(--muted-foreground);
  padding: 0.45rem 0.85rem; border-bottom: 1px solid var(--border-soft);
  border-top: 1px solid var(--border-soft);
}
.diff .fhead:first-child { border-top: 0; }
.diff .line { padding: 0 0.85rem; white-space: pre; }
.diff .hunk { color: var(--primary-dim); background: rgba(91, 192, 174, 0.05); }
.diff .add  { background: rgba(91, 192, 174, 0.09); }
.diff .del  { background: var(--destructive-soft); }
.diff .meta { color: var(--fg-faint); }

.commit-title { font-size: 1.05rem; color: var(--fg-strong); margin: 0 0 0.4rem; }
.commit-body {
  color: var(--muted-foreground); font-size: 0.85rem; white-space: pre-wrap;
  margin: 0 0 1rem; max-width: 74ch;
}
.byline { color: var(--muted-foreground); font-size: 0.82rem; margin-bottom: 1.25rem; }

/* ── refs ─────────────────────────────────────────────────────────────────── */
.reflist { display: flex; flex-direction: column; gap: 0.4rem; }
.refrow {
  display: grid; grid-template-columns: 12rem minmax(0, 1fr) 7.5rem;
  gap: 1.25rem; align-items: baseline; font-size: 0.875rem;
  padding: 0.4rem 0.85rem; border-bottom: 1px solid var(--border-soft);
}
.refrow:last-child { border-bottom: 0; }
.refrow .rname { color: var(--fg-strong); font-family: var(--mono); font-size: 0.82rem; }
.refrow .rsha { color: var(--fg-faint); font-family: var(--mono); font-size: 0.78rem; text-align: right; }

footer {
  border-top: 1px solid var(--border); margin-top: 3rem; padding: 1rem 0 3rem;
  color: var(--fg-faint); font-size: 0.78rem;
}

/* ── issues ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; margin-left: 0.4rem; padding: 0 0.35rem;
  border-radius: 999px; background: var(--secondary); color: var(--primary);
  font: 0.7rem/1.5 var(--mono);
}
.row.issue { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.4fr) 7.5rem 4rem; }
.row.issue .name { gap: 0.6rem; }
.row .num { flex: none; color: var(--fg-faint); font-family: var(--mono); font-size: 0.78rem; }
.row.issue .msg { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.row.issue .size {
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 0.68rem; color: var(--fg-faint);
}
@media (max-width: 820px) { .row.issue { grid-template-columns: minmax(0, 1fr) 5rem; } }

.state {
  text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.7rem;
  padding: 0.1rem 0.45rem; border-radius: 999px; border: 1px solid var(--border);
}
.state.open { color: var(--primary); border-color: var(--primary-dim); background: var(--secondary); }
.state.closed { color: var(--muted-foreground); }

.mini { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.18rem 0; font-size: 0.82rem; }
.mini .num { color: var(--fg-faint); font-family: var(--mono); font-size: 0.75rem; }
.mini a { color: var(--foreground); }
.mini a:hover { color: var(--primary); }

/* ── JavaScript enhancements ──────────────────────────────────────────────────
   Everything below styles UI that app.js creates. With scripting off none of it
   appears, so none of it can look broken. The [hidden] rule is load-bearing:
   .row sets display:grid, which would otherwise beat the hidden attribute and
   make filtering appear to do nothing. */

[hidden] { display: none !important; }

.filterbar { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 0.75rem; }
.filterbar input {
  flex: 1; min-width: 0;
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0.4rem 0.65rem; font: 0.85rem var(--sans);
}
.filterbar input:focus { outline: none; border-color: var(--primary-dim); }
.filterbar input::placeholder { color: var(--fg-faint); }
.filterbar .count {
  color: var(--muted-foreground); font: 0.78rem var(--mono);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

.js-toggle {
  margin-left: 0.75rem; padding: 0.3rem 0.65rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--muted-foreground); background: transparent;
  font-size: 0.8rem; white-space: nowrap;
}
.js-toggle:hover { color: var(--primary); border-color: var(--primary-dim); text-decoration: none; }

.expander {
  display: block; width: 100%; text-align: left;
  background: var(--card); color: var(--muted-foreground);
  border: 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
  padding: 0.28rem 0.85rem; font: 0.78rem var(--mono); cursor: pointer;
}
.expander:hover { color: var(--primary); }

/* the line a #L42 permalink points at. Pygments wraps each line as
   <span id="line-N">; app.js adds .target to the one the hash names. */
.hl span[id^="line-"].target { background: rgba(91, 192, 174, 0.11); }

/* the toggle is a <button>, so it needs the bits an <a> gets for free */
button.js-toggle { font-family: var(--sans); line-height: 1.5; cursor: pointer; }

/* hairline between language-bar segments so adjacent hues do not merge */
.langbar span + span { box-shadow: inset 1px 0 0 0 var(--background); }

/* the repo name goes home. styled as text rather than as a link so the header
   stays quiet; the accent on hover is the only hint, and it is where the eye
   already goes looking for it. */
a.brand:hover { color: var(--primary); text-decoration: none; }

/* the copy button sits inline with the file header links */
.filemeta button {
  background: transparent; border: 1px solid var(--border); border-radius: 4px;
  color: var(--muted-foreground); font: 0.78rem var(--mono); padding: 0 0.4rem; cursor: pointer;
}
.filemeta button:hover { color: var(--primary); border-color: var(--primary-dim); }

/* chips became links, and a truncated list needs its own affordance */
a.chip { text-decoration: none; }
a.chip:hover { color: var(--primary); border-color: var(--primary-dim); text-decoration: none; }
a.chip.more { border-style: dashed; color: var(--fg-faint); }
a.chip.more:hover { color: var(--primary); border-color: var(--primary-dim); }

/* repo-wide file matches from the filter box */
.finder {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin: 0 0 1rem; overflow: hidden;
}
.finder .fhead2 {
  padding: 0.3rem 0.85rem; background: var(--card); color: var(--muted-foreground);
  border-bottom: 1px solid var(--border-soft); font: 0.72rem var(--mono);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.finder .frow {
  display: grid; grid-template-columns: minmax(0, 1fr) 5rem; gap: 1rem;
  align-items: baseline; padding: 0.35rem 0.85rem;
  border-bottom: 1px solid var(--border-soft); font-size: 0.85rem;
}
.finder .frow:last-child { border-bottom: 0; }
.finder .frow:hover { background: var(--bg-hover); }
.finder .frow a { color: var(--foreground); font-family: var(--mono); font-size: 0.8rem; }
.finder .frow a:hover { color: var(--primary); }
.finder .fsize {
  color: var(--fg-faint); font-family: var(--mono); font-size: 0.78rem;
  text-align: right;
}

/* ── the landing page: one card per repository ────────────────────────────── */
/* Two columns: a card carried a whole row for four lines of content. Falls back
   to one column before the description and the stats start fighting. */
.repolist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (max-width: 1100px) { .repolist { grid-template-columns: minmax(0, 1fr); } }

.repocard {
  display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem;
  /* the content row takes the slack, so the commit line sits at the bottom of
     every card in a row rather than floating at whatever height the stats ended */
  grid-template-rows: 1fr auto;
  gap: 0.8rem 1rem; align-items: start;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); color: inherit; text-decoration: none;
}
.repocard:hover { border-color: var(--primary-dim); background: var(--bg-hover); text-decoration: none; }

.repocard .rname {
  font-family: var(--mono); font-size: 1rem; color: var(--primary);
  display: flex; align-items: baseline; gap: 0.5rem;
}
.repocard .rname .arrow { color: var(--fg-faint); font-size: 0.85rem; }
.repocard:hover .rname .arrow { color: var(--primary); }
.repocard .rdesc {
  color: var(--foreground); font-size: 0.86rem; margin: 0.3rem 0 0.55rem;
  /* three lines at most, so cards in a row stay level with each other */
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.repocard .rlangs { margin: 0.6rem 0 0.35rem; max-width: 30rem; }
.repocard .rlangbar { display: flex; height: 5px; border-radius: 3px; overflow: hidden; }
.repocard .rlangbar span { display: block; height: 100%; }
.repocard .rlegend {
  display: flex; flex-wrap: wrap; gap: 0.3rem 0.85rem;
  font-size: 0.76rem; color: var(--muted-foreground); margin-top: 0.4rem;
}
.repocard .rlegend i {
  display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%;
  margin-right: 0.35rem; vertical-align: middle;
}

.repocard .rstats { font-size: 0.78rem; color: var(--muted-foreground); }
.repocard .rstats dl {
  margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 0.75rem;
}
.repocard .rstatus { margin-top: 0.5rem; }
.repocard .rstats dt { color: var(--fg-faint); }
/* the status badge is not a number: left-aligned, not monospaced */
.repocard .rstats dd.badge-cell { text-align: left; font-family: inherit; }
.repocard .rstats dd {
  margin: 0; text-align: right; font-family: var(--mono);
  font-variant-numeric: tabular-nums; color: var(--foreground);
}
.repocard .rcommit {
  grid-column: 1 / -1; border-top: 1px solid var(--border-soft);
  padding-top: 0.6rem; margin-top: 0.2rem;
  font-size: 0.8rem; color: var(--muted-foreground);
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: baseline;
}
.repocard .rcommit > * { min-width: 0; }
.repocard .rcommit .subj {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 820px) {
  .repocard { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
}

/* commit signature badge: a filled glyph whose tooltip says what git reported.
   Only a good signature gets a check; unverifiable is deliberately not green. */
.sig {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.15em; height: 1.15em; flex: none;
  border: 1px solid currentColor; border-radius: 50%;
  font-size: 0.66em; font-style: normal; cursor: help;
  margin-left: 0.35em; vertical-align: 0.12em;
}
.sig svg { display: block; }
.sig.ok { color: var(--primary); }
.sig.bad { color: var(--destructive); }
.sig.unknown { color: var(--muted-foreground); }

/* the commit-message cell needs flex so a long subject truncates but the badge
   never gets clipped away with it */
.row .msg { display: flex; align-items: baseline; gap: 0.3rem; min-width: 0; }
.row .msg > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.crow .subject { display: flex; align-items: baseline; gap: 0.3rem; min-width: 0; }
.crow .subject > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* the header breadcrumb: same white as before, but site and repo are links */
.brand a { color: var(--fg-strong); text-decoration: none; }
.brand a:hover { color: var(--primary); text-decoration: none; }

/* ── components ─────────────────────────────────────────────────────────────
   A small collection rather than a design system: a recipe is added here only
   once something uses it. Names and semantics follow shadcn/ui, so the tokens
   and the controls speak the same language; the code is plain CSS, because this
   site has no build step and never will.

   Present: .btn (+ primary/outline/ghost, -sm), .select, .popover, .card,
   .badge, .chip, .tabs. Deliberately absent: .input, .switch — nothing uses them
   yet, and an unused recipe is a guess. */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; white-space: nowrap; cursor: pointer;
  padding: 0.3rem 0.7rem; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent;
  color: var(--foreground); font: 0.8rem var(--sans); line-height: 1.5;
  text-decoration: none;
}
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
.btn:hover { text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: default; }

.btn-outline { border-color: var(--border); color: var(--muted-foreground); }
.btn-outline:hover {
  color: var(--primary); border-color: var(--primary-dim); background: var(--secondary);
}
.btn-primary {
  background: var(--primary); border-color: var(--primary); color: var(--primary-foreground);
}
.btn-primary:hover { background: var(--primary-dim); border-color: var(--primary-dim); }
.btn-ghost { color: var(--muted-foreground); }
.btn-ghost:hover { color: var(--primary); background: var(--secondary); }
.btn-sm { padding: 0.2rem 0.55rem; font-size: 0.75rem; }

/* A select we build, not a native one: a native <select> cannot be made to look
   like the rest of the interface, so this is a button plus a listbox — the same
   shape shadcn's takes. */
.select-wrap { position: relative; }
.select {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; padding: 0.3rem 0.5rem; text-align: left;
  font: 0.78rem var(--mono); color: var(--foreground); background: var(--background);
  border: 1px solid var(--input); border-radius: var(--radius); cursor: pointer;
}
.select:hover, .select[aria-expanded="true"] {
  color: var(--primary); border-color: var(--primary-dim); background: var(--secondary);
}
.select > svg { flex: none; opacity: 0.75; }

.select-content {
  position: absolute; left: 0; right: 0; top: calc(100% + 0.3rem); z-index: 30;
  max-height: 15rem; overflow-y: auto; padding: 0.25rem;
}
.select-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  width: 100%; padding: 0.3rem 0.45rem; border: 0; border-radius: 4px;
  background: transparent; color: var(--muted-foreground); cursor: pointer;
  font: 0.78rem var(--mono); text-align: left;
}
.select-item:hover, .select-item:focus-visible {
  background: var(--secondary); color: var(--foreground); outline: none;
}
.select-item[aria-selected="true"] { color: var(--primary); }
/* the tick belongs to the selected option only; it is in the markup of every
   item so the row does not shift when the selection moves */
.select-item > svg { flex: none; visibility: hidden; }
.select-item[aria-selected="true"] > svg { visibility: visible; }

/* the floating surface itself; placement belongs to whatever uses it */
.popover {
  padding: 0.7rem 0.8rem; min-width: 12rem;
  background: var(--popover); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* ── the settings cog ─────────────────────────────────────────────────────── */
.cogwrap { position: relative; margin-left: 0.75rem; }

.cog {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: transparent; color: var(--muted-foreground); cursor: pointer;
}
.cog:hover, .cog[aria-expanded="true"] {
  color: var(--primary); border-color: var(--primary-dim); background: var(--secondary);
}
.cog svg { display: block; }

.cogpanel { position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 20; }
/* Rows are tight on purpose: five of them with a generous gap plus a divider made
   the panel taller than the page it sits over. The divider only earns its space
   between groups, which .cogrow-group marks. */
.cogrow + .cogrow { margin-top: 0.45rem; }
.cogrow-group { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--border-soft); }
.cogrow-group + .cogrow-group { margin-top: 0.6rem; }
.coglabel { display: block; font-size: 0.7rem; color: var(--muted-foreground);
  letter-spacing: 0.02em; margin-bottom: 0.22rem; }

/* A settings row: label left, control right. Without this the panel has two
   different right edges — a full-width select above a natural-width button —
   which is what made the javascript row look like an orphan. */
.cogrow-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.cogrow-between .coglabel { margin-bottom: 0; }

/* .switch — the control that row wanted. A button with role="switch", so it is
   keyboard- and screen-reader-correct without a library. */
.switch {
  position: relative; flex: none; width: 2.15rem; height: 1.2rem; padding: 0;
  border: 1px solid var(--input); border-radius: 999px;
  background: var(--background); cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.switch::after {
  content: ''; position: absolute; top: 50%; left: 0.16rem; translate: 0 -50%;
  width: 0.72rem; height: 0.72rem; border-radius: 50%;
  background: var(--muted-foreground);
  transition: left 0.15s ease, background 0.15s ease;
}
.switch:hover { border-color: var(--primary-dim); }
.switch[aria-checked="true"] { background: var(--primary); border-color: var(--primary); }
.switch[aria-checked="true"]::after {
  left: calc(100% - 0.88rem); background: var(--primary-foreground);
}
.switch:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* Headings and the brand follow --display, which the font picker sets. They used
   to inherit the body font, which is why a header face had nowhere to apply. */
h1, h2, h3, .brand, .repocard .rname, .card h3 { font-family: var(--display); }

.select:disabled { opacity: 0.45; cursor: default; }

/* lifecycle badge on repo cards — set by /srv/git-status, never by a commit */
.status{display:inline-block;padding:.05rem .45rem;border-radius:.35rem;
  font-size:.66rem;letter-spacing:.03em;text-transform:lowercase;vertical-align:.02em;
  border:1px solid currentColor;opacity:.8;font-weight:400}
/* Hue comes from the scheme, meaning from weight: the only colours every palette
   exposes are the accent, its dim variant, the destructive red and the greys. */
/* Four distinct tones: the accent, near-white, mid-grey, and the destructive red.
   Every palette defines all four, so no state falls back to a default scheme. */
.status-early{color:var(--fg-strong)}
.status-stable{color:var(--primary)}
.status-maintenance{color:var(--muted-foreground)}
.status-archived{color:var(--destructive)}

/* footer separators */
footer .dot { opacity: .45; margin: 0 .45rem; }
footer .wrap { display: flex; align-items: center; flex-wrap: wrap; }

/* the footer link is metadata, not a call to action: keep it muted like its neighbours */
footer a { color: inherit; }
footer a:hover { color: var(--foreground); }

/* repository state pill, top-right of the header, left of the tabs */
.page-status { margin-left: auto; padding-right: 0.9rem; display: flex; align-items: center; }

/* the state pill sits inline with a heading: centre it on the cap height and give
   it a little air, rather than letting it ride the baseline of a much larger font */
h1 .status, .prose h1 .status { vertical-align: middle; margin-left: 0.6rem; }

/* who to write to: issues and patches both go by mail, nothing else to click */
.contrib { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; }
.contrib .k { color: var(--fg-faint); }
.contrib a { color: inherit; }
.contrib a:hover { color: var(--primary); text-decoration: underline; }
.contrib .guide { margin-top: 0.35rem; }
/* the guide is an action link like "all issues", not a value like an address */
.contrib .guide a { color: var(--primary); }

/* ── the aurora colour scheme ── */
:root {
  --background: #000000;
  --card: #090909;
  --popover: #090909;
  --bg-hover: #121212;
  --border: #1c1c1c;
  --border-soft: #0e0e0e;
  --input: #1c1c1c;
  --foreground: #cfcfcf;
  --fg-strong: #d6d6d6;
  --muted-foreground: #6a6a6a;
  --fg-faint: #303030;
  --primary: #5bc0ae;
  --primary-foreground: #000000;
  --primary-dim: #7fcec0;
  --secondary: rgba(91, 192, 174, 0.1);
  --ring: #5bc0ae;
  --destructive: #cd84b4;
  --destructive-soft: rgba(205, 132, 180, 0.1);
}

/* ── Pygments tokens, generated from the aurora scheme ── */
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.hl .hll { background-color: #ffffcc }
.hl { background: #000000; }
.hl .c { color: #6a6a6a; font-style: italic } /* Comment */
.hl .err { color: #cd84b4 } /* Error */
.hl .k { color: #84cdc3 } /* Keyword */
.hl .n { color: #cfcfcf } /* Name */
.hl .o { color: #cd84b4 } /* Operator */
.hl .p { color: #6a6a6a } /* Punctuation */
.hl .ch { color: #6a6a6a; font-style: italic } /* Comment.Hashbang */
.hl .cm { color: #6a6a6a; font-style: italic } /* Comment.Multiline */
.hl .cp { color: #6a6a6a; font-style: italic } /* Comment.Preproc */
.hl .cpf { color: #6a6a6a; font-style: italic } /* Comment.PreprocFile */
.hl .c1 { color: #6a6a6a; font-style: italic } /* Comment.Single */
.hl .cs { color: #6a6a6a; font-style: italic } /* Comment.Special */
.hl .gd { color: #cd84b4 } /* Generic.Deleted */
.hl .ge { font-style: italic } /* Generic.Emph */
.hl .gh { color: #84cdc3 } /* Generic.Heading */
.hl .gi { color: #84cdc3 } /* Generic.Inserted */
.hl .gs { font-weight: bold } /* Generic.Strong */
.hl .gu { color: #84cdc3 } /* Generic.Subheading */
.hl .kc { color: #cda184 } /* Keyword.Constant */
.hl .kd { color: #84cdc3 } /* Keyword.Declaration */
.hl .kn { color: #84cdc3 } /* Keyword.Namespace */
.hl .kp { color: #84cdc3 } /* Keyword.Pseudo */
.hl .kr { color: #84cdc3 } /* Keyword.Reserved */
.hl .kt { color: #9f84cd } /* Keyword.Type */
.hl .m { color: #cda184 } /* Literal.Number */
.hl .s { color: #84cd9c } /* Literal.String */
.hl .na { color: #cfcfcf } /* Name.Attribute */
.hl .nb { color: #9f84cd } /* Name.Builtin */
.hl .nc { color: #9f84cd } /* Name.Class */
.hl .no { color: #cda184 } /* Name.Constant */
.hl .nd { color: #8497cd } /* Name.Decorator */
.hl .ni { color: #cfcfcf } /* Name.Entity */
.hl .ne { color: #9f84cd } /* Name.Exception */
.hl .nf { color: #84b4cd } /* Name.Function */
.hl .nl { color: #6a6a6a } /* Name.Label */
.hl .nn { color: #9f84cd } /* Name.Namespace */
.hl .nx { color: #cfcfcf } /* Name.Other */
.hl .py { color: #cfcfcf } /* Name.Property */
.hl .nt { color: #9f84cd } /* Name.Tag */
.hl .nv { color: #cfcfcf } /* Name.Variable */
.hl .ow { color: #84cdc3 } /* Operator.Word */
.hl .pm { color: #6a6a6a } /* Punctuation.Marker */
.hl .w { color: #cfcfcf } /* Text.Whitespace */
.hl .mb { color: #cda184 } /* Literal.Number.Bin */
.hl .mf { color: #cda184 } /* Literal.Number.Float */
.hl .mh { color: #cda184 } /* Literal.Number.Hex */
.hl .mi { color: #cda184 } /* Literal.Number.Integer */
.hl .mo { color: #cda184 } /* Literal.Number.Oct */
.hl .sa { color: #84cd9c } /* Literal.String.Affix */
.hl .sb { color: #84cd9c } /* Literal.String.Backtick */
.hl .sc { color: #84cd9c } /* Literal.String.Char */
.hl .dl { color: #84cd9c } /* Literal.String.Delimiter */
.hl .sd { color: #6a6a6a; font-style: italic } /* Literal.String.Doc */
.hl .s2 { color: #84cd9c } /* Literal.String.Double */
.hl .se { color: #cda184 } /* Literal.String.Escape */
.hl .sh { color: #84cd9c } /* Literal.String.Heredoc */
.hl .si { color: #84cdc3 } /* Literal.String.Interpol */
.hl .sx { color: #84cd9c } /* Literal.String.Other */
.hl .sr { color: #84cd9c } /* Literal.String.Regex */
.hl .s1 { color: #84cd9c } /* Literal.String.Single */
.hl .ss { color: #84cd9c } /* Literal.String.Symbol */
.hl .bp { color: #9f84cd } /* Name.Builtin.Pseudo */
.hl .fm { color: #84b4cd } /* Name.Function.Magic */
.hl .vc { color: #cfcfcf } /* Name.Variable.Class */
.hl .vg { color: #cfcfcf } /* Name.Variable.Global */
.hl .vi { color: #cfcfcf } /* Name.Variable.Instance */
.hl .vm { color: #cfcfcf } /* Name.Variable.Magic */
.hl .il { color: #cda184 } /* Literal.Number.Integer.Long */
