:root {
    --desktop: #d7dfef;
    --desktop-edge: #b8c7e0;
    --panel: #d8d8d8;
    --panel-light: #ffffff;
    --panel-dark: #9b9b9b;
    --panel-shadow: #6b6b6b;
    --paper: #fff9d8;
    --paper-alt: #ffffff;
    --ink: #111111;
    --link: #003399;
    --visited: #663399;
    --hover: #990000;
    --rule: #b4bfd3;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    margin: 0;
    padding: 18px 0 24px;
    background: linear-gradient(180deg, #eef3fb 0%, var(--desktop) 30%, var(--desktop-edge) 100%);
    color: var(--ink);
    font: 13px/1.4 Verdana, Arial, Helvetica, sans-serif;
}

a {
    color: var(--link);
    text-decoration: underline;
}

a:visited {
    color: var(--visited);
}

a:hover,
a:focus-visible {
    color: var(--hover);
}

img {
    max-width: 100%;
}

code,
pre,
kbd,
samp {
    font-family: "Courier New", Courier, monospace;
}

code,
kbd,
samp {
    background: #eeeeee;
    padding: 0 2px;
}

.desktop {
    width: 100%;
}

.site-shell {
    width: min(980px, calc(100vw - 24px));
    margin: 0 auto;
}

.site-header,
.site-footer,
.page {
    width: 100%;
}

.site-header {
    margin-bottom: 12px;
}

.site-header__brand,
.hero,
.series-summary,
.story,
.not-found,
.series-card,
.story-card,
.site-nav,
.site-footer__inner,
.story-nav {
    border-top: 1px solid var(--panel-light);
    border-left: 1px solid var(--panel-light);
    border-right: 1px solid var(--panel-shadow);
    border-bottom: 1px solid var(--panel-shadow);
    box-shadow: 1px 1px 0 rgba(255, 255, 255, 0.45) inset;
}

.site-header__brand {
    background: var(--paper);
    padding: 18px 20px 16px;
    margin-bottom: 8px;
}

.eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #333333;
}

.site-header__title {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 40px;
    line-height: 1;
}

.site-header__title a {
    color: #000000;
    text-decoration: none;
}

.site-header__title a:visited {
    color: #000000;
}

.site-header__title a:hover,
.site-header__title a:focus-visible {
    color: #000080;
    text-decoration: underline;
}

.site-header__tagline {
    margin: 8px 0 0;
    font-size: 14px;
}

.site-nav {
    background: var(--panel);
    padding: 10px 10px 4px;
}

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__list li {
    display: inline;
}

.site-nav__link {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 5px 10px;
    background: var(--panel);
    border-top: 1px solid var(--panel-light);
    border-left: 1px solid var(--panel-light);
    border-right: 1px solid var(--panel-shadow);
    border-bottom: 1px solid var(--panel-shadow);
    color: var(--link);
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
}

.site-nav__link:visited {
    color: var(--link);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
    color: var(--hover);
}

.site-nav__link.is-active {
    background: #ececec;
    border-top: 1px solid var(--panel-dark);
    border-left: 1px solid var(--panel-dark);
    border-right: 1px solid var(--panel-light);
    border-bottom: 1px solid var(--panel-light);
    color: #000000;
}

.page {
    padding: 0;
}

.hero,
.story,
.not-found,
.series-summary,
.series-card,
.story-card {
    background: var(--paper);
    padding: 16px;
}

.hero,
.series-summary,
.story,
.not-found {
    margin-bottom: 12px;
}

.hero h1,
.story h1,
.not-found h1,
.series-summary h1 {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: 30px;
    line-height: 1.05;
}

.hero p:last-child,
.series-summary p:last-child,
.story-body > *:last-child,
.not-found p:last-child,
.series-card p:last-child,
.story-card p:last-child {
    margin-bottom: 0;
}

.series-grid,
.story-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.series-card,
.story-card {
    background: var(--paper-alt);
}

.series-card h2,
.story-card h2,
.story-card h3 {
    margin: 0 0 6px;
    font-family: "Times New Roman", Times, serif;
    font-size: 24px;
    line-height: 1.1;
}

.series-card__meta,
.story-card__meta {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    color: #333333;
}

.story-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.story-card__link,
.series-card__link {
    color: #000000;
    text-decoration: none;
}

.story-card__link:visited,
.series-card__link:visited {
    color: #000000;
}

.story-card__link:hover,
.series-card__link:hover,
.story-card__link:focus-visible,
.series-card__link:focus-visible {
    color: #000080;
    text-decoration: underline;
}

.story-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 0 14px;
    padding: 8px;
    background: var(--panel);
}

.story-nav--bottom {
    margin: 14px 0 0;
}

.button,
.button--ghost,
.button--muted {
    display: inline-block;
    min-height: 0;
    padding: 5px 10px;
    background: var(--panel);
    border-top: 1px solid var(--panel-light);
    border-left: 1px solid var(--panel-light);
    border-right: 1px solid var(--panel-shadow);
    border-bottom: 1px solid var(--panel-shadow);
    color: var(--link);
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
}

.button:visited,
.button--ghost:visited,
.button--muted:visited {
    color: var(--link);
}

.button:hover,
.button--ghost:hover,
.button--muted:hover,
.button:focus-visible,
.button--ghost:focus-visible,
.button--muted:focus-visible {
    color: var(--hover);
}

.story-nav__spacer {
    flex: 1 1 30px;
}

.story-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
}

.story-body {
    font-family: "Times New Roman", Times, serif;
    font-size: 20px;
    line-height: 1.45;
}

.story-body h2,
.story-body h3,
.story-body h4 {
    margin: 1.2em 0 0.5em;
    font-family: "Times New Roman", Times, serif;
    line-height: 1.15;
    color: #000080;
}

.story-body ul,
.story-body ol {
    padding-left: 24px;
}

.story-body pre {
    overflow-x: auto;
    margin: 12px 0;
    padding: 8px;
    background: #000000;
    color: #00ff00;
    border-top: 2px solid var(--panel-dark);
    border-left: 2px solid var(--panel-dark);
    border-right: 2px solid var(--panel-light);
    border-bottom: 2px solid var(--panel-light);
}

.story-body code {
    font-size: 0.95em;
}

.story-body blockquote {
    margin: 12px 18px;
    padding: 0 0 0 10px;
    border-left: 3px solid #666666;
    color: #333333;
}

.story-body hr {
    border: 0;
    border-top: 1px solid #666666;
    margin: 14px 0;
}

.site-footer {
    padding: 0 0 2px;
}

.site-footer__inner {
    background: var(--paper-alt);
    padding: 10px 12px;
    font-size: 11px;
    text-align: center;
}

.site-footer__inner p {
    margin: 0;
}

.site-footer__inner p + p {
    margin-top: 4px;
}

@media (max-width: 760px) {
    .series-grid,
    .story-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 540px) {
    body {
        padding: 6px 0 12px;
    }

    .site-shell {
        width: calc(100vw - 10px);
    }

    .site-header__title {
        font-size: 30px;
    }

    .hero h1,
    .story h1,
    .not-found h1,
    .series-summary h1 {
        font-size: 24px;
    }

    .story-body {
        font-size: 16px;
    }

    .story-nav {
        align-items: stretch;
    }

    .story-nav__spacer {
        display: none;
    }

    .button,
    .button--ghost,
    .button--muted {
        width: 100%;
        text-align: center;
    }
}
