/* Fonts, colors and layout follow antonz.org (themes/antonz/assets/css). */

:root {
    --font-sans:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
        sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --font-monospace:
        ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas,
        "Liberation Mono", monospace;

    --color-text: #222222;
    --color-blue: #008bf5;
    --color-blue-hover: #5cb8ff;
    --color-gray: #555;
    --color-red: #ed7647;
    --color-pre: #eeeeee;
    --color-box: #dddddd;
    --color-border: #c3c3c3;
    --color-bg: #f8f8f8;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-text: #e0e0e0;
        --color-gray: #6c7986;
        --color-red: #ff8a65;
        --color-pre: #222222;
        --color-box: #333333;
        --color-border: #4c4c4c;
        --color-bg: #1a1a1a;
    }
}

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

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    color: var(--color-text);
    font-size: 16px;
    font-family: var(--font-sans);
    line-height: 1.5;
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */

header.site,
main,
footer.site {
    width: 100%;
    padding-left: 1em;
    padding-right: 1em;
}
@media only screen and (min-width: 48em) {
    header.site,
    main,
    footer.site {
        padding-left: 3em;
        padding-right: 3em;
    }
}
@media only screen and (min-width: 62em) {
    header.site,
    main,
    footer.site {
        max-width: 960px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }
}

/* Links */

a {
    color: var(--color-blue);
    border-bottom: 1px solid var(--color-blue);
    text-decoration: none;
}
a:active,
a:hover {
    color: var(--color-blue-hover);
    border-bottom: none;
}
a[href^="#"] {
    border-bottom-style: dashed;
}
a[href^="#"]:active,
a[href^="#"]:hover {
    border-bottom: none;
}

/* Header */

header.site {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25em 1em;
    padding-top: 1em;
}
header.site .name {
    font-weight: 700;
    border: none;
}
header.site .tagline {
    color: var(--color-gray);
}
@media only screen and (min-width: 62em) {
    header.site nav {
        margin-left: auto;
    }
}
header.site nav a {
    display: inline-block;
    margin-right: 1em;
    border: none;
}
header.site nav a:last-child {
    margin-right: 0;
}
header.site nav a[aria-current] {
    color: var(--color-text);
}

/* Main column */

main {
    flex: 1;
    padding-top: 4em;
    padding-bottom: 4em;
    font-size: 1.1rem;
}
main > * {
    max-width: 800px;
}
@media only screen and (min-width: 48em) {
    main {
        font-size: 1.2rem;
    }
}
@media only screen and (min-width: 62em) {
    main {
        font-size: 1.35rem;
    }
}

h1,
h2,
h3 {
    font-weight: 700;
}
h1 {
    font-size: 1.8em;
    line-height: 1.1;
    margin: 0 0 0.5em;
}
h2 {
    font-size: 1.6em;
    font-weight: 700;
    line-height: 1.35;
    margin: 2em 0 0.25em;
}
h3 {
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.35;
    margin: 1em 0 0.25em;
}
h3 a {
    color: var(--color-text);
    border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent);
}
h3 a:hover {
    color: var(--color-blue);
}
h4 {
    font-size: 1em;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.25em;
}
h4 a {
    color: var(--color-text);
    border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent);
}
h4 a:hover {
    color: var(--color-blue);
}

p {
    margin: 0 0 0.8em;
}

.lead,
.note {
    color: var(--color-gray);
}
.note {
    margin-bottom: 1.5em;
}
.toc a {
    margin-right: 1em;
}
.state,
.count {
    margin-left: 0.25em;
    font-size: 0.6em;
    font-weight: normal;
    color: var(--color-gray);
    vertical-align: middle;
}
.empty,
.pending {
    color: var(--color-gray);
    font-style: italic;
}

/* Proposals */

.entry {
    margin: 0 0 2.5em;
}
.entry.brief {
    margin-bottom: 1.25em;
}
.entry.brief .meta {
    margin-bottom: 0;
}

.meta {
    margin: 0 0 0.8em;
    font-size: 0.75em;
    color: var(--color-gray);
}
.meta a {
    color: var(--color-gray);
    border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent);
}
.meta a:hover {
    border-bottom: none;
}
.meta .impact,
.meta time {
    white-space: nowrap;
}

.summary ul,
.summary ol {
    margin: 0 0 0.8em;
    padding-left: 1.5em;
}
.summary li {
    margin: 0 0 0.4em;
}
.summary blockquote {
    margin: 0 0 0.8em;
    padding: 0 1em;
    border-left: 0.3em solid var(--color-gray);
    color: var(--color-gray);
}

code {
    font-family: var(--font-monospace);
}
p > code,
li > code,
p > a > code,
li > a > code {
    background: var(--color-pre);
    font-size: 0.75em;
    border-radius: 0.25em;
    padding: 0.25em;
}
pre {
    margin: 0 0 0.8em;
    background: var(--color-pre);
    overflow-x: auto;
    line-height: 1.35;
    tab-size: 4;
}
pre > code {
    display: block;
    padding: 1.5em;
    font-size: 0.75em;
}

.details {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.25em 1em;
    margin: 2em 0 0;
    font-size: 0.8em;
}
.details dt {
    color: var(--color-gray);
}
.details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Footer */

footer.site {
    padding-top: 1em;
    padding-bottom: 1em;
    color: var(--color-gray);
}
footer.site p {
    max-width: 800px;
    margin: 0 0 0.5em;
}
footer.site a {
    color: inherit;
    border-bottom-color: rgba(153, 153, 153, 0.4);
}
