:root {
    /* General UI */
    --bg: #0f0f0f;
    --bg-secondary: #3f3f3f;
	--primary: #ddd;
	--secondary: #666;
	--link: #1c1;
	--link-hover: #1f1;

    /* Delete, cancel, etc. */
    --danger: #c11;
    --danger-hover: #f11;
    --warning: #cc1;
    --warning-hover: #ff1;

    /* Table stripes */
    --table-primary: #202020;
    --table-secondary: #292929;

    /* For the "Beta" and "Test env" text colors */
    --yellow: #ff0;
    --red: #f00;

    /* Fonts (duh) */
    --monospace-font: monospace;
    --font: system-ui;
    --font-size: 1rem;
    --table-font-size: 0.8rem;
}

/* General colors */

body {
	background-color: var(--bg);
	color: var(--primary);
    font-family: var(--font);
    margin: auto;
    word-wrap: break-word;
    text-align: justify;
    font-size: var(--font-size);
    line-height: 1.5;
    padding: 1em;
    max-width: 1500px;
    overflow-y: scroll;
}

hr {
    color: var(--secondary);
}

/* Custom focus */

a:focus {
    outline: none;
    text-decoration: underline;
}

/* Header */

h1 {
    text-align: center;
}

/* Links */

a, a:hover, a:active, a:visited {
    color: var(--link);
    text-decoration: none;
}

a:hover, a:active {
    color: var(--link-hover);
}

/* Text */

pre {
    margin: 0px;
    overflow-x: auto;
}

pre, code {
    font-family: var(--monospace-font);
    background-color: var(--bg-secondary);
    padding: 1px 0.2rem;
    border-radius: 0.2rem;
}

pre > code {
    padding: 0;
    background-color: transparent;
}

ol, ul {
    padding-left: 1.5rem;
}

li {
    margin-top: 0.3rem;
    text-align: left;
}

.main {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
}

.content {
    max-width: 900px;
    overflow: hidden;
}

.nav {
    max-width: 300px;
    min-width: max-content;
    width: 100%;
    padding-right: 0.5em;
    margin-top: 5em;
}

.nav > details > summary {
    display: none;
}

/* Table */

.table-container {
    overflow-x: auto;
}

table {
	font-family: var(--monospace-font);
    font-size: var(--table-font-size);
}

table pre {
    padding: 0;
    margin: 0;
}

th {
    padding: 0 1rem 0 0.5rem;
}

td {
	padding: 0 0.5rem 0 0.5rem;
    padding: 1em;
}

table tr:nth-child(odd) td {
    background-color: var(--table-primary);
}

table tr:nth-child(even) td {
    background-color: var(--table-secondary);
}

@media (max-width: 900px) {
    .main {
        margin-left: auto;
        margin-right: auto;
        grid-template-columns: auto;
        grid-template-rows: auto auto;
    }

    .nav {
        margin-top: 0;
    }

    .nav > details > summary {
        display: list-item;
    }
}

/* zola syntax highlighting */
.giallo-l {
    display: inline-block;
    min-height: 1lh;
    width: 100%;
}

.giallo-ln {
    display: inline-block;
    user-select: none;
    margin-right: 0.4em;
    padding: 0.4em;
    min-width: 3ch;
    text-align: right;
    opacity: 0.8;
}
