/* Stax — Path B surface.
   Deep Basalt + Warm Concrete + Strained Sunlight + Molten Iron + Slate Ink.
   Brutalist · Cathedral · Chisel marks. No corners, no glow, no sweetness. */

/* ============================== Self-hosted fonts ==================== */

@font-face {
    font-family: "Fraunces";
    src: url("../fonts/Fraunces-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("../fonts/SourceSerif4-Variable.woff2") format("woff2-variations");
    font-weight: 200 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "JetBrains Mono";
    src: url("../fonts/JetBrainsMono-Variable.woff2") format("woff2-variations");
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ============================== Tokens =============================== */

:root {
    --bg: #0D0E15;            /* Deep Cathedral Void */
    --bg-raised: #0A0A0E;     /* Elevated surfaces */
    --bg-sunken: #050508;     /* Deep wells */
    --bg-deeper: #05050A;     
    --text: #F4F1EA;          /* Parchment White */
    --text-soft: rgba(244, 241, 234, 0.6);
    --meta: rgba(244, 241, 234, 0.4);          
    --accent: #FF9E00;        /* Molten Iron / Orange */
    --accent-light: #FF9E00;  
    --accent-heat: #B23A48;   /* Crimson / Red */
    --link: #FF9E00;
    --brand: #FF9E00;
    --rule: rgba(90, 53, 110, 0.3); /* Purple tinted borders */
    --rule-strong: #3f3f46;

    /* Jaw-dropping glow variables */
    --glow-primary: rgba(59, 130, 246, 0.5);
    --glow-accent: rgba(139, 92, 246, 0.4);

    --font-display: "Inter", system-ui, sans-serif;
    --font-serif: "Inter", system-ui, sans-serif;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --measure: 68ch;
    --line-height: 1.65;
}

* { box-sizing: border-box; }

html {
    background-color: var(--bg);
    -webkit-text-size-adjust: 100%;
}

body {
    background: radial-gradient(circle at top center, #18181b 0%, var(--bg) 60%);
    background-attachment: fixed;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1.125rem;
    line-height: var(--line-height);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}


::selection {
    background: var(--accent);
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* ============================== Layout =============================== */

main, .site-header, .site-footer {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Wider desktop gutters: cathedral negative space.
   The body still holds measure at 68ch; padding widens the well. */
@media (min-width: 1100px) {
    main, .site-header, .site-footer {
        padding: 0 3rem;
    }
}

/* ============================== Header =============================== */

.site-header {
    margin-top: 4rem;
    margin-bottom: 5rem;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 2rem;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand-mark {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text);
}

.brand-tag,
.brand-sub {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--meta);
    margin-top: 0.3rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

nav {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    display: flex;
    gap: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

nav a:hover {
    border-bottom-color: var(--accent-light);
    color: var(--text);
}

.site-header nav a {
    text-decoration: none;
}

/* ============================== Typography =========================== */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text);
    font-variation-settings: "opsz" 96, "SOFT" 30;
}

h1 {
    font-size: 2.6rem;
    margin-top: 0;
    letter-spacing: -0.015em;
}
h2 {
    font-size: 1.65rem;
    border-top: 1px solid var(--rule);
    padding-top: 2.5rem;
    letter-spacing: -0.005em;
}
h3 { font-size: 1.25rem; }
h4 {
    font-size: 1rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
}

p { margin: 0 0 1.5rem; }

strong, b { color: var(--text); font-weight: 700; }

em, i { color: var(--text); font-style: italic; }

a {
    color: var(--link);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--rule-strong);
}

a:hover {
    color: var(--accent-light);
    text-decoration-color: var(--accent-light);
}

.meta {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    color: var(--meta);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 3rem;
}

/* Section chisel ornament. */
hr {
    border: none;
    text-align: center;
    margin: 3.5rem 0;
    color: var(--accent-light);
    font-family: var(--font-display);
    font-size: var(--type-h3);
    line-height: 1;
    height: 1.5rem;
}
hr::before { content: "\00a7"; }

/* Hazard-tape divider — use sparingly. */
.hazard-tape {
    height: 4px;
    background: repeating-linear-gradient(
        45deg,
        var(--accent-light) 0,
        var(--accent-light) 8px,
        var(--bg) 8px,
        var(--bg) 16px
    );
    margin: 3rem 0;
    border: none;
}

/* ============================== Code ================================= */

pre, code, kbd, samp {
    font-family: var(--font-mono);
    font-feature-settings: "liga" 0, "calt" 0;
    font-size: 0.9em;
}

code {
    background: var(--bg-raised);
    color: var(--text);
    padding: 0.12em 0.4em;
    border: 1px solid var(--rule);
}

pre {
    background: var(--bg-raised);
    color: var(--text);
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent-light);
    line-height: 1.55;
}

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

blockquote {
    margin: 3rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    border-left: 3px solid var(--accent-light);
    color: var(--text-soft);
    font-family: var(--font-serif);
    font-style: italic;
}

blockquote p:last-child { margin-bottom: 0; }

/* ============================== Essay list =========================== */

.essay-list {
    list-style: none;
    padding: 0;
}

.essay-list li {
    margin-bottom: 3rem;
}

.essay-list a {
    text-decoration: none;
    display: block;
    color: var(--text);
}

.essay-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--type-h3);
    color: var(--text);
    margin-bottom: 0.4rem;
    line-height: 1.2;
    letter-spacing: -0.005em;
}

.essay-list a:hover .essay-title {
    color: var(--accent-light);
}

.essay-meta {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--meta);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: block;
    margin-bottom: 0.3rem;
}

/* Screen-reader-only separator. */
.essay-sep {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.essay-summary {
    color: var(--text-soft);
    font-size: 1rem;
    display: block;
}

/* Quoted-word essay title marker — Inter caps, literal quotes as content. */
.essay-title-marker {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
    color: var(--accent-light);
    display: inline-block;
    margin-bottom: 1rem;
}
.essay-title-marker::before { content: "\201C"; }
.essay-title-marker::after  { content: "\201D"; }

/* Construction-site version stamp. */
.version-stamp {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--meta);
    border-top: 1px solid var(--rule);
    padding-top: 1rem;
    margin-top: 4rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    line-height: 1.4;
}
.version-stamp .stamp-version { color: var(--accent-light); }
.version-stamp .stamp-audited { color: var(--text-soft); }

/* Lede — the opening synthesis. */
.lede {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    line-height: 1.55;
    color: var(--text);
    margin-bottom: 5rem;
    font-style: italic;
}

/* ============================== Archive arcs ========================= */

.arcs {
    margin-top: 2rem;
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--rule);
}

.arcs h2,
.all-essays h2 {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--meta);
    margin-bottom: 1.5rem;
    border-top: none;
    padding-top: 0;
    font-weight: 700;
}

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

.arc-list li {
    margin-bottom: 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
}

.arc-list a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
}

.arc-list a:hover {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
}

/* ============================== TOC ================================== */

.toc {
    margin: 3rem 0 4rem 0;
    padding: 1.5rem 2rem;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--accent-light);
    background: var(--bg-raised);
    font-family: var(--font-sans);
    font-size: var(--type-meta);
}

.toc-title {
    font-weight: 700;
    font-size: var(--type-caption);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 0.8rem;
}

.toc ol {
    margin: 0;
    padding-left: 1.5rem;
    line-height: 1.5;
}

.toc li { margin-bottom: 0.4rem; }

.toc a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.toc a:hover {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
}

main h2[id] { scroll-margin-top: 1.5rem; }

/* ============================== Series nav =========================== */

.series-nav {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.series-nav a {
    color: var(--text);
    text-decoration: none;
    max-width: 48%;
    line-height: 1.4;
    border-bottom: 1px solid transparent;
}

.series-nav a:hover {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
}

.series-next { text-align: right; margin-left: auto; }

@media (max-width: 640px) {
    .series-nav { flex-direction: column; gap: 1.2rem; }
    .series-nav a { max-width: 100%; }
    .series-next { text-align: left; margin-left: 0; }
}

/* ============================== Footnotes ============================ */

.footnote-ref {
    font-family: var(--font-sans);
    font-size: 0.75em;
    line-height: 1;
    vertical-align: super;
}
.footnote-ref a {
    color: var(--accent-light);
    text-decoration: none;
    padding: 0 0.15em;
}
.footnote-ref a:hover { color: var(--accent-light); text-decoration: underline; }

.footnotes {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.55;
}

.footnotes ol { padding-left: 1.5rem; }
.footnotes li { margin-bottom: 0.75rem; }
.footnotes li:target {
    background: var(--bg-raised);
    border-left: 3px solid var(--accent-light);
    padding: 0.5rem 0.75rem;
    margin-left: -0.75rem;
}

.footnote-back {
    color: var(--meta);
    text-decoration: none;
    margin-left: 0.4em;
}
.footnote-back:hover { color: var(--accent-light); }

/* ============================== Codex wiki tags ===================== */

.wiki-codex {
    font-style: italic;
    color: var(--text);
    border-bottom: 1px dotted var(--meta);
    cursor: help;
}

.wiki-link {
    color: var(--link);
    text-decoration: underline;
    text-decoration-color: var(--rule-strong);
}

/* ============================== Footer =============================== */

.site-footer {
    margin-top: 8rem;
    padding-top: 3rem;
    padding-bottom: 6rem;
    border-top: 1px solid var(--rule-strong);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--meta);
    text-align: left;
    letter-spacing: 0.02em;
}

.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); text-decoration: underline; }

/* ============================== Mobile =============================== */

@media (max-width: 640px) {
    body { font-size: 1.05rem; }
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.4rem; }
    .site-header { margin-top: 2rem; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
    nav { gap: 1rem; flex-wrap: wrap; }
    .lede { font-size: var(--type-comfortable); }
    main, .site-header, .site-footer { padding: 0 1.25rem; }
}

/* ============================== Section: Lab ========================= */

.section-lab main.lab-main,
.section-lab main.lab-entry {
    max-width: 88ch;
}

.lab-table {
    width: 100%;
    border-collapse: collapse;
    margin: 3rem 0;
    font-family: var(--font-sans);
    font-size: var(--type-meta);
}

.lab-table th {
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: var(--type-eyebrow);
    color: var(--meta);
    border-bottom: 1px solid var(--rule-strong);
    padding: 0.6rem 0.8rem;
    font-weight: 700;
}

.lab-table td {
    border-bottom: 1px solid var(--rule);
    padding: 0.9rem 0.8rem;
    vertical-align: top;
    color: var(--text);
}

.lab-table tr:hover td { background: var(--bg-raised); }

.lab-date code,
.lab-entry-meta code {
    font-family: var(--font-mono);
    background: transparent;
    padding: 0;
    border: none;
    color: var(--meta);
    font-size: var(--type-small);
}

.lab-project-tag {
    font-family: var(--font-mono);
    font-size: var(--type-caption);
    color: var(--text);
    background: var(--bg-raised);
    border: 1px solid var(--rule-strong);
    padding: 0.15rem 0.5rem;
}

.lab-title a {
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-family: var(--font-sans);
}
.lab-title a:hover { color: var(--accent-light); }

.lab-entry-evidence-pill,
.evidence-pill {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    color: var(--meta);
    white-space: nowrap;
    font-weight: 600;
}
.lab-entry-evidence-pill.ev-differential-tested,
.lab-entry-evidence-pill.ev-unit-tested,
.lab-entry-evidence-pill.ev-audited,
.lab-entry-evidence-pill.ev-tested,
.lab-entry-evidence-pill.ev-compiled,
.evidence-pill.ev-tested,
.evidence-pill.ev-compiled,
.evidence-pill.ev-benchmarked {
    color: var(--text);
    border-color: var(--accent-light);
}
.lab-entry-evidence-pill.ev-sketch,
.lab-entry-evidence-pill.ev-unknown {
    color: var(--text-soft);
    border-color: var(--rule-strong);
    font-style: italic;
}

/* Lab entry sidebar + body. */
.lab-entry {
    display: grid;
    grid-template-columns: 18rem 1fr;
    gap: 3rem;
    align-items: start;
}

.lab-entry-sidebar {
    font-family: var(--font-sans);
    font-size: var(--type-small);
    border-right: 1px solid var(--rule);
    padding-right: 2rem;
    position: sticky;
    top: 2rem;
    color: var(--text-soft);
}

.lab-entry-meta dt {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.68rem;
    color: var(--meta);
    margin-top: 1rem;
    font-weight: 700;
}
.lab-entry-meta dt:first-child { margin-top: 0; }
.lab-entry-meta dd {
    margin: 0.2rem 0 0;
    color: var(--text);
}

@media (max-width: 800px) {
    .lab-entry {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .lab-entry-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding-right: 0;
        padding-bottom: 1.5rem;
        position: static;
    }
}

/* ============================== Section: Objects ===================== */

.section-objects main.objects-main,
.section-objects main.object-entry {
    max-width: 92ch;
}

.objects-grid {
    list-style: none;
    padding: 0;
    margin: 3rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 2.5rem;
}

.object-card a {
    text-decoration: none;
    color: var(--text);
    display: block;
}

.object-hero {
    aspect-ratio: 1 / 1;
    background-color: var(--bg-raised);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--rule-strong);
}

.object-hero-placeholder {
    background-image: repeating-linear-gradient(
        45deg,
        var(--bg-raised) 0,
        var(--bg-raised) 8px,
        var(--bg) 8px,
        var(--bg) 16px
    );
}

.object-card-meta {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.object-card-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    color: var(--text);
}

.object-card a:hover .object-card-title { color: var(--accent-light); }

.object-status-pill,
.workshop-status-pill {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    color: var(--meta);
    white-space: nowrap;
    font-weight: 600;
}
.object-status-pill.st-shipped,
.workshop-status-pill.st-shipped {
    color: var(--text);
    border-color: var(--accent-light);
}
.object-status-pill.st-prototype,
.workshop-status-pill.st-active {
    color: var(--accent-light);
    border-color: var(--accent-light);
}
.object-status-pill.st-concept,
.workshop-status-pill.st-paused {
    color: var(--text-soft);
    border-color: var(--rule-strong);
    font-style: italic;
}

.object-bleed-hero {
    margin: 0 -1.5rem 3rem;
}
.object-bleed-hero img {
    width: 100%;
    display: block;
    border: 1px solid var(--rule-strong);
}
.object-bleed-hero-placeholder {
    aspect-ratio: 16 / 9;
    background-color: var(--bg-raised);
    background-image: repeating-linear-gradient(
        45deg,
        var(--bg-raised) 0,
        var(--bg-raised) 12px,
        var(--bg) 12px,
        var(--bg) 24px
    );
    border: 1px solid var(--rule-strong);
}
.object-bleed-hero-fill { width: 100%; height: 100%; }

.object-entry-header h1 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
}

.object-materials {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: var(--type-caption);
}
.object-materials li {
    background: var(--bg-raised);
    border: 1px solid var(--rule);
    padding: 0.2rem 0.6rem;
    color: var(--text-soft);
}

/* ============================== Section: Workshop ==================== */

.section-workshop main.workshop-main,
.section-workshop main.workshop-entry-page {
    max-width: 80ch;
}

.workshop-log {
    list-style: none;
    padding: 0;
    margin: 3rem 0;
    border-top: 1px solid var(--rule);
}

.workshop-entry {
    border-bottom: 1px solid var(--rule);
}

.workshop-entry a {
    display: grid;
    grid-template-columns: 7rem 1fr auto;
    gap: 1.5rem;
    align-items: baseline;
    padding: 1.2rem 0;
    text-decoration: none;
    color: var(--text);
}
.workshop-entry a:hover { background: var(--bg-raised); }

.workshop-entry-date code {
    font-family: var(--font-mono);
    background: transparent;
    padding: 0;
    border: none;
    color: var(--meta);
    font-size: var(--type-small);
}

.workshop-entry-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
}

.workshop-entry-meta {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    color: var(--meta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workshop-status-paused .workshop-entry-title,
.workshop-status-shipped .workshop-entry-title {
    color: var(--text-soft);
}

.workshop-meta code {
    font-family: var(--font-mono);
    background: transparent;
    padding: 0;
    border: none;
    color: var(--meta);
}

.workshop-entry-body h2 {
    font-family: var(--font-mono);
    font-size: 1rem;
    text-transform: none;
    letter-spacing: 0;
    border-top: 1px dashed var(--rule);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    color: var(--accent-light);
}

.workshop-entry-body pre {
    background: var(--bg-raised);
    border-left: 3px solid var(--accent-light);
}

.workshop-note {
    font-family: var(--font-sans);
    font-size: var(--type-small);
    color: var(--meta);
    margin-top: 2rem;
}

@media (max-width: 640px) {
    .workshop-entry a {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
}

/* ============================== Section: Canon ======================= */

.section-canon main.canon-main,
.section-canon main.canon-entry-main {
    max-width: 64ch;
    hanging-punctuation: first last;
}

.canon-intro {
    font-family: var(--font-serif);
    font-size: var(--type-comfortable);
    line-height: 1.65;
    color: var(--text);
    margin: 2rem 0 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--rule);
}

.canon-intro a {
    color: var(--text);
    font-weight: 600;
    text-decoration-color: var(--accent-light);
}

.canon-arc {
    margin: 3.5rem 0;
}

.canon-arc h2 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    border-top: 1px solid var(--rule-strong);
    padding-top: 1.5rem;
    letter-spacing: -0.005em;
    color: var(--text);
}

.canon-arc h2 a { color: var(--text); text-decoration: none; }
.canon-arc h2 a:hover { color: var(--accent-light); }

.canon-arc-count {
    font-family: var(--font-sans);
    font-size: var(--type-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--meta);
    font-weight: 600;
    margin-left: 0.8rem;
}

.canon-arc-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    counter-reset: canon-counter;
    column-count: 2;
    column-gap: 2.5rem;
}

.canon-arc-list li {
    break-inside: avoid;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    text-indent: -2.5rem;
    padding-left: 2.5rem;
}

.canon-arc-list a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.canon-arc-list a:hover {
    color: var(--accent-light);
    border-bottom-color: var(--accent-light);
}

.canon-roman {
    font-family: var(--font-sans);
    font-variant: small-caps;
    font-weight: 700;
    color: var(--accent-light);
    letter-spacing: 0.08em;
    margin-right: 0.6rem;
}

@media (max-width: 640px) {
    .canon-arc-list { column-count: 1; }
}

.canon-entry-main {
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "onum" 1;
}

.canon-entry-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent-light);
    margin-bottom: 2.5rem;
    font-weight: 700;
}
.canon-entry-eyebrow a {
    color: var(--accent-light);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.canon-entry-eyebrow a:hover { border-bottom-color: var(--accent-light); }

.canon-entry-title {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.015em;
    margin-bottom: 2rem;
    color: var(--text);
}

.canon-entry-title .canon-roman {
    display: block;
    font-size: var(--type-small);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent-light);
    margin-bottom: 0.8rem;
    font-variant: normal;
    font-family: var(--font-sans);
}

.canon-entry-meta,
.meta.canon-entry-meta {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    color: var(--meta);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 3rem;
}

.canon-entry-body {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Drop cap, recolored to Strained Sunlight on Deep Basalt. */
.canon-entry-body > p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-weight: 700;
    float: left;
    font-size: 4.4rem;
    line-height: 0.85;
    margin: 0.4rem 0.5rem 0 0;
    color: var(--accent-light);
}

.canon-entry-body .footnotes {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    font-size: 0.9rem;
    color: var(--text-soft);
    line-height: 1.55;
}

.canon-entry-source {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: var(--type-caption);
    color: var(--meta);
    text-align: center;
    font-style: normal;
}

/* ============================== Audit error / Molten Iron =========== */

.audit-failed,
.audit-error {
    border-left: 3px solid var(--accent-heat);
    background: var(--bg-raised);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    color: var(--text);
}

.audit-failed .audit-label,
.audit-error .audit-label {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: var(--type-caption);
    color: var(--accent-heat);
    display: block;
    margin-bottom: 0.4rem;
}

/* Crossed-out poetry — striking through wrong assumptions inline. */
.struck {
    text-decoration: line-through;
    text-decoration-color: var(--accent-heat);
    text-decoration-thickness: 2px;
    color: var(--text-soft);
}

/* ============================== Homepage: hero / canon / series ===== */

/* Hero — visceral technical hook */
.hero {
    margin-bottom: 6rem;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
}

.hero-visual {
    order: 2; /* Visual on right in desktop */
}
@media (max-width: 900px) {
    .hero-visual { order: 1; margin-bottom: 2rem; }
}

.terminal-mock {
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.8), 
        inset 0 1px 1px rgba(255,255,255,0.1),
        inset 0 0 40px rgba(255, 214, 160, 0.05);
    font-family: var(--font-mono);
    font-size: var(--type-small);
    color: var(--text-soft);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.terminal-mock:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 30px 60px rgba(0,0,0,0.9), 
        inset 0 1px 1px rgba(255,255,255,0.15),
        inset 0 0 60px rgba(255, 214, 160, 0.08);
}

.terminal-header {
    background: var(--bg);
    border-bottom: 1px solid var(--rule-strong);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terminal-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-header .dot.red { background: #ff5f56; }
.terminal-header .dot.yellow { background: #ffbd2e; }
.terminal-header .dot.green { background: #27c93f; }

.terminal-title {
    margin-left: 1rem;
    color: var(--meta);
    font-size: 0.75rem;
}

.terminal-body {
    padding: 1rem;
    line-height: 1.5;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.terminal-body p { margin-bottom: 0.5rem; }
.terminal-body .prompt { color: var(--accent-light); margin-right: 0.5rem; }
.terminal-body .output.success { color: #27c93f; }
.terminal-body .output.json { color: #a1b56c; padding-left: 1rem; margin-top: 0.2rem; }

.hero-mark {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.875rem;
    color: var(--accent-light);
    display: inline-block;
    margin-bottom: 1rem;
}
.hero-mark::before { content: "\201C"; }
.hero-mark::after  { content: "\201D"; }

@keyframes textShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-tagline {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 0 0 1.5rem;
    background: linear-gradient(270deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    background-size: 300% 300%;
    animation: textShine 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

.hero-lede {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--text-soft);
    margin: 0 0 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-primary, .btn-secondary {
    font-family: var(--font-sans);
    font-size: var(--type-small);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #2563eb);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px var(--glow-primary), inset 0 1px 0 rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #60a5fa, var(--accent));
    border-color: rgba(255,255,255,0.3);
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.6), inset 0 1px 0 rgba(255,255,255,0.4);
    transform: translateY(-3px) scale(1.03);
    text-decoration: none;
}

.btn-secondary {
    background: rgba(255,255,255,0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.btn-secondary:hover {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    transform: translateY(-2px) scale(1.02);
    text-decoration: none;
}

/* Shared section labels — quoted-word Inter caps */
.section-label {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.875rem;
    color: var(--accent-light);
    border-top: 1px solid var(--rule);
    padding-top: 2.5rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
}
.section-label::before { content: "\201C"; }
.section-label::after  { content: "\201D"; }

.section-intro {
    font-family: var(--font-serif);
    color: var(--text-soft);
    font-size: 1.05rem;
    margin: 0 0 2.5rem;
    max-width: 56ch;
}

.canon-start,
.recent-section,
.series-section {
    margin-bottom: 5rem;
}

/* Canon list — numbered, hierarchic */
.canon-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: canon;
}

.canon-list > li {
    margin-bottom: 2rem;
    border-top: 1px solid var(--rule);
    padding-top: 1.5rem;
}
.canon-list > li:first-child {
    border-top: 0;
    padding-top: 0;
}

.canon-list a {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1.25rem;
    text-decoration: none;
    color: var(--text);
    align-items: baseline;
}

.canon-number {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-light);
    letter-spacing: 0.04em;
}

.canon-body {
    display: block;
}

.canon-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    line-height: 1.2;
    color: var(--text);
    display: block;
    margin-bottom: 0.35rem;
    letter-spacing: -0.005em;
}

.canon-list a:hover .canon-title {
    color: var(--accent-light);
}

.canon-meta {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    color: var(--meta);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
}

/* Archive link — quiet pointer at end of Recent */
.archive-link {
    font-family: var(--font-sans);
    font-size: var(--type-small);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 2.5rem;
    text-align: right;
}
.archive-link a {
    color: var(--accent-light);
    text-decoration: none;
    border-bottom: 1px solid var(--rule-strong);
    padding-bottom: 0.2rem;
}
.archive-link a:hover {
    border-bottom-color: var(--accent-light);
}

/* Series navigation */
.series-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.series-list li {
    border-top: 1px solid var(--rule);
    padding: 1.25rem 0;
    display: grid;
    grid-template-columns: minmax(8rem, 12rem) 8rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
}

.series-list li:last-child {
    border-bottom: 1px solid var(--rule);
}

.series-list a {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.005em;
}
.series-list a:hover {
    color: var(--accent-light);
}

.series-count {
    font-family: var(--font-mono);
    font-size: var(--type-caption);
    color: var(--meta);
    letter-spacing: 0.04em;
}

.series-blurb {
    font-family: var(--font-serif);
    color: var(--text-soft);
    font-size: var(--type-meta);
    line-height: 1.45;
}

/* Hero / series collapse on narrow screens */
@media (max-width: 720px) {
    .hero-tagline { font-size: 1.75rem; }
    .hero-lede { font-size: var(--type-comfortable); }
    .canon-list a {
        grid-template-columns: 2.5rem 1fr;
        gap: 1rem;
    }
    .canon-title { font-size: var(--type-comfortable); }
    .series-list li {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }
}

/* ============================== Reduced motion ====================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Subtle page-load smoothing for motion-tolerant readers only. */
@media (prefers-reduced-motion: no-preference) {
    a, nav a, .essay-list a, .arc-list a {
        transition: color 100ms linear, border-color 100ms linear;
    }
}

/* ============================== Subscribe (newsletter) ============== */
/* Brand-coherent capture: Deep Basalt frame, Strained Sunlight border,
   Inter all-caps label, no rounded corners, no glow, no friendly UI. */

.subscribe {
    margin: 4rem 0 2rem;
    padding: 2rem 1.5rem;
    border-top: 1px solid var(--accent-light);
    border-bottom: 1px solid var(--accent-light);
    background: var(--bg);
}

.subscribe h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.subscribe-blurb {
    max-width: 60ch;
    margin-bottom: 1.25rem;
}

.subscribe-form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0;
    margin: 0;
    max-width: 540px;
    border: 1px solid var(--accent-light);
}

.subscribe-label {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-light);
    padding: 0.75rem 0.9rem;
    border-right: 1px solid var(--accent-light);
    display: flex;
    align-items: center;
}

.subscribe-input {
    flex: 1 1 auto;
    min-width: 0;
    font-family: var(--font-mono);
    font-size: var(--type-meta);
    padding: 0.75rem 0.9rem;
    background: var(--bg);
    color: var(--fg, #E8E4E0);
    border: 0;
    border-radius: 0;
    outline: none;
}

.subscribe-input::placeholder {
    color: #666666;
    font-style: normal;
}

.subscribe-input:focus {
    outline: 2px solid var(--accent-light);
    outline-offset: -2px;
}

.subscribe-button {
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--accent-light);
    border: 0;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
}

.subscribe-button:hover,
.subscribe-button:focus {
    background: var(--fg, #E8E4E0);
    outline: none;
}

.subscribe-fine {
    margin-top: 0.75rem;
    font-family: var(--font-sans);
    font-size: var(--type-caption);
    letter-spacing: 0.04em;
    color: #666666;
}

/* ============================== Section: Substrate ================== */

.section-substrate main.substrate-main,
.section-substrate main.substrate-entry {
    max-width: 92ch;
}

.substrate-hero {
    margin-bottom: 4rem;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 2.5rem;
}
.substrate-hero h1 {
    font-family: var(--font-display);
    letter-spacing: -0.015em;
    margin: 0.25rem 0 1.5rem;
}
.substrate-hero .lede {
    font-family: var(--font-serif);
    font-size: var(--type-comfortable);
    line-height: 1.55;
    color: var(--text);
    max-width: 64ch;
}
.substrate-note {
    font-family: var(--font-sans);
    font-size: var(--type-small);
    color: var(--text-soft);
    max-width: 64ch;
    line-height: 1.6;
    margin-top: 1.75rem;
}

.substrate-lane {
    margin-bottom: 4.5rem;
}

.substrate-grid {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
    gap: 1.75rem;
}

/* Inference lane runs four-wide on desktop per the design wireframe. */
.substrate-lane-inference .substrate-grid {
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
}

.substrate-card {
    border: 1px solid var(--rule);
    background: var(--bg-raised);
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s ease-out;
}
.substrate-card:hover {
    border-color: var(--accent-light);
}
.substrate-card-link {
    display: block;
    padding: 1.25rem 1.25rem 1rem;
    text-decoration: none;
    color: var(--text);
}
.substrate-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.substrate-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--type-comfortable);
    color: var(--text);
    letter-spacing: -0.005em;
}
.substrate-card-link:hover .substrate-card-name {
    color: var(--accent-light);
}
.substrate-card-summary {
    font-family: var(--font-serif);
    color: var(--text-soft);
    font-size: var(--type-meta);
    line-height: 1.5;
    margin: 0 0 1rem;
}
.substrate-card-meta {
    margin: 0;
    border-top: 1px solid var(--rule);
    padding-top: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem 1rem;
}
.substrate-meta-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: var(--type-caption);
}
.substrate-meta-row dt {
    color: var(--meta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    flex: 0 0 auto;
}
.substrate-meta-row dd {
    margin: 0;
    color: var(--text);
}
.substrate-meta-row dd code {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 0.85em;
    color: var(--text);
}
.substrate-card-source {
    margin: 0;
    padding: 0.6rem 1.25rem 1rem;
    border-top: 1px dashed var(--rule);
    font-family: var(--font-sans);
    font-size: var(--type-eyebrow);
    color: var(--text-soft);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.substrate-source-label {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--meta);
    font-size: 0.62rem;
}
.substrate-card-source code {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--accent-light);
    font-size: 0.85em;
}

.substrate-status-pill {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--rule-strong);
    background: var(--bg);
    color: var(--meta);
    white-space: nowrap;
    font-weight: 700;
}
.substrate-status-pill.st-pre-10,
.substrate-status-pill.st-pre-1-0 {
    color: var(--accent-light);
    border-color: var(--accent-light);
}
.substrate-status-pill.st-experimental {
    color: var(--text-soft);
    border-color: var(--rule-strong);
    font-style: italic;
}
.substrate-status-pill.st-stable {
    color: var(--text);
    border-color: var(--text);
}

.substrate-footnote {
    font-family: var(--font-serif);
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.6;
    max-width: 64ch;
    margin: 0;
}

/* ----- Per-project entry page ----- */

.substrate-entry-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 2rem;
}
.substrate-kicker {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: var(--type-caption);
    color: var(--accent-light);
    margin: 0 0 0.75rem;
}
.substrate-entry-header h1 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    font-size: 2.6rem;
    margin: 0 0 1.5rem;
}
.substrate-meta-primary {
    font-family: var(--font-sans);
    color: var(--text);
    font-size: 0.92rem;
    margin: 0 0 0.4rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.substrate-meta-primary code {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--text);
}
.substrate-meta-dot {
    color: var(--meta);
    padding: 0 0.1rem;
}
.substrate-meta-secondary {
    font-family: var(--font-sans);
    color: var(--text-soft);
    font-size: 0.82rem;
    margin: 0;
}

/* Quoted-word H4 markers per Path B aesthetic. The markdown body uses
   #### "WHY", #### "WHAT", #### "MILESTONES" etc as section markers. */
.substrate-entry-body h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: var(--type-caption);
    color: var(--accent-light);
    border-top: 1px solid var(--rule);
    padding-top: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
}
.substrate-entry-body h4:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}
.substrate-entry-body p {
    max-width: 64ch;
}
.substrate-entry-body ul {
    max-width: 64ch;
}
.substrate-entry-body code {
    font-size: 0.88em;
}

/* ============================== Home: Substrate hero zone =========== */

.home-substrate {
    margin: 4rem 0 4.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--rule);
}
.home-substrate .section-label {
    font-family: var(--font-sans);
}
.home-substrate .section-intro {
    font-family: var(--font-serif);
    color: var(--text-soft);
    max-width: 64ch;
    line-height: 1.55;
    margin: 0 0 1.75rem;
}
.home-substrate-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1.5rem;
}
.home-substrate-card {
    border: 1px solid var(--rule);
    background: var(--bg-raised);
    transition: border-color 0.15s ease-out;
}
.home-substrate-card:hover {
    border-color: var(--accent-light);
}
.home-substrate-card a {
    display: block;
    padding: 1.1rem 1.25rem 1rem;
    text-decoration: none;
    color: var(--text);
}
.home-substrate-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}
.home-substrate-card-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.005em;
}
.home-substrate-card a:hover .home-substrate-card-name {
    color: var(--accent-light);
}
.home-substrate-card-summary {
    font-family: var(--font-serif);
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 0.85rem;
}
.home-substrate-card-meta {
    margin: 0;
    padding-top: 0.55rem;
    border-top: 1px solid var(--rule);
    font-family: var(--font-sans);
    font-size: var(--type-eyebrow);
    color: var(--meta);
}
.home-substrate-more {
    margin-top: 1.5rem;
    font-family: var(--font-sans);
    font-size: var(--type-small);
}
.home-substrate-more a {
    color: var(--accent-light);
    text-decoration: none;
}
.home-substrate-more a:hover {
    text-decoration: underline;
}

/* ============================== Entry hero + companion substrate ===== */

.entry-hero {
    margin: 0 0 2rem;
    border: 1px solid var(--rule);
    background: var(--bg-raised);
    display: block;
    position: relative;
}
.entry-hero-placeholder .entry-hero-fill {
    aspect-ratio: 16 / 7;
    width: 100%;
    background:
        repeating-linear-gradient(
            45deg,
            transparent 0,
            transparent 18px,
            rgba(180, 180, 180, 0.05) 18px,
            rgba(180, 180, 180, 0.05) 19px
        ),
        var(--bg);
}
.entry-hero-caption {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.66rem;
    color: var(--meta);
    border-top: 1px dashed var(--rule);
    padding: 0.55rem 0.9rem;
    margin: 0;
}

.companion-substrate {
    margin: 0 0 2.25rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid var(--rule);
    background: var(--bg-raised);
}
.companion-substrate-label {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.66rem;
    color: var(--meta);
    margin: 0 0 0.5rem;
}
.companion-substrate-intro {
    font-family: var(--font-serif);
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0 0 0.75rem;
}
.companion-substrate-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.companion-substrate-list a {
    font-family: var(--font-sans);
    font-size: var(--type-small);
    color: var(--accent-light);
    text-decoration: none;
}
.companion-substrate-list a:hover {
    text-decoration: underline;
}
.companion-substrate-list code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 0.95em;
}

/* See-also block. Frontmatter-driven internal-link linkbacks emitted at
   the post footer. Identical typographic stance to companion-substrate so
   the two read as siblings: companion = which substrate you can verify
   the post against; see-also = which other posts this one extends. */
.see-also {
    margin: 0 0 2.25rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid var(--rule);
    background: var(--bg-raised);
}
.see-also-label {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.66rem;
    color: var(--meta);
    margin: 0 0 0.5rem;
}
.see-also-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.see-also-list a {
    font-family: var(--font-sans);
    font-size: var(--type-small);
    color: var(--accent-light);
    text-decoration: none;
}
.see-also-list a:hover {
    text-decoration: underline;
}
.see-also-list code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 0.95em;
}

/* Syntax-highlight token classes. Pre-rendered at build time by the
   blog-builder Zig tokenizer; no client-side JS. Mapped against the
   existing palette so highlighting reads as part of the brand rather
   than as a third-party theme overlay.

   tok-kw       — control / declaration keywords (pub, fn, const, if, …)
   tok-lit      — true / false / null / undefined
   tok-type     — primitive types (u8, usize, void, …)
   tok-num      — numeric literals (hex / bin / decimal / float)
   tok-str      — string + char literals, multi-line `\\` strings
   tok-builtin  — @-prefixed builtins (@import, @as, @intCast, …)
   tok-comment  — line comments
   tok-doc      — doc comments (///)
*/
pre code .tok-kw       { color: var(--accent); }
pre code .tok-lit      { color: var(--accent-light); }
pre code .tok-type     { color: var(--accent-light); }
pre code .tok-num      { color: #e6c190; }
pre code .tok-str      { color: #b9d3a6; }
pre code .tok-builtin  { color: var(--accent); font-style: italic; }
pre code .tok-comment  { color: var(--meta); font-style: italic; }
pre code .tok-doc      { color: var(--text-soft); font-style: italic; }

/* Pre-registered claims block. Siblings the companion-substrate and
   see-also panels in typography; differentiated by the dotted left
   border that reads as "this is verification-discipline, not framing." */
.pre-reg-block {
    margin: 0 0 2.25rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px dashed var(--rule-strong);
    background: var(--bg-sunken);
}
.pre-reg-label {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.66rem;
    color: var(--meta);
    margin: 0 0 0.5rem;
}
.pre-reg-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}
.pre-reg-list code {
    font-family: var(--font-mono);
    font-size: var(--type-small);
    color: var(--accent-light);
    background: transparent;
    border: none;
    padding: 0;
}

/* Essay-type chip. Renders above the post body to set reader expectation
   (substrate-grounded vs framing vs doctrine vs lineage). */
.essay-type-chip {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.66rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--rule);
    border-radius: 999px;
    color: var(--meta);
    margin: 0 0 1rem;
}
.essay-type-substrate-grounded {
    border-color: var(--accent-light);
    color: var(--accent-light);
}
.essay-type-doctrine {
    border-color: var(--accent);
    color: var(--accent);
}
.essay-type-framing {
    border-color: var(--rule-strong);
    color: var(--text-soft);
}
.essay-type-lineage {
    border-color: var(--rule-strong);
    color: var(--text-soft);
    font-style: italic;
}

/* When the companion panel sits inside the lab-entry sidebar it should
   pin to a slightly narrower stack. */
.lab-entry-sidebar .companion-substrate {
    margin-top: 1.5rem;
    padding: 0.85rem 0.9rem 0.95rem;
}

/* ============================================================ */
/* End of stax.css — brand DNA overlay below this line.        */
/* ============================================================ */
/* ============================================================
   stax-brand.css — Sunlit Moon brand DNA overlay
   Source-of-truth: ~/strategy/dna-salvage/sunlit-moon-site/brand-direction.json
   Applied AFTER stax.css (cascade order matters; this file wins).
   ============================================================ */

/* ---- Font loading (substrates for the spec) ---------------- */
/* Spec: Neue Haas Grotesk Display Pro + Playfair Display + Avenir Next Condensed
   Substrates available via Google Fonts: Inter Tight (Neue Haas grotesk family),
   Playfair Display (exact), Barlow Condensed (Avenir Next Condensed family).
   JetBrains Mono retained as the monospace. */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Barlow+Condensed:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ---- Brand color tokens ------------------------------------ */
:root {
    /* Cathedral Void spec */
    --bg: #0D0E15;                    /* primary deep void */
    --bg-elevated: #0A0A0E;           /* elevated surfaces */
    --bg-deep: #050508;               /* deepest panel */
    --accent: #FF9E00;                /* molten iron */
    --accent-warm: #FF9E00;
    --accent-coral: #B23A48;          /* crimson signal */
    --text: #F4F1EA;                  /* warm parchment */
    --text-muted: rgba(244, 241, 234, 0.62);
    --text-faint: rgba(244, 241, 234, 0.38);
    --border: rgba(90, 53, 110, 0.3); /* purple tinted borders */
    --border-emphasis: rgba(90, 53, 110, 0.5);
    --rule: rgba(90, 53, 110, 0.3);

    /* Typography stack */
    --font-display: 'Inter Tight', 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', system-ui, sans-serif;
    --font-serif: 'Playfair Display', 'Source Serif Pro', Georgia, serif;
    --font-accent: 'Barlow Condensed', 'Avenir Next Condensed', 'Oswald', sans-serif;
    --font-mono: 'JetBrains Mono', 'Space Mono', ui-monospace, monospace;

    /* Typographic scale */
    --type-display-1: clamp(3rem, 8vw, 6.5rem);
    --type-display-2: clamp(2.25rem, 5vw, 4rem);
    --type-display-3: clamp(1.75rem, 3vw, 2.5rem);
    /* Type scale. Anchors checked against gwern (37 distinct sizes),
       karpathy.ai (7), patrickcollison.com (2). sunlitmoon target lives
       between karpathy minimalism and gwern density — 10 tokens, mapped
       to the ad-hoc cascade's modal frequencies. */
    --type-eyebrow: 0.72rem;        /* 9 sites; small uppercase labels */
    --type-caption: 0.78rem;        /* 18 sites (modal); chips, meta */
    --type-small: 0.85rem;          /* 17 sites; secondary body */
    --type-meta: 0.95rem;           /* 9 sites; emphasized meta */
    --type-body: 1.0625rem;         /* primary long-form body */
    --type-comfortable: 1.15rem;    /* 8 sites; lede / generous body */
    --type-lede: 1.375rem;          /* opener / pull-quote scale */
    --type-h3: 1.5rem;              /* 5 sites; section heading */
}

/* ---- Base body — warm paper, serif body --------------------- */
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-serif);
    font-size: var(--type-body);
    line-height: 1.65;
    font-weight: 400;
}

/* Background texture on home + section indexes — subtle basquiat */
body.section-home::before,
body.section-substrate::before,
body.section-lab::before,
body.section-objects::before,
body.section-canon::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url('/img/brand/texture-basquiat.png');
    background-size: cover;
    background-position: center;
    opacity: 0.035;
    mix-blend-mode: overlay;
}
body > * { position: relative; z-index: 1; }

/* ---- Typography — all headings switch to display grotesk ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.018em;
    color: var(--text);
}
h1 { font-size: var(--type-display-2); letter-spacing: -0.025em; line-height: 1.05; }
h2 { font-size: var(--type-display-3); letter-spacing: -0.02em; line-height: 1.15; }

/* Eyebrow labels — condensed accent face */
.section-label, .substrate-card .substrate-card-name + .substrate-card-summary::before,
.eyebrow, .lab-eyebrow {
    font-family: var(--font-accent);
    font-size: var(--type-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: var(--accent);
}

/* Lede paragraphs — Playfair italic, larger */
.lede, p.lede {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--type-lede);
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 38ch;
}

/* Body copy in posts uses serif by default */
.post-body, .post-content, article {
    font-family: var(--font-serif);
}
article p, .post-body p { max-width: 68ch; }

/* Code stays mono */
code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

/* ---- Navigation — 4 primary + secondary tiering ------------- */
.site-header {
    border-bottom: 1px solid var(--rule);
    background: linear-gradient(180deg, var(--bg) 0%, rgba(26, 26, 26, 0.92) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1.25rem 1.5rem;
}
.site-header .brand {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}
.site-header .brand-mark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: 0.02em;
    color: var(--accent);
}
.site-header .brand-tag {
    font-family: var(--font-accent);
    font-size: var(--type-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--text-faint);
    font-weight: 500;
}
.site-header nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-left: auto;
}
.site-header nav a {
    font-family: var(--font-display);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text);
    text-decoration: none;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.site-header nav a:hover { border-bottom-color: var(--accent); color: var(--accent); }

/* Primary 4 nav items: Journal, Substrate, Canon, About — full weight */
.site-header nav a[href*="index.html"],
.site-header nav a[href*="../substrate/"],
.site-header nav a[href*="../canon/"],
.site-header nav a[href*="../about.html"] {
    font-weight: 600;
    color: var(--text);
}
/* Secondary nav items — muted */
.site-header nav a[href*="../lab/"],
.site-header nav a[href*="../objects/"],
.site-header nav a[href*="../workshop/"],
.site-header nav a[href*="../essays.html"],
.site-header nav a[href*="../feed.xml"] {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
}
.site-header nav a[href*="../feed.xml"]::before {
    content: 'RSS';
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 2px;
    margin-right: 0.35rem;
}
.site-header nav a[href*="../feed.xml"] { font-size: 0; }
.site-header nav a[href*="../feed.xml"]::before { font-size: 0.7rem; }

/* ---- /substrate/ — card grid → editorial entries ------------ */
.substrate-hero {
    padding: 4rem 1.5rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
}
.substrate-hero h1 {
    font-size: var(--type-display-1);
    margin: 0.5rem 0 1.5rem;
    line-height: 0.95;
}
.substrate-hero .lede {
    font-size: var(--type-lede);
    max-width: 52ch;
    margin: 1rem 0;
}
.substrate-note {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    border-left: 2px solid var(--accent);
    background: rgba(255, 214, 160, 0.04);
    font-size: var(--type-meta);
    color: var(--text-muted);
    max-width: 64ch;
}

/* The lane sections — large editorial typography per lane */
.substrate-lane {
    padding: 3.5rem 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    border-bottom: 1px solid var(--rule);
}
.substrate-lane h2.section-label {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
    color: var(--accent);
    margin: 0 0 0.5rem;
    text-transform: none;
}
.section-intro {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--type-comfortable);
    color: var(--text-muted);
    max-width: 56ch;
    margin: 0 0 2.5rem;
}

/* The grid of cards becomes a stack of editorial entries */
.substrate-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}
.substrate-card {
    background: transparent;
    border: none;
    border-top: 1px solid var(--rule);
    padding: 2.25rem 0;
    transition: background 0.2s ease;
}
.substrate-card:hover { background: rgba(255, 214, 160, 0.025); }
.substrate-card:last-child { border-bottom: 1px solid var(--rule); }

.substrate-card-link {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr) auto;
    gap: 2.5rem;
    align-items: start;
    text-decoration: none;
    color: var(--text);
}
@media (max-width: 760px) {
    .substrate-card-link { grid-template-columns: 1fr; gap: 1rem; }
}

.substrate-card-head {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.substrate-card-name {
    font-family: var(--font-display);
    font-size: var(--type-h3);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    line-height: 1.1;
}
.substrate-card-link:hover .substrate-card-name { color: var(--accent); }

.substrate-card-summary {
    font-family: var(--font-serif);
    font-size: var(--type-body);
    line-height: 1.55;
    color: var(--text);
    margin: 0;
    max-width: 60ch;
}

.substrate-card-meta {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    align-self: end;
    text-align: right;
}
.substrate-meta-row {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
}
.substrate-meta-row dt {
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: var(--type-eyebrow);
    color: var(--text-faint);
}
.substrate-meta-row dd { margin: 0; color: var(--text-muted); }
@media (max-width: 760px) {
    .substrate-card-meta { text-align: left; align-self: start; }
    .substrate-meta-row { justify-content: flex-start; }
}

/* Status pills — accent-tinted */
.substrate-status-pill {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
    font-weight: 600;
}
.substrate-status-pill.st-experimental {
    background: rgba(248, 95, 95, 0.12);
    color: var(--accent-coral);
    border: 1px solid rgba(248, 95, 95, 0.32);
}
.substrate-status-pill.st-pre-10 {
    background: rgba(255, 214, 160, 0.10);
    color: var(--accent);
    border: 1px solid rgba(255, 214, 160, 0.34);
}
.substrate-status-pill.st-stable {
    background: rgba(244, 241, 234, 0.05);
    color: var(--text);
    border: 1px solid var(--border-emphasis);
}

/* Source path — discreet bottom line */
.substrate-card-source {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-faint);
    margin: 0.75rem 0 0;
    grid-column: 1 / -1;
}
.substrate-source-label {
    font-family: var(--font-accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-right: 0.5rem;
    color: var(--accent);
}

/* ---- /lab/ — table → editorial list with project tags ------- */
.lab-main {
    padding: 4rem 1.5rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
}
.lab-main h1 {
    font-size: var(--type-display-1);
    margin: 0.5rem 0 1.5rem;
    line-height: 0.95;
}
.lab-main .lede {
    font-size: var(--type-lede);
    margin: 1rem 0 3rem;
    max-width: 52ch;
}

.lab-table {
    display: block;
    border: none;
    border-collapse: collapse;
    width: 100%;
}
.lab-table thead { display: none; }
.lab-table tbody { display: block; }
.lab-table tr {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    grid-template-areas:
        "date project evidence"
        "date title   title";
    gap: 0.4rem 1.5rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--rule);
    align-items: baseline;
}
.lab-table tr:last-child { border-bottom: 1px solid var(--rule); }
.lab-table tr:hover { background: rgba(255, 214, 160, 0.025); }
.lab-table td { display: block; padding: 0; border: none; vertical-align: top; }
.lab-table .lab-date { grid-area: date; font-family: var(--font-mono); font-size: var(--type-small); color: var(--text-faint); }
.lab-table .lab-date code { background: none; padding: 0; color: var(--text-faint); }
.lab-table .lab-project { grid-area: project; }
.lab-table .lab-title { grid-area: title; }
.lab-table .lab-title a {
    font-family: var(--font-display);
    font-size: 1.275rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--text);
    text-decoration: none;
}
.lab-table .lab-title a:hover { color: var(--accent); }
.lab-table .lab-evidence { grid-area: evidence; text-align: right; }

.lab-project-tag {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--border-emphasis);
    background: rgba(255, 214, 160, 0.04);
    color: var(--accent);
    border-radius: 2px;
    font-weight: 600;
}

.lab-entry-evidence-pill {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    padding: 0.2rem 0.55rem;
    border-radius: 2px;
    font-weight: 600;
}
.ev-tested { background: rgba(120, 200, 130, 0.10); color: #9bd5a8; border: 1px solid rgba(120, 200, 130, 0.30); }
.ev-claimed { background: rgba(248, 95, 95, 0.10); color: var(--accent-coral); border: 1px solid rgba(248, 95, 95, 0.30); }
.ev-audited { background: rgba(255, 214, 160, 0.10); color: var(--accent); border: 1px solid rgba(255, 214, 160, 0.32); }
.ev-sketch { background: rgba(244, 241, 234, 0.04); color: var(--text-muted); border: 1px solid var(--rule); }

/* ---- /objects/ — editorial-list treatment ------------------ */
.objects-main, .section-objects main {
    padding: 4rem 1.5rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
}
.objects-main h1, .section-objects main h1 {
    font-size: var(--type-display-1);
    margin: 0.5rem 0 1.5rem;
    line-height: 0.95;
}

/* ---- Interactive Hardware Gallery for /objects/ ------------- */
.objects-grid, .object-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 2.5rem;
    list-style: none;
    padding: 0;
    margin: 3rem 0;
}
.object-card, .objects-grid > li {
    background: var(--bg-sunken);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.objects-grid > li:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(255, 214, 160, 0.1);
    background: var(--bg-sunken);
}
.objects-grid > li > a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    outline: none;
}
.objects-grid > li > a::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
}
.objects-grid > li .object-meta {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent-light);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.objects-grid > li h2 {
    font-size: var(--type-h3);
    margin: 0 0 1rem 0;
    line-height: 1.2;
    transition: color 0.2s ease;
}
.objects-grid > li:hover h2 {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(255, 214, 160, 0.3);
}
.objects-grid > li p {
    color: var(--text-muted);
    font-size: var(--type-meta);
    line-height: 1.6;
    margin: 0;
}

/* ---- Hero treatment on home — display + texture ------------- */
.site-hero, .home-hero, .hero {
    padding: 6rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}
.site-hero h1, .home-hero h1, .hero h1 {
    font-size: var(--type-display-1);
    line-height: 0.92;
    letter-spacing: -0.03em;
    margin: 0 0 1.5rem;
    max-width: 18ch;
}
.site-hero .lede, .home-hero .lede, .hero .lede {
    max-width: 48ch;
    font-size: var(--type-lede);
}

/* Brand mark in nav can be replaced with svg */
.site-header .brand-mark::before {
    content: '';
    display: inline-block;
    width: 22px;
    height: 22px;
    background: url('/img/brand/brand-mark.svg') center center / contain no-repeat;
    margin-right: 0.45rem;
    vertical-align: middle;
}

/* ---- Articles, post bodies, dropcaps ------------------------ */
article > p:first-of-type::first-letter,
.post-body > p:first-of-type::first-letter {
    font-family: var(--font-display);
    font-size: 4.2em;
    font-weight: 700;
    line-height: 0.85;
    float: left;
    margin: 0.05em 0.15em 0 0;
    color: var(--accent);
    padding-top: 0.05em;
}

article h2, .post-body h2 {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
}
article h3, .post-body h3 {
    margin-top: 2.25rem;
    font-size: 1.4rem;
}

article a, .post-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(255, 214, 160, 0.32);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s ease;
}
article a:hover, .post-body a:hover {
    text-decoration-color: var(--accent);
}

/* Blockquotes — Playfair italic, accent rule */
article blockquote, .post-body blockquote {
    border-left: 2px solid var(--accent);
    margin: 2rem 0;
    padding: 0.5rem 0 0.5rem 1.5rem;
    font-style: italic;
    color: var(--text-muted);
    font-size: var(--type-comfortable);
}

/* Footnotes section */
article .footnotes, .post-body .footnotes {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rule);
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* ---- Tables in body — editorial treatment ------------------- */
article table, .post-body table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    font-family: var(--font-display);
    font-size: var(--type-meta);
}
article thead th, .post-body thead th {
    text-align: left;
    font-family: var(--font-accent);
    font-size: var(--type-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--accent);
    padding: 0.6rem 0.85rem;
    border-bottom: 1.5px solid var(--accent);
    font-weight: 600;
}
article tbody td, .post-body tbody td {
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--rule);
    vertical-align: top;
}
article tbody tr:hover, .post-body tbody tr:hover {
    background: rgba(255, 214, 160, 0.025);
}

/* ---- Footer — Sunlit Moon signature ------------------------- */
.site-footer, footer.site-footer {
    border-top: 1px solid var(--rule);
    margin-top: 6rem;
    padding: 3rem 1.5rem;
    background: var(--bg-deep);
    color: var(--text-muted);
    font-size: 0.88rem;
}
.site-footer a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-emphasis);
    text-underline-offset: 3px;
}
.site-footer a:hover { color: var(--accent); }

/* Footer tagline echo */
.site-footer::after {
    content: 'Find the angel in the marble. Keep the chisel marks.';
    display: block;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rule);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.92rem;
    color: var(--text-faint);
    text-align: center;
    max-width: 56ch;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Selection color ---------------------------------------- */
::selection { background: var(--accent); color: var(--bg); }

/* ---- Responsive polish -------------------------------------- */
@media (max-width: 760px) {
    .site-header { padding: 1rem; }
    .site-header nav { gap: 0.85rem; flex-wrap: wrap; }
    .site-header nav a { font-size: var(--type-small); padding: 0.2rem 0; }
}

/* ---- Focus visible — accessibility -------------------------- */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ---- End ---------------------------------------------------- */

/* ============================================================
   Newsletter form — Listmonk capture (added 2026-05-28)
   ============================================================ */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 1.25rem 0;
    max-width: 480px;
}
.newsletter-label {
    font-family: var(--font-accent);
    font-size: var(--type-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.newsletter-input {
    font-family: var(--font-display);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    color: var(--text);
    border: 1px solid var(--border-emphasis);
    border-radius: 2px;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.newsletter-input::placeholder {
    color: var(--text-faint);
    font-style: italic;
}
.newsletter-input:focus {
    border-color: var(--accent);
    background: rgba(255, 214, 160, 0.04);
}
.newsletter-submit {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    background: var(--accent);
    color: var(--bg);
    border: 1px solid var(--accent);
    border-radius: 2px;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.15s ease, color 0.15s ease;
    text-transform: none;
}
.newsletter-submit:hover {
    background: var(--bg);
    color: var(--accent);
}
.newsletter-blurb {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--type-meta);
    color: var(--text-muted);
    margin-top: 0.75rem;
    max-width: 56ch;
}

/* ============================================================
   Arc landing pages — editorial pathway treatment
   Replaces flat .essay-list rendering with Newlab-style
   ============================================================ */
body main > h1 {
    font-size: var(--type-display-1, clamp(3rem, 8vw, 6.5rem));
    line-height: 0.92;
    letter-spacing: -0.025em;
    margin: 4rem 1.5rem 1rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}
body main > p.lede {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: var(--type-lede, 1.375rem);
    line-height: 1.5;
    color: var(--text-muted);
    max-width: 52ch;
    margin: 0 1.5rem 3rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.essay-list {
    list-style: none;
    padding: 0 1.5rem;
    margin: 0 auto;
    max-width: 1100px;
}
.essay-list > li {
    border-top: 1px solid var(--rule);
    padding: 0;
    margin: 0;
    transition: background 0.18s ease;
}
.essay-list > li:last-child {
    border-bottom: 1px solid var(--rule);
}
.essay-list > li:hover {
    background: rgba(255, 214, 160, 0.025);
}
.essay-list > li > a {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr);
    gap: 2.5rem;
    align-items: start;
    padding: 2.25rem 0;
    text-decoration: none;
    color: var(--text);
}
@media (max-width: 760px) {
    .essay-list > li > a {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 1.75rem 0;
    }
}
.essay-list .essay-meta {
    display: block;
    font-family: var(--font-mono);
    font-size: var(--type-caption);
    color: var(--text-faint);
    letter-spacing: 0.02em;
    line-height: 1.4;
}
.essay-list .essay-title {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.18;
    color: var(--text);
    margin-bottom: 0.65rem;
    transition: color 0.15s ease;
}
.essay-list > li > a:hover .essay-title {
    color: var(--accent);
}
.essay-list .essay-summary {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--type-body);
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 64ch;
}

/* Per-essay newsletter capture — distinguish from main page form */
.newsletter-capture.post-newsletter {
    margin: 4rem auto 3rem;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--rule);
    max-width: 68ch;
}
.newsletter-capture.post-newsletter .section-label {
    font-family: var(--font-accent);
    font-size: var(--type-eyebrow);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: block;
}

/* Interactive Dashboard (Substrate Benchmarks) */
.interactive-dashboard {
    background: var(--bg-raised);
    border: 1px solid var(--rule-strong);
    border-radius: 8px;
    display: flex;
    margin: 3rem 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.dashboard-sidebar {
    width: 250px;
    background: var(--bg);
    border-right: 1px solid var(--rule-strong);
    display: flex;
    flex-direction: column;
}

.dashboard-tab {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--rule);
    color: var(--text-soft);
    padding: 1.25rem 1rem;
    text-align: left;
    font-family: var(--font-mono);
    font-size: var(--type-small);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-tab:hover { background: rgba(255, 214, 160, 0.05); color: var(--text); }
.dashboard-tab.active { background: var(--bg-raised); color: var(--accent-light); border-left: 3px solid var(--accent-light); }

.dashboard-tab .badge {
    background: var(--rule-strong);
    color: var(--meta);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}
.dashboard-tab.active .badge { background: rgba(255, 214, 160, 0.1); color: var(--accent-light); }

.dashboard-content {
    flex: 1;
    padding: 2.5rem;
}

.pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pane-header h3 { margin: 0; font-family: var(--font-sans); font-size: var(--type-h3); color: var(--text); }
.pane-summary { color: var(--text-soft); font-family: var(--font-serif); margin-bottom: 2.5rem; font-size: 1.1rem; line-height: 1.6; }

.benchmark-chart {
    background: var(--bg-sunken);
    border: 1px solid var(--rule);
    padding: 2rem;
    border-radius: 6px;
    margin-bottom: 2.5rem;
}

.bar-group { margin-bottom: 1.5rem; }
.bar-group:last-child { margin-bottom: 0; }

.bar-label { font-family: var(--font-sans); font-size: var(--type-small); color: var(--text); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.bar-track { background: var(--bg-raised); height: 24px; border-radius: 4px; overflow: hidden; position: relative; }
.bar-fill { height: 100%; display: flex; align-items: center; padding: 0 0.75rem; font-family: var(--font-mono); font-size: 0.75rem; font-weight: bold; color: #fff; transition: width 1s ease-out; }
.bar-fill.py-bar { background: #E44D26; } /* Slow/Bloat color */
.bar-fill.zig-bar { background: #27c93f; } /* Fast/Sovereign color */

.dashboard-link { display: inline-block; }

@media (max-width: 768px) {
    .interactive-dashboard { flex-direction: column; }
    .dashboard-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--rule-strong); flex-direction: row; overflow-x: auto; }
    .dashboard-tab { border-bottom: none; border-right: 1px solid var(--rule); flex: 1; justify-content: center; min-width: 150px; }
    .dashboard-tab.active { border-left: none; border-bottom: 3px solid var(--accent-light); }
    .dashboard-tab .badge { display: none; }
}

/* --------------------------------------------------------
   Path B Aesthetics: Series Navigation & Progress Bar
   -------------------------------------------------------- */

@keyframes reading-progress-glow {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@supports (animation-timeline: scroll()) {
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform-origin: 0 50%;
    transform: scaleX(0);
    animation: reading-progress-glow linear;
    animation-timeline: scroll();
    z-index: 9999;
    box-shadow: 0 0 15px var(--accent);
    pointer-events: none;
  }
}

/* Upgraded Terminal Hover for Series Navigation */
.essay-list > li {
    position: relative;
    border: 1px solid transparent;
    border-bottom: 1px solid var(--rule);
    transition: all 0.2s ease;
}
.essay-list > li:hover {
    background: var(--bg-deeper);
    border-color: #333;
    box-shadow: inset 4px 0 0 var(--accent);
}
.essay-list > li > a:hover .essay-title {
    color: var(--accent);
    text-shadow: 0 0 10px rgba(255, 214, 160, 0.3);
}
.essay-list .essay-meta {
    color: var(--accent-light);
}

/* ==========================================================================
   Premium Micro-Interactions & Cathedral Aesthetics
   ========================================================================== */

/* Global Smooth Transitions */
a, button, .post-item, .hero-metric, .brand-tag, .terminal-mock {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hyperlink Hover Glow */
a:hover {
    color: #FFD6A0;
    text-shadow: 0 0 12px rgba(255, 214, 160, 0.3);
}

/* Navigation Hover Polish */
.site-header nav a {
    position: relative;
}
.site-header nav a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: #FFD6A0;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 214, 160, 0.5);
}
.site-header nav a:hover::after {
    width: 100%;
}

/* Button & Input Polish */
.newsletter-submit {
    position: relative;
    overflow: hidden;
}
.newsletter-submit:hover {
    background-color: #e6c190;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 214, 160, 0.2);
}
.newsletter-submit:active {
    transform: translateY(1px);
}
.newsletter-input:focus {
    border-color: #FFD6A0;
    box-shadow: 0 0 0 1px rgba(255, 214, 160, 0.2);
    outline: none;
}

/* Canvas/Terminal Depth Effects */
.benchmark-chart canvas, .terminal-mock {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}
.benchmark-chart:hover canvas, .terminal-mock:hover {
    transform: scale(1.01);
}
.terminal-mock:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(255, 214, 160, 0.15);
}


/* Premium Interactions & Glassmorphism */
.essay-list > li > a {
    transition: transform 0.25s cubic-bezier(0.19, 1, 0.22, 1), background-color 0.25s ease;
}
.essay-list > li:hover {
    background: rgba(255, 214, 160, 0.04);
}
.essay-list > li > a:hover {
    transform: translateY(-2px);
}
nav, .nav, header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.6) !important;
    border-bottom: 1px solid rgba(255, 214, 160, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
nav a, .nav a, header a {
    position: relative;
    transition: color 0.2s ease;
}
nav a:hover, .nav a:hover, header a:hover {
    color: var(--brand) !important;
}
nav a::after, .nav a::after, header a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--brand);
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}
nav a:hover::after, .nav a:hover::after, header a:hover::after {
    width: 100%;
}
.card, .post-card, .essay-entry {
    transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), box-shadow 0.3s ease;
}
.card:hover, .post-card:hover, .essay-entry:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(255, 214, 160, 0.1);
}

/* ============================================================
   REDESIGN 2026 — Sovereign Craft Layer (RISD / Gwern-aligned)
   Density with navigability. Iceberg over walls. Self-hosted only.
   Form must demonstrate the same verification rigor as the code.
   ============================================================ */

/* --- Core reading measure & breathing (fix "no breathing room") --- */
:root {
  --measure: 68ch;           /* optimal for long-form prose */
  --line-height-body: 1.72;
  --rhythm: 1.5rem;          /* base vertical unit */
}

main > section,
main > article,
main > .canon-start,
main > .substrate-main > * {
  margin-bottom: 3.5rem;     /* deliberate cathedral space between major blocks */
}

p, li, blockquote {
  margin-bottom: 1.25rem;    /* tighter than before for density, still breath */
}

h2 + p, h3 + p {
  margin-top: -0.25rem;      /* pull lede up under heading */
}

/* --- Sidenotes foundation (Gwern-style upgrade path) --- */
/* Refs stay superscript. On wide screens we will surface notes in margin via
   JS or future renderer output using .sidenote containers. */
.sidenote {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-soft);
  border-left: 2px solid var(--accent);
  padding-left: 0.6rem;
  margin: 0.4rem 0;
}
@media (min-width: 1080px) {
  /* When HTML provides paired .sidenote after ref or in grid, float it. */
  .sidenote {
    float: right;
    clear: right;
    width: 22ch;
    margin: 0.2rem -2rem 0.6rem 1rem;
    padding: 0.3rem 0 0.3rem 0.75rem;
    font-size: 0.78rem;
    border-left: 1px solid var(--rule-strong);
  }
  .footnotes {
    /* Keep for narrow/print; hide on wide once sidenotes active */
    opacity: 0.6;
  }
}

/* Classic footnotes keep good target styling (already present) */

/* --- Stack diagram (replaces LiveView pending) --- */
.stack-diagram {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-sunken);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
}
.stack-diagram figcaption {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--meta);
  margin-bottom: 0.75rem;
}
.stack-visual {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stack-layer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255,255,255,0.015);
  border-left: 3px solid var(--accent);
}
.stack-layer .layer-label {
  color: var(--text);
  font-weight: 600;
}
.stack-layer .layer-val {
  color: var(--text-soft);
  font-size: 0.8rem;
  text-align: right;
}
.stack-foot {
  font-size: 0.8rem;
  color: var(--meta);
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* --- Substrate catalog polish (make the star magnetic) --- */
.substrate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}
.substrate-card {
  background: var(--bg-raised);
  border: 1px solid var(--rule-strong);
  padding: 0.9rem 1rem;
  transition: border-color 0.2s, transform 0.2s;
}
.substrate-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.substrate-card-name { font-weight: 600; }
.substrate-status-pill {
  font-size: 0.65rem;
  padding: 0.1em 0.5em;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid currentColor;
}
.st-experimental { color: #f4a261; border-color: rgba(244,162,97,0.4); }
.st-pre-10 { color: #e9c46a; border-color: rgba(233,196,106,0.4); }
.st-stable { color: #2a9d8f; border-color: rgba(42,157,143,0.4); }
.st-active { color: var(--accent); }

/* Add client-side filter UI later via JS; these classes prepare it */
.substrate-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.substrate-filters button,
.substrate-filters input {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  padding: 0.3em 0.7em;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rule-strong);
  cursor: pointer;
}
.substrate-filters button.active,
.substrate-filters button:hover {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

/* --- Canon "Start Here" as proper path, not list --- */
.canon-list {
  counter-reset: canon;
  list-style: none;
  padding-left: 0;
}
.canon-list li {
  margin-bottom: 1.25rem;
  position: relative;
}
.canon-list a {
  display: flex;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}
.canon-number {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  min-width: 2ch;
  flex-shrink: 0;
}
.canon-body { flex: 1; }
.canon-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.canon-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--meta);
  letter-spacing: 0.04em;
}
.canon-list a:hover .canon-title { color: var(--accent); }

/* Progress hint for canon (iceberg / orientation) */
.canon-progress {
  font-size: 0.7rem;
  color: var(--meta);
  margin-top: 1rem;
}

/* --- Visual rhetoric primitives (tollbooth / topology hints) --- */
.tollbooth, .bottleneck {
  font-weight: 600;
  border-bottom: 1px dotted var(--accent);
  cursor: help;
}
.topology {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-sunken);
  padding: 0.1em 0.4em;
  border-radius: 2px;
}

/* --- Dense but scannable prose (Gwern iceberg) --- */
.lede, .abstract {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
details.abstract {
  border: 1px solid var(--rule);
  padding: 0.5rem 0.75rem;
  margin-bottom: 1.5rem;
}
details.abstract summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Print (load-bearing for long-form canon) --- */
@media print {
  body { background: white; color: #111; font-size: 10.5pt; }
  .site-header, .site-footer, .terminal-mock, .subscribe, nav, .footnotes { display: none !important; }
  main, .site-header, .site-footer { max-width: 100%; padding: 0; }
  a { color: #111; text-decoration: underline; }
  .sidenote { float: none; width: auto; margin: 0; border: none; font-size: 8pt; }
}

/* --- Misc craft --- */
hr.chisel {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--rule-strong), transparent);
  margin: 4rem 0;
}
