:root {
  color-scheme: light dark;
  --ink: light-dark(#172b25, #f3f3e8);
  --muted: light-dark(#526359, #b8c8bb);
  --line: light-dark(#d4d6c7, #455346);
  --paper: light-dark(#efeee6, #171d1a);
  --panel: light-dark(#fcfbf5, #222a25);
  --accent: light-dark(#315e46, #c6dfb5);
  --surface-hover: light-dark(#e1eadc, #344436);
  --rail: #172820;
  --rail-text: #dce7d9;
  --signal: #e3ef90;
  --signal-ink: #1d2d1f;
  --icon-accent: #b9d18d;
  --warn: light-dark(#865000, #ffda9d);
  --bad: light-dark(#933e34, #ffc2b6);
}

aside { background: var(--rail); color: var(--rail-text); overflow-y: auto; }
.brand { color: #f4f6e9; letter-spacing: -.055em; gap: 8px; }
.brand .mark { width: 35px; height: 35px; background: none; color: inherit; }
.space { margin-block: 23px 12px; color: #adbfaf; }
.space strong { color: var(--rail-text); }
nav a { display: flex; align-items: center; gap: 8px; min-height: 41px; color: var(--rail-text); padding: 7px 9px; border-radius: 7px; }
nav .nav-icon { flex: none; width: 20px; height: 20px; }
nav a:hover { background: #263e30; }
nav a[aria-current=page] { --icon-accent: #46733a; padding-inline: 9px; background: var(--signal); border: 0; color: var(--signal-ink); font-weight: 700; }
aside :focus-visible { outline-color: var(--signal); }
header, .panel, .stats, dialog, select, input, textarea, button, .skip { background: var(--panel); color: var(--ink); }
.panel, .stats { border-radius: 10px; }
.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-list li { padding-block: 10px; overflow-wrap: anywhere; }
.inbox-list li + li { border-top: 1px solid var(--line); }
.inbox-list small { display: block; margin-bottom: 3px; color: var(--muted); }
button { border-color: var(--line); }
button:hover { background: var(--surface-hover); }
button.primary { color: var(--signal-ink); background: var(--signal); border-color: #718a52; font-weight: 680; }
button.primary:hover { background: #d1e57f; }
button.danger { color: var(--bad); }
.textbutton { color: var(--accent); }
.role[hidden] { display: none; }
:focus-visible { outline-color: var(--accent); }
.skip:focus-visible { outline-color: var(--accent); }
.demo { background: light-dark(#e3eadc, #304136); color: light-dark(#34473a, #dce7d9); }
.notice { background: light-dark(#fff6e6, #493723); }
.notice.bad { background: light-dark(#fff0ef, #522f2b); }
.badge { background: light-dark(#e2eddf, #304637); color: light-dark(#25573b, #bbe1c5); }
.badge.warn { background: light-dark(#fff0cc, #503e28); color: light-dark(#774700, #ffda9d); }
.badge.bad { background: light-dark(#fce5e5, #522f2b); color: light-dark(#9b242c, #ffb9ad); }
.badge.neutral { background: light-dark(#e9eee8, #344137); color: var(--muted); }
.diff-file { background: var(--panel); }
.diff-code, #toast { background: var(--rail); color: var(--rail-text); }

main[data-route=overview] .heading:first-child {
  isolation: isolate; position: relative; overflow: hidden; align-items: center;
  border-radius: 11px; background: #243b2d; color: #edf3df; border: 1px solid #41604a;
  min-height: 148px; padding: clamp(14px, 2.6vw, 28px);
}
main[data-route=overview] .heading:first-child::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 19px, #57725a55 19px 20px),
              repeating-linear-gradient(90deg, transparent 0 19px, #57725a55 19px 20px);
  mask-image: linear-gradient(to right, transparent 18%, black);
}
main[data-route=overview] .heading:first-child :is(.lead,.eyebrow) { color: #d3e0cd; }
main[data-route=overview] .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
h1 { font-weight: 750; letter-spacing: -.045em; }
@media (max-width: 640px) {
  aside { overflow: visible; }
  nav { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); overflow: visible; gap: 4px; }
  nav a { flex-direction: column; justify-content: center; gap: 2px; text-align: center; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; min-height: 49px; padding: 4px 2px; font-size: 11px; }
  nav a[aria-current=page] { padding-inline: 2px; }
  main[data-route=overview] .heading:first-child { align-items: flex-start; }
}
@media (max-width: 420px) {
  nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  nav a { overflow-wrap: normal; hyphens: auto; }
  main[data-route=repositories] .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  main[data-route=repositories] .stat { overflow-wrap: anywhere; }
}
