/* ===========================================================================
   cgit — "hic svnt dracones"
   Full replacement for cgit.css. Point at it with `css=/dragons.css`.

   Concept: modern plumbing, antique marginalia. The chrome — titles, tabs,
   section rules, prose — is a portolan chart drawn in iron-gall ink on vellum.
   The data itself stays in a hard monospace, because a commit hash is not a
   thing you set in Garamond.

   Parchment by default; a night-chart palette under prefers-color-scheme:dark.
   No web fonts.
   =========================================================================== */

:root {
  color-scheme: light dark;

  /* Renaissance-ish serif for everything that is language */
  --chart: "Hoefler Text", "Palatino Linotype", "Book Antiqua", Palatino,
           "Iowan Old Style", "EB Garamond", Garamond, serif;
  /* Hard mono for everything that is machine */
  --mono: "JetBrains Mono", "Iosevka", "SF Mono", "Cascadia Mono",
          "DejaVu Sans Mono", ui-monospace, monospace;

  --step--1: 0.8125rem;
  --step-0:  0.875rem;
  --step-1:  1.0625rem;
  --step-2:  1.375rem;
  --step-3:  1.875rem;

  --rule: 1px;
  --radius: 2px;
}

/* --- vellum (default) ----------------------------------------------------- */
:root {
  --bg:        #e3d7ba;   /* aged vellum, toned toward ochre */
  --surface:   #ece2ca;
  --surface-2: #dccdaa;
  --border:    #b9a67f;
  --border-hi: #8f7a52;

  --fg:        #2e2417;   /* iron-gall ink */
  --fg-strong: #191106;
  --fg-dim:    #6a5a3f;
  --fg-faint:  #93815e;

  --link:      #3c5f4a;   /* verdigris pigment */
  --link-hi:   #223b2c;
  --rubric:    #9e3520;   /* vermilion, for rubrication */
  --gold:      #a67424;   /* ochre / gold leaf */
  --sea:       #3f5a76;   /* chart indigo */

  --add:       #3d6b41;
  --add-bg:    #d9e0c2;
  --del:       #9e3520;
  --del-bg:    #eed6c9;
  --upd:       #8a6415;
  --hunk:      #3f5a76;
  --hunk-bg:   #d8dcc9;

  --sel:       #cbb98f;
  --grain:     0.045;     /* set to 0 to remove the parchment texture */
}

/* --- night chart ---------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14161b;
    --surface:   #1a1d24;
    --surface-2: #21252d;
    --border:    #333a45;
    --border-hi: #4a5361;

    --fg:        #d3c9b2;
    --fg-strong: #f0e7d2;
    --fg-dim:    #93897a;
    --fg-faint:  #6a6459;

    --link:      #7ca88a;
    --link-hi:   #a2c9ad;
    --rubric:    #c9573c;
    --gold:      #c99a45;
    --sea:       #6c90b5;

    --add:       #74a678;
    --add-bg:    #1a2620;
    --del:       #c06a55;
    --del-bg:    #2a1c18;
    --upd:       #bb9a4f;
    --hunk:      #6c90b5;
    --hunk-bg:   #1a222c;

    --sel:       #33404a;
    --grain:     0.03;
  }
}

/* --- base ----------------------------------------------------------------- */

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  color: var(--fg);
  background-color: var(--bg);
  /* Parchment grain: three offset radial washes. Cheap, no images. */
  background-image:
    radial-gradient(ellipse at 18% 22%, rgba(120, 90, 40, var(--grain)) 0%, transparent 55%),
    radial-gradient(ellipse at 82% 68%, rgba(90, 60, 20, var(--grain)) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 95%, rgba(140, 110, 60, var(--grain)) 0%, transparent 60%);
  background-attachment: fixed;
  font-family: var(--mono);
  font-size: var(--step-0);
  line-height: 1.55;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hi); text-decoration: underline; text-underline-offset: 2px; }

a:focus-visible, input:focus-visible,
select:focus-visible, button:focus-visible {
  outline: 2px solid var(--rubric);
  outline-offset: 2px;
}

img { border: none; max-width: 100%; }
::selection { background: var(--sel); }

/* The whole page sits inside a double-ruled cartouche, the way a chart sits
   inside its border. */
div#cgit {
  max-width: 1180px;
  margin: 1.25rem auto 3rem;
  padding: 1.5rem 1.75rem 2.5rem;
  border: var(--rule) solid var(--border-hi);
  outline: var(--rule) solid var(--border-hi);
  outline-offset: 4px;
  background: color-mix(in srgb, var(--surface) 45%, transparent);
}

/* --- header --------------------------------------------------------------- */

div#cgit table#header { width: 100%; border-collapse: collapse; }

/* NB: the global `img { max-width: 100% }` resolves against this cell's width,
   so a zero-width cell collapses the logo to nothing. Hence 1% + max-width:none. */
div#cgit table#header td.logo {
  width: 1%;
  padding: 0 1.1rem 0 0;
  vertical-align: middle;
}
div#cgit table#header td.logo img {
  display: block;
  width: 52px;
  height: 52px;
  max-width: none;
  opacity: 0.85;
}

/* Root title in spaced small caps — the cartouche lettering */
div#cgit table#header td.main {
  font-family: var(--chart);
  font-size: var(--step-3);
  font-variant: small-caps;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--fg-strong);
  padding: 0;
}
div#cgit table#header td.main a { color: var(--fg-strong); }
div#cgit table#header td.main a:hover { color: var(--rubric); text-decoration: none; }

div#cgit table#header td.sub {
  font-family: var(--chart);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--fg-dim);
  padding: 0.2rem 0 0.9rem;
  border-bottom: var(--rule) solid var(--border-hi);
  box-shadow: 0 3px 0 -2px var(--border-hi);   /* second hairline = double rule */
}
div#cgit table#header td.sub.right { text-align: right; }
div#cgit table#header td.form { text-align: right; vertical-align: middle; padding: 0; }
div#cgit table#header td.form form { display: inline; }

/* --- form controls -------------------------------------------------------- */

input, select, button, textarea {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--fg);
  background: var(--surface);
  border: var(--rule) solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 0.4rem;
}
input[type='submit'], button {
  font-family: var(--chart);
  font-variant: small-caps;
  letter-spacing: 0.08em;
  background: var(--surface-2);
  color: var(--fg-dim);
  cursor: pointer;
}
input[type='submit']:hover, button:hover { color: var(--rubric); border-color: var(--border-hi); }

/* --- tab bar -------------------------------------------------------------- */

div#cgit table.tabs {
  width: 100%;
  border-collapse: collapse;
  border-bottom: var(--rule) solid var(--border);
  margin: 1rem 0 1.5rem;
}
div#cgit table.tabs td { padding: 0; }

div#cgit table.tabs td a {
  display: inline-block;
  font-family: var(--chart);
  font-variant: small-caps;
  font-size: var(--step-1);
  letter-spacing: 0.1em;
  padding: 0.4rem 0.85rem;
  color: var(--fg-dim);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
div#cgit table.tabs td a:hover { color: var(--fg-strong); text-decoration: none; }
div#cgit table.tabs td a.active {
  color: var(--rubric);
  border-bottom-color: var(--rubric);
  font-weight: 600;
}
div#cgit table.tabs td.form { text-align: right; padding-right: 0.25rem; }
div#cgit table.tabs td.form form { display: inline-block; padding: 0.3rem 0; }

/* --- content -------------------------------------------------------------- */

div#cgit div.content { padding: 0; }

/* SIGNATURE: an error is genuinely uncharted water, so it gets the legend.
   The real message stays plain and legible underneath. */
div#cgit div.error {
  position: relative;
  color: var(--fg-strong);
  background: var(--del-bg);
  border: var(--rule) solid var(--del);
  border-radius: var(--radius);
  padding: 2.1rem 1rem 0.9rem;
  margin: 1.5rem 0;
}
div#cgit div.error::before {
  content: "HIC · SVNT · DRACONES";
  position: absolute;
  top: 0.55rem;
  left: 1rem;
  font-family: var(--chart);
  font-size: var(--step--1);
  font-variant: small-caps;
  letter-spacing: 0.28em;
  color: var(--del);
  opacity: 0.85;
}

div#cgit div.path {
  font-family: var(--chart);
  font-style: italic;
  color: var(--fg-dim);
  font-size: var(--step-1);
  margin-bottom: 0.6rem;
}

/* --- generic tables ------------------------------------------------------- */

div#cgit table.list {
  width: 100%;
  border-collapse: collapse;
  border: var(--rule) solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  margin-bottom: 1.75rem;
}

div#cgit table.list th {
  font-family: var(--chart);
  font-variant: small-caps;
  font-weight: 600;
  font-size: var(--step-1);
  letter-spacing: 0.1em;
  text-align: left;
  color: var(--fg-dim);
  background: var(--surface-2);
  border-bottom: var(--rule) solid var(--border-hi);
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
}
div#cgit table.list th a { color: var(--fg-dim); }
div#cgit table.list th a:hover { color: var(--rubric); }

div#cgit table.list td {
  padding: 0.4rem 0.7rem;
  border-bottom: var(--rule) solid var(--border);
  vertical-align: top;
}
div#cgit table.list tr:last-child td { border-bottom: none; }
div#cgit table.list tr:hover:not(.nohover):not(.nohover-highlight) { background: var(--surface-2); }
div#cgit table.list tr.nohover:hover { background: transparent; }

div#cgit table.list td.commitgraph {
  font-family: var(--mono);
  white-space: pre;
  color: var(--fg-faint);
  padding-right: 0.3rem;
}
div#cgit table.list td.logsubject { color: var(--fg-strong); font-weight: 500; }
div#cgit table.list td.logsubject a { color: var(--fg-strong); }
div#cgit table.list td.logsubject a:hover { color: var(--rubric); }
div#cgit table.list td.logmsg {
  white-space: pre-wrap;
  color: var(--fg-dim);
  background: var(--surface-2);
  padding: 0.6rem 0.9rem;
  font-size: var(--step--1);
}

/* Repo sections as chart regions, marked with a rubricated fleuron */
div#cgit table.list td.reposection {
  font-family: var(--chart);
  font-variant: small-caps;
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--rubric);
  background: transparent;
  border-bottom: var(--rule) solid var(--border-hi);
  padding: 1.4rem 0.7rem 0.3rem;
}
div#cgit table.list td.reposection::before {
  content: "❧ ";
  color: var(--gold);
  letter-spacing: 0;
}

div#cgit table.list td.sublevel-repo { padding-left: 1.8rem; }
/* cgit emits td.toplevel-repo / td.sublevel-repo, never td.repo */
div#cgit table.list td.toplevel-repo a,
div#cgit table.list td.sublevel-repo a { font-weight: 600; letter-spacing: 0.01em; }
div#cgit table.list td.owner { color: var(--fg-faint); font-size: var(--step--1); }
div#cgit table.list td.links a { font-size: var(--step--1); }

div#cgit a.button {
  display: inline-block;
  font-family: var(--chart);
  font-variant: small-caps;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  padding: 0.05rem 0.45rem;
  border: var(--rule) solid var(--border);
  border-radius: var(--radius);
  color: var(--fg-dim);
}
div#cgit a.button:hover { color: var(--rubric); border-color: var(--border-hi); text-decoration: none; }

/* --- age: soundings -------------------------------------------------------
   Fresh commits are freshly inked; old ones have faded on the vellum. Recency
   is real information, so it is the one thing allowed to vary in weight.     */

div#cgit span.age-mins   { color: var(--rubric); font-weight: 700; }
div#cgit span.age-hours  { color: var(--rubric); font-weight: 600; }
div#cgit span.age-days   { color: var(--gold);   font-weight: 500; }
div#cgit span.age-weeks  { color: var(--fg-dim); }
div#cgit span.age-months { color: var(--fg-faint); }
div#cgit span.age-years  { color: var(--fg-faint); opacity: 0.6; font-style: italic; }

/* --- refs / decorations --------------------------------------------------- */

div#cgit a.branch-deco, div#cgit a.tag-deco,
div#cgit a.remote-deco, div#cgit a.deco {
  display: inline-block;
  font-family: var(--chart);
  font-variant: small-caps;
  font-size: var(--step--1);
  letter-spacing: 0.05em;
  margin: 0 0.15rem;
  padding: 0 0.4rem;
  border: var(--rule) solid var(--border-hi);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--fg-dim);
}
div#cgit a.branch-deco { border-color: var(--link);   color: var(--link); }
div#cgit a.tag-deco    { border-color: var(--gold);   color: var(--gold); }
div#cgit a.remote-deco { border-color: var(--sea);    color: var(--sea); }

/* --- tree ----------------------------------------------------------------- */

div#cgit a.ls-dir  { color: var(--link); font-weight: 600; }
div#cgit a.ls-blob { color: var(--fg); }
div#cgit a.ls-mod  { color: var(--gold); }
div#cgit td.ls-size, div#cgit td.ls-mode {
  color: var(--fg-faint);
  font-size: var(--step--1);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* --- blob ----------------------------------------------------------------- */

div#cgit table.blob {
  width: 100%;
  border-collapse: collapse;
  border: var(--rule) solid var(--border);
  background: var(--surface);
}
div#cgit table.blob td.linenumbers {
  vertical-align: top;
  text-align: right;
  background: var(--surface-2);
  border-right: var(--rule) solid var(--border-hi);
  padding: 0.6rem 0.55rem;
  user-select: none;
}
div#cgit table.blob td.linenumbers a { color: var(--fg-faint); font-variant-numeric: tabular-nums; }
div#cgit table.blob td.linenumbers a:hover { color: var(--rubric); text-decoration: none; }
div#cgit table.blob td.linenumbers a:target { color: var(--rubric); font-weight: 700; }
div#cgit table.blob td.lines { vertical-align: top; padding: 0.6rem 0 0.6rem 0.75rem; width: 100%; }
div#cgit table.blob pre, div#cgit table.bin-blob pre {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--step-0);
  line-height: 1.5;
  tab-size: 4;
}
div#cgit table.bin-blob { border: var(--rule) solid var(--border); background: var(--surface); width: 100%; }
div#cgit table.bin-blob td { padding: 0.15rem 0.5rem; color: var(--fg-dim); }
div#cgit table.bin-blob th { color: var(--fg-faint); }

/* --- commit --------------------------------------------------------------- */

div#cgit table.commit-info {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: var(--rule) solid var(--border);
  margin-bottom: 1rem;
}
div#cgit table.commit-info th {
  font-family: var(--chart);
  font-variant: small-caps;
  font-size: var(--step-1);
  letter-spacing: 0.08em;
  text-align: left;
  font-weight: 600;
  color: var(--fg-dim);
  padding: 0.3rem 0.75rem;
  white-space: nowrap;
  vertical-align: top;
}
div#cgit table.commit-info td { padding: 0.3rem 0.75rem; }

div#cgit div.commit-subject {
  font-family: var(--chart);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--fg-strong);
  margin-bottom: 0.6rem;
}
div#cgit div.commit-msg {
  font-family: var(--mono);
  white-space: pre-wrap;
  background: var(--surface);
  border-left: 3px solid var(--gold);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}
div#cgit div.notes-header { font-family: var(--chart); font-variant: small-caps; color: var(--fg-dim); margin-top: 1rem; }
div#cgit div.notes {
  background: var(--surface-2);
  border: var(--rule) solid var(--border);
  padding: 0.6rem 0.9rem;
  white-space: pre-wrap;
}
div#cgit td.oid, div#cgit td.sha1 { font-family: var(--mono); color: var(--fg-dim); }

/* --- diffstat ------------------------------------------------------------- */

div#cgit div.diffstat-header {
  font-family: var(--chart);
  font-variant: small-caps;
  font-size: var(--step-2);
  letter-spacing: 0.08em;
  color: var(--fg-strong);
  border-bottom: var(--rule) solid var(--border-hi);
  padding-bottom: 0.3rem;
  margin-bottom: 0.5rem;
}
div#cgit table.diffstat { width: 100%; border-collapse: collapse; margin-bottom: 1.75rem; }
div#cgit table.diffstat td { padding: 0.15rem 0.5rem; border-bottom: var(--rule) solid var(--border); }
div#cgit table.diffstat td.mode { color: var(--fg-faint); white-space: nowrap; }
div#cgit table.diffstat td.add { color: var(--add); }
div#cgit table.diffstat td.del { color: var(--del); }
div#cgit table.diffstat td.upd { color: var(--upd); }
div#cgit table.diffstat td.graph { width: 500px; vertical-align: middle; }
div#cgit table.diffstat td.graph table { width: 100%; border-collapse: collapse; }
div#cgit table.diffstat td.graph td { padding: 0; border: none; height: 7px; }
div#cgit table.diffstat td.graph td.add { background: var(--add); }
div#cgit table.diffstat td.graph td.rem { background: var(--del); }
div#cgit table.diffstat td.graph td.none { background: transparent; }

/* --- unified diff --------------------------------------------------------- */

div#cgit table.diff { width: 100%; border: var(--rule) solid var(--border); background: var(--surface); }
div#cgit table.diff td { padding: 0.5rem 0; }
div#cgit table.diff td div.head {
  font-family: var(--chart);
  font-weight: 700;
  font-size: var(--step-1);
  color: var(--fg-strong);
  background: var(--surface-2);
  border-top: var(--rule) solid var(--border-hi);
  border-bottom: var(--rule) solid var(--border);
  padding: 0.4rem 0.75rem;
  margin-top: 0.5rem;
}
div#cgit table.diff td div.hunk { color: var(--hunk); background: var(--hunk-bg); padding: 0.1rem 0.75rem; }
div#cgit table.diff td div.add  { color: var(--add);  background: var(--add-bg);  padding: 0 0.75rem; }
div#cgit table.diff td div.del  { color: var(--del);  background: var(--del-bg);  padding: 0 0.75rem; }
div#cgit table.diff td div.ctx  { color: var(--fg-dim); padding: 0 0.75rem; }

/* --- side-by-side diff ---------------------------------------------------- */

div#cgit table.ssdiff { width: 100%; border-collapse: collapse; }
div#cgit table.ssdiff td {
  font-family: var(--mono);
  font-size: var(--step--1);
  padding: 0 0.4rem;
  border: none;
  white-space: pre-wrap;
  word-break: break-all;
}
div#cgit table.ssdiff td.lineno {
  color: var(--fg-faint);
  background: var(--surface-2);
  text-align: right;
  user-select: none;
  border-right: var(--rule) solid var(--border);
  font-variant-numeric: tabular-nums;
}
div#cgit table.ssdiff td.add          { background: var(--add-bg); color: var(--add); }
div#cgit table.ssdiff td.add_dark     { background: var(--add-bg); color: var(--add); filter: brightness(0.92); }
div#cgit table.ssdiff td.del          { background: var(--del-bg); color: var(--del); }
div#cgit table.ssdiff td.del_dark     { background: var(--del-bg); color: var(--del); filter: brightness(0.92); }
div#cgit table.ssdiff td.changed      { background: var(--hunk-bg); color: var(--upd); }
div#cgit table.ssdiff td.changed_dark { background: var(--hunk-bg); color: var(--upd); filter: brightness(0.92); }
div#cgit table.ssdiff td.hunk { background: var(--hunk-bg); color: var(--hunk); border-top: var(--rule) solid var(--border); }
div#cgit table.ssdiff td.head { background: var(--surface-2); color: var(--fg-strong); font-weight: 700; }
div#cgit table.ssdiff td.space { background: transparent; }

/* --- stats ---------------------------------------------------------------- */

div#cgit table.stats { border-collapse: collapse; border: var(--rule) solid var(--border); background: var(--surface); }
div#cgit table.stats th {
  font-family: var(--chart);
  font-variant: small-caps;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  color: var(--fg-dim);
  padding: 0.3rem 0.6rem;
}
div#cgit table.stats td {
  padding: 0.25rem 0.6rem;
  border-bottom: var(--rule) solid var(--border);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
div#cgit table.stats td.sum { font-weight: 700; color: var(--rubric); }
div#cgit table.stats td.left { text-align: left; }

/* --- clone / downloads ---------------------------------------------------- */

div#cgit div.cgit-panel {
  float: right;
  margin-top: 0.4rem;
  border: var(--rule) solid var(--border);
  background: var(--surface);
  padding: 0.4rem 0.7rem;
  font-size: var(--step--1);
}
div#cgit div.cgit-panel table { border-collapse: collapse; }
div#cgit div.cgit-panel td { padding: 0.1rem 0.3rem; }

div#cgit table#downloads { float: right; border-collapse: collapse; margin-left: 1rem; }
div#cgit table#downloads th {
  font-family: var(--chart);
  font-variant: small-caps;
  background: var(--surface-2);
  color: var(--fg-dim);
  padding: 0.25rem 0.5rem;
}
div#cgit table#downloads td { padding: 0.15rem 0.5rem; }

/* --- pager ---------------------------------------------------------------- */

div#cgit ul.pager {
  list-style: none;
  display: flex;
  gap: 0.35rem;
  justify-content: center;
  padding: 0;
  margin: 1.25rem 0;
}
div#cgit ul.pager li a {
  display: block;
  font-family: var(--chart);
  padding: 0.1rem 0.55rem;
  border: var(--rule) solid var(--border);
  border-radius: var(--radius);
  color: var(--fg-dim);
}
div#cgit ul.pager li a:hover { color: var(--rubric); border-color: var(--border-hi); text-decoration: none; }
div#cgit ul.pager li.current a { color: var(--rubric); border-color: var(--rubric); }

/* --- about / README prose -------------------------------------------------
   Real sentences get the chart face, a measure, and a drop-cap on the opening
   paragraph. This is the only long-form reading surface on the site.        */

div#cgit div.content > p,
div#cgit div.content > ul,
div#cgit div.content > ol,
div#cgit div.content > blockquote,
div#cgit div.content > h1,
div#cgit div.content > h2,
div#cgit div.content > h3,
div#cgit div.content .markdown-body {
  font-family: var(--chart);
  font-size: var(--step-1);
  line-height: 1.72;
  max-width: 68ch;
}

div#cgit div.content > h1,
div#cgit div.content > h2,
div#cgit div.content > h3 {
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: var(--fg-strong);
  margin: 1.9rem 0 0.5rem;
}
div#cgit div.content > h1 {
  font-size: var(--step-3);
  border-bottom: var(--rule) solid var(--border-hi);
  padding-bottom: 0.25rem;
}
div#cgit div.content > h2 { font-size: var(--step-2); color: var(--rubric); }

div#cgit div.content > h1 + p::first-letter {
  font-size: 3.1em;
  line-height: 0.85;
  float: left;
  padding: 0.06em 0.09em 0 0;
  color: var(--rubric);
  font-weight: 600;
}

div#cgit div.content > blockquote {
  border-left: 3px solid var(--gold);
  margin-left: 0;
  padding-left: 1rem;
  font-style: italic;
  color: var(--fg-dim);
}

div#cgit div.content code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  border: var(--rule) solid var(--border);
  border-radius: var(--radius);
  padding: 0.05em 0.3em;
}
div#cgit div.content > pre {
  font-family: var(--mono);
  background: var(--surface);
  border: var(--rule) solid var(--border);
  padding: 0.75rem 1rem;
  overflow-x: auto;
}
div#cgit div.content > pre code { background: none; border: none; padding: 0; }

/* --- footer --------------------------------------------------------------- */

div#cgit div.footer {
  margin-top: 2.5rem;
  padding-top: 0.75rem;
  border-top: var(--rule) solid var(--border-hi);
  text-align: center;
  font-family: var(--chart);
  font-style: italic;
  font-size: var(--step--1);
  color: var(--fg-faint);
}
div#cgit div.footer a { color: var(--fg-faint); }
div#cgit div.footer a:hover { color: var(--fg-dim); }

/* --- Pygments (source-filter) --------------------------------------------- */

div#cgit .highlight pre { background: none; }
div#cgit .highlight .c, div#cgit .highlight .c1,
div#cgit .highlight .cm, div#cgit .highlight .cs { color: var(--fg-faint); font-style: italic; }
div#cgit .highlight .k, div#cgit .highlight .kd,
div#cgit .highlight .kn, div#cgit .highlight .kr { color: var(--link); font-weight: 600; }
div#cgit .highlight .kt { color: var(--sea); }
div#cgit .highlight .s, div#cgit .highlight .s1,
div#cgit .highlight .s2, div#cgit .highlight .sb { color: var(--add); }
div#cgit .highlight .m, div#cgit .highlight .mi,
div#cgit .highlight .mf, div#cgit .highlight .mh { color: var(--gold); }
div#cgit .highlight .nf, div#cgit .highlight .nd { color: var(--rubric); }
div#cgit .highlight .nc, div#cgit .highlight .nn { color: var(--fg-strong); font-weight: 600; }
div#cgit .highlight .o, div#cgit .highlight .p  { color: var(--fg-dim); }
div#cgit .highlight .err { color: var(--del); background: var(--del-bg); }

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 720px) {
  div#cgit {
    margin: 0.5rem;
    padding: 1rem 0.75rem 2rem;
    outline-offset: 2px;
  }
  div#cgit table#header td.logo { display: none; }
  div#cgit table#header td.main { font-size: var(--step-2); letter-spacing: 0.08em; }
  div#cgit table.tabs td a { padding: 0.35rem 0.45rem; font-size: var(--step-0); letter-spacing: 0.04em; }
  div#cgit div.cgit-panel, div#cgit table#downloads { float: none; margin: 0.5rem 0; }
  div#cgit table.list td, div#cgit table.list th { padding: 0.3rem 0.45rem; }
  div#cgit table.diffstat td.graph { display: none; }
  div#cgit div.content > h1 + p::first-letter { font-size: 2.4em; }
}

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