*{margin:0;padding:0;box-sizing:border-box}:root{--bg1:#fff;--bg2:#eee;--bg3:#ddd;--fg1:#222;--fg2:#555;--blue:#4f718d;--monospace:'Menlo', 'Cascadia Code', 'Lucida Console', monospace}@media only screen and (prefers-color-scheme:dark){:root{--bg1:#222;--bg2:#333;--bg3:#444;--fg1:#ddd;--fg2:#aaa;--blue:#81a2be}}@media only print{:root{--bg1:#fff;--bg2:#fff;--bg3:#fff;--fg1:#000;--fg2:#000;--blue:#00f}}html{color:var(--fg1);background:var(--bg1)}header nav,main{max-width:800px;margin:auto;padding:1rem}header nav{border-bottom:3px solid var(--bg2);display:flex;align-items:center;justify-content:space-between;gap:0 1rem;flex-flow:wrap;font-family:var(--monospace)}header a{color:var(--fg1);text-decoration:none}header .title{font:small-caps 700 1.25rem var(--monospace)}h1{font-size:2rem;text-align:center}h2{font-size:1.5rem}h3{font-size:1.1rem}*+h1,*+h2{margin-top:2rem}*+h3{margin-top:1.5rem}h1,p,ul:not(li ul),ol:not(li ol),pre{margin-bottom:1rem}h2,h3,li>p{margin-bottom:.5rem}li{margin:.25rem 0 .25rem 2rem}p{line-height:1.4rem}a{color:var(--blue)}pre,code{background-color:var(--bg2);font-family:var(--monospace)}code:not(pre code){padding:0 .25rem}pre{padding:.5rem;overflow-x:auto}blockquote{margin-left:1.25rem;border-left:.25rem solid var(--bg3);padding-left:.5rem;color:var(--fg2)}.center{text-align:center}
/******** stagit specific styles ********/

/* Red and green colors */
:root {
    --red: #d53f49;
    --green: #1f883d;
}
@media only screen and (prefers-color-scheme: dark) {
    :root {
        --red: #ff4d4d;
        --green: #20df20;
    }
}

/* Stagit container */
body {
    width: 800px;
    max-width: 100%;
    margin: auto;
}
body > *:not(header) {
    margin: 1rem auto;
    padding: 0 1rem;
    font-size: 14px;
}

/* General styles */
table {
    width: 100%;
    border-collapse: collapse;
}
table td, table th {
    padding: 0.25rem;
}
hr {
    display: none;
}
#content, pre {
    overflow-x: auto;
}
#content table {
    min-width: 100%;
    width: max-content;
}
#content img {
    max-width: 100%;
}

/* Remove styling from certain links */
tr.url a,   /* header git url */
a.line,     /* blob line numbers */
a.h,        /* diff chunk headers */
a.i,        /* diff insertions */
a.d {       /* diff deletions */
    color: var(--foreground);
    text-decoration: none;
}

/* Apply monospace font to certain elements */
.url,                               /* repo clone url */
#index a,                           /* repo links */
h1:has(+ .desc),                    /* repo titles */
#files tbody td:not(:last-child),   /* file mode and file path */
#tags tbody td:first-child,         /* tag names */
#branches tbody td:first-child      /* branch names */
{
    font-family: var(--monospace);
}

/* Stagit header */
body > table:first-of-type {
    text-align: center;
}
body > table:first-of-type td:first-child {
    display: none;
}
body > table:first-of-type span.desc:not(h1 + span) {
    font-weight: bold;
    font-size: 1.5rem;
}
body > table:first-of-type tr.url td:last-child:before {
    content: '$ ';
}
#content:not(:has(#index)) {
    margin-top: 1rem;
    border-top: 3px solid var(--bg2);
    padding-top: 1rem;
}

/* Stagit repository list */
#index {
    /* Compress table to fit screen */
    max-width: 100%;
}
#index td:nth-child(2) {
    /* Limit width of repo description */
    max-width: 500px;
}
#index td:nth-child(3),
#index td:nth-child(4) {
    /* Hide owner and last commit columns */
    display: none;
}

/* Stagit log pages */
#log td:nth-child(2) {
    /* Limit width of commit message */
    max-width: 500px;
}
#log td:nth-child(4),
#log td:nth-child(5),
#log td:nth-child(6) {
    /* Hide columns containing number of files, insertions, and deletions */
    display: none;
}

/* Stagit commit pages */
div#content pre:first-child {
    background: none;
}
div#content pre + pre b {
    display: inline-block;
    margin-top: 1rem;
}
a.h {
    font-weight: bold;
}
span.i, a.i, td.A {
    color: var(--green);
}
span.d, a.d, td.D {
    color: var(--red);
}

/* Stagit file pages */
div#content:not(.readme) > p:first-child {
    font-weight: bold;
}

/* README overrides */
.readme table {
    margin-bottom: 1rem;
}
.readme th, .readme td {
    border: 1px solid var(--fg2);
}