:root {
    --bg: #0c0c0e;
    --surface: #141417;
    --surface2: #1c1c21;
    --border: #2a2a32;
    --text: #dedad3;
    --muted: #7e7e90;
    --red: #e03e3e;
    --red-dim: #7a1f1f;
    --amber: #d4883a;
    --green-dim: #1a3a1a;
    --green: #4caf50;
    --code-bg: #0e0e12;
    --purple: #9d6dd6;
    --purple-dim: #34215a;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.75;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 48px;
    align-items: start;
}

.layout > .toc {
    grid-column: 2;
    grid-row: 1;
}

.layout > .content {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

header {
    border-top: 4px solid var(--red);
    padding-top: 40px;
    margin-bottom: 56px;
}

.eyebrow {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--red);
    flex-shrink: 0;
}

h1 {
    font-size: clamp(28px, 5vw, 48px);
    line-height: 1.15;
    font-weight: 700;
    color: #f0ece4;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 18px;
    color: var(--muted);
    font-style: italic;
    border-left: 3px solid var(--red-dim);
    padding-left: 16px;
    margin-top: 16px;
    line-height: 1.6;
}

h2 {
    font-size: 22px;
    font-weight: 700;
    color: #f0ece4;
    margin: 52px 0 16px;
    letter-spacing: -0.01em;
}

h2::before {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--red);
    margin-bottom: 12px;
}

p {
    margin-bottom: 20px;
    color: var(--text);
}

a {
    color: var(--amber);
    text-decoration: underline;
    text-underline-offset: 3px;
}

a:hover {
    color: #e8a360;
}

code, .mono {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    background: var(--code-bg);
    color: #ccc;
    padding: 2px 6px;
    border-radius: 3px;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: inherit;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin: 28px 0;
    overflow: hidden;
}

.code-header {
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-filename {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.code-link {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: var(--amber);
    text-decoration: none;
}

.code-link:hover {
    color: #e8a360;
}

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

pre[class*="language-"],
code[class*="language-"] {
    background: var(--code-bg);
    font-size: 13px;
}

blockquote {
    background: var(--surface);
    border-left: 4px solid var(--amber);
    padding: 20px 24px;
    margin: 28px 0;
    font-style: italic;
    color: #c9c4bc;
    font-size: 17px;
    line-height: 1.7;
}

blockquote cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-size: 13px;
    font-family: 'Courier New', Courier, monospace;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.callout {
    background: var(--red-dim);
    border: 1px solid #a83030;
    border-radius: 4px;
    padding: 20px 24px;
    margin: 28px 0;
}

.callout p {
    color: #f4c2c2;
    margin-bottom: 0;
    font-size: 16px;
}

.callout p + p {
    margin-top: 12px;
}

.callout strong {
    color: #fff;
}

.versioned {
    position: relative;
}

.versioned::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 0.4em;
    bottom: 0.4em;
    border-left: 2px solid var(--purple-dim);
}

.versioned .ver {
    position: absolute;
    left: -90px;
    top: 0.35em;
    width: 66px;
    text-align: right;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    line-height: 1.4;
    color: var(--purple);
}

@media (max-width: 1450px) {
    .versioned .ver {
        position: static;
        display: block;
        width: auto;
        text-align: left;
        margin-bottom: 4px;
    }
}

.callout.update {
    background: var(--purple-dim);
    border-color: var(--purple);
}

.callout.update p {
    color: #e0d0f4;
}

.callout-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--purple);
    margin-bottom: 10px;
    font-weight: bold;
}

.news-links {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px 24px;
    margin: 28px 0;
}

.news-links-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.content ul,
.content ol {
    padding-left: 20px;
}

.news-links ul {
    list-style: none;
    padding: 0;
}

.news-links li {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
    font-size: 15px;
    line-height: 1.5;
}

.news-links li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-links .source {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.issue-grid {
    display: grid;
    gap: 2px;
    margin: 32px 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.issue-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.issue-row:last-child {
    border-bottom: none;
}

.issue-label {
    background: var(--surface2);
    padding: 14px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    display: flex;
    align-items: flex-start;
    border-right: 1px solid var(--border);
}

.issue-value {
    padding: 14px 18px;
    font-size: 16px;
    line-height: 1.6;
}

.toc {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px;
    position: sticky;
    top: 24px;
}

.toc-title {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
}

.toc ol {
    padding-left: 22px;
}

.toc li {
    margin-bottom: 6px;
    font-size: 16px;
}

.toc a {
    color: var(--text);
    text-decoration: none;
}

.toc a:hover {
    color: var(--amber);
}

.verdict {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    border-radius: 0 0 4px 4px;
    padding: 28px 32px;
    margin: 48px 0;
}

.verdict-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 12px;
}

.dont-box {
    background: var(--red-dim);
    border: 1px solid #a83030;
    border-left: 4px solid var(--red);
    border-radius: 4px;
    padding: 22px 26px;
    margin: 28px 0;
}

.dont-box p {
    color: #f4c2c2;
    margin-bottom: 0;
    font-size: 16px;
}

.dont-box p + p {
    margin-top: 12px;
}

.dont-box strong {
    color: #fff;
}

.do-box {
    background: var(--green-dim);
    border: 1px solid #2a5c2a;
    border-left: 4px solid var(--green);
    border-radius: 4px;
    padding: 22px 26px;
    margin: 28px 0;
}

.do-box p {
    color: #b8d8b8;
    margin-bottom: 0;
    font-size: 16px;
}

.do-box p + p {
    margin-top: 12px;
}

.do-box strong {
    color: #d0f0d0;
}

.do-box-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 10px;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0;
}

footer {
    margin-top: 64px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--muted);
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.8;
}

@media (max-width: 860px) {
    .issue-row {
        grid-template-columns: 1fr;
    }

    .issue-label {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    body {
        font-size: 16px;
    }

    .code-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .layout {
        display: block;
    }

    .toc {
        position: static;
        margin: 0 0 32px;
    }
}

/* render the footnote button as a plain superscript [n] link */
.littlefoot__button {
    all: unset;
    cursor: pointer;
    vertical-align: super;
    font-size: 0.7em;
    font-family: 'Courier New', Courier, monospace;
    color: var(--amber);
}

.littlefoot__popover {
    --popover-background-color: var(--surface2);
}

.littlefoot__content {
    line-height: 1.75;
}

.littlefoot__content p {
    margin-bottom: 0;
}
