:root {
    --width: 720px;
    --font-main: Verdana, sans-serif;
    --font-secondary: Verdana, sans-serif;
    --font-scale: 0.9em;
    color-scheme: light;
    --background-color: #f3f8ef;
    --heading-color: #163d20;
    --text-color: #373737;
    --link-color: color-mix(in srgb, #0c890e 80%, #373737);
    --visited-color: #3d034e;
    --blockquote-color: var(--heading-color);
    --accent-color: #0c890e;
    --error-color: #960000;
    --border-color: color-mix(in srgb, #0c890e 35%, transparent);
    --surface-color: #e5f0df;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --background-color: #111d15;
        --heading-color: #e1f9d9;
        --text-color: #e2eddf;
        --link-color: #68f361;
        --visited-color: #24bf29;
        --blockquote-color: #68f361;
        --accent-color: #24bf29;
        --error-color: #ff9100;
        --border-color: color-mix(in srgb, #24bf29 40%, transparent);
        --surface-color: #1c3021;
    }
}

body {
    font-family: var(--font-secondary);
    font-size: var(--font-scale);
    margin: auto;
    padding: 20px;
    max-width: var(--width);
    text-align: left;
    background-color: var(--background-color);
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    color: var(--heading-color);
}

a {
    color: var(--link-color);
    cursor: pointer;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--link-color);
    outline-offset: 3px;
}

nav a {
    margin-right: 8px;
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

strong,
b {
    color: var(--heading-color);
}

button {
    margin: 0;
    cursor: pointer;
}

time {
    font-family: monospace;
    font-style: normal;
    font-size: 15px;
}

main {
    line-height: 1.6;
}

table {
    width: 100%;
}

hr {
    border: 0;
    border-top: 1px dashed var(--border-color);
}

img {
    max-width: 100%;
}

.plot {
    border-radius: 4px;
    box-shadow: 0 2px 32px color-mix(in srgb, #0c890e 15%, transparent);
}

code {
    font-family: monospace;
    padding: 2px;
    border-radius: 3px;
}

blockquote {
    border-left: 2px solid var(--accent-color);
    color: var(--blockquote-color);
    padding-left: 20px;
    font-style: italic;
}

footer {
    padding: 25px 0;
    text-align: center;
}

.made-with {
    font-size: 0.7em;
    opacity: 0.7;
}

.title:hover {
    text-decoration: none;
}

.title h1 {
    position: relative;
    font-size: 1.5em;
    left: 10px;
}

.inline {
    width: auto !important;
}

.highlight,
.code {
    border-radius: 3px;
    margin-block-start: 1em;
    margin-block-end: 1em;
    overflow-x: auto;
}

.site-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.site-title {
    color: var(--heading-color);
    border-radius: 4px;
    padding: 4px 8px;
    margin-left: -8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
}

.site-title-suffix {
    font-weight: normal;
}

.site-nav {
    margin-left: auto;
}

.site-nav a {
    margin-right: 0;
}

.location-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    margin-bottom: 24px;
}

.location-field {
    flex: 1 1 180px;
    min-width: 0;
}

.location-field label {
    display: block;
    margin-bottom: 4px;
}

.location-field input,
.location-form button {
    box-sizing: border-box;
    border: 1px solid currentColor;
    border-radius: 3px;
    padding: 6px 9px;
    font: inherit;
    color: var(--text-color);
    background: var(--surface-color);
}

.location-field input {
    width: 100%;
}

.location-form button {
    color: var(--link-color);
}

.location-error {
    color: var(--error-color);
    flex: 1 0 100%;
    margin: 0;
    font-weight: bold;
}

.day {
    margin-bottom: 28px;
}

.day.current {
    border-left: 3px solid var(--accent-color);
    margin-left: -11px;
    padding-left: 8px;
}

.day-heading {
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px dashed var(--border-color);
}

ul.product-list,
ul.history-list {
    list-style-type: none;
    padding: unset;
    margin: unset;
}

ul.product-list li {
    display: flex;
    gap: 14px;
    padding: 7px 0;
}

ul.product-list li .time {
    flex: 0 0 88px;
    font-family: monospace;
    font-size: 14px;
    opacity: 0.8;
    padding-top: 1px;
}

.product-summary {
    min-width: 0;
}

.product-summary a:visited,
ul.history-list a:visited {
    color: var(--visited-color);
}

.meta {
    font-size: 0.8em;
    opacity: 0.68;
    margin-top: 2px;
}

.count,
.badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.7em;
    line-height: 1.5;
    opacity: 0.75;
    vertical-align: 1px;
}

section.history {
    margin-top: 22px;
    padding-top: 4px;
}

section.history h3 {
    margin-bottom: 6px;
}

ul.history-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-color);
}

ul.history-list li:last-child {
    border-bottom: 0;
}

ul.history-list li.revision {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
}

.revision-meta {
    flex: 1 1 280px;
}

.revision-toggle {
    font: inherit;
    font-size: 0.8em;
    padding: 3px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: transparent;
    color: var(--link-color);
}

.revision-toggle:hover {
    text-decoration: underline;
}

.revision-body {
    flex: 1 0 100%;
    padding: 8px 0 4px;
}

.revision-body:empty {
    display: none;
}

.htmx-request .revision-toggle {
    opacity: 0.5;
}
