/* ============================================================
   article.css — margin-rail journal article framework
   Scope: body.article-page. Loads after site.css and reuses its
   :root vars (--bg/--surface/--text/--accent/--border…).
   A left rail carries dates, section labels and artifact
   captions beside a quiet 62ch serif column. Every artifact is
   pre-rendered to designed HTML — the persona prompt is a
   typeset document, the rubrics read as prose rows, the numbers
   get real typography. Zero runtime cost.
   ============================================================ */

/* ------------------------------------------------------------
   layout / rail
   ------------------------------------------------------------ */

.article-page {
    font-family: "Literata", "Source Serif 4", Georgia, serif;
}

.article-page .journal-shell {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0;
    padding: 4.4rem 1.5rem 6rem clamp(1.5rem, 5vw, 4.5rem);
}

.article-page .journal {
    --rail: 170px;
    --gut: 3.1rem;
    --space: 1.55rem;
    position: relative;
    max-width: calc(var(--rail) + var(--gut) + 62ch);
    margin: 0;
    padding-left: calc(var(--rail) + var(--gut));
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text);
}

/* the back-link header in site.css centers against a 1100px
   column; with the shell anchored left, pin it to the shell's
   left padding instead (only where the desktop layout applies —
   site.css's tablet/mobile header rules stay untouched) */
@media (min-width: 900px) {
    .article-page .page-header {
        left: clamp(1.5rem, 5vw, 4.5rem);
    }
}

/* hairline rule between rail and main column — dotted, with the
   original top/bottom fade preserved via a mask */
.article-page .journal::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    bottom: 0;
    left: calc(var(--rail) + var(--gut) / 2);
    width: 1px;
    background: repeating-linear-gradient(to bottom,
            var(--border) 0,
            var(--border) 1px,
            transparent 1px,
            transparent 4px);
    -webkit-mask-image: linear-gradient(to bottom,
            transparent,
            #000 3rem,
            #000 calc(100% - 4rem),
            transparent);
    mask-image: linear-gradient(to bottom,
            transparent,
            #000 3rem,
            #000 calc(100% - 4rem),
            transparent);
    pointer-events: none;
}

/* ---- the margin rail -------------------------------------- */

.article-page .mn {
    float: left;
    clear: left;
    width: var(--rail);
    margin-left: calc(-1 * (var(--rail) + var(--gut)));
    padding-top: 0.16em;
    text-align: right;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--text-muted);
}

/* section label repeated in the rail — the longform voice, tracked
   small caps in Literata */
.article-page .mn--section {
    padding-top: 0.22em;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
}

/* typewriter artifact captions */
.article-page .mn--artifact {
    font-family: "Special Elite", "Courier New", cursive;
    font-size: 0.7rem;
    line-height: 1.7;
    letter-spacing: 0.02em;
    color: var(--text-muted);
}

/* date / log / series beside the title */
.article-page .mn--meta {
    padding-top: 0.6rem;
    font-family: "Special Elite", "Courier New", cursive;
    font-size: 0.72rem;
    line-height: 1.95;
    color: var(--text-muted);
}

.article-page .mn--meta span {
    display: block;
}

.article-page .mn--meta span:first-child {
    color: var(--text);
}

/* ------------------------------------------------------------
   typography
   ------------------------------------------------------------ */

/* ---- title block ------------------------------------------ */

.article-page .titleblock {
    margin: 0 0 calc(var(--space) * 2);
    padding-bottom: var(--space);
    border-bottom: 1px dotted var(--border);
}

.article-page h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: -0.012em;
}

/* ---- body -------------------------------------------------- */

.article-page .journal p {
    margin: 0 0 var(--space);
}

.article-page .journal a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-decoration-color: rgba(110, 58, 30, 0.55);
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
    transition: text-decoration-color 120ms ease;
}

.article-page .journal a:hover {
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
}

.article-page h2 {
    clear: none;
    margin: calc(var(--space) * 2) 0 var(--space);
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--text);
}

.article-page h2::before {
    content: "";
    display: block;
    width: 2.2rem;
    height: 1px;
    margin-bottom: 0.62rem;
    background: rgba(110, 58, 30, 0.55);
}

/* ---- arrow lists: rust squares, hanging indents ------------- */

.article-page ul.flow-list {
    list-style: none;
    margin: calc(-0.35 * var(--space)) 0 var(--space);
    padding: 0;
    line-height: 1.64;
}

.article-page ul.flow-list li {
    position: relative;
    margin-bottom: 0.48rem;
    padding-left: 1.3rem;
}

.article-page ul.flow-list li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 0.12rem;
    width: 4px;
    height: 4px;
    background: rgba(110, 58, 30, 0.62);
}

/* ------------------------------------------------------------
   code chips
   ------------------------------------------------------------ */

/* inline code: quiet tinted chip */
.article-page .journal code {
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.78em;
    padding: 0.12em 0.42em 0.1em;
    border: 1px solid rgba(40, 34, 26, 0.13);
    border-radius: 3px;
    background: rgba(40, 34, 26, 0.035);
    color: var(--text);
}

/* ------------------------------------------------------------
   artifacts (shared)
   ------------------------------------------------------------ */

.article-page .artifact {
    margin: var(--space) 0 calc(var(--space) * 1.5);
}

/* ------------------------------------------------------------
   artifact: rubric — criterion rows
   ------------------------------------------------------------ */

.article-page .rubric {
    border-top: 1px dotted var(--border-strong);
    border-bottom: 1px dotted var(--border-strong);
}

.article-page .rubric-case {
    padding: 0.56rem 0 0.5rem;
    border-bottom: 1px dotted var(--border);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.7rem;
    letter-spacing: 0.01em;
    color: var(--text-subtle);
}

.article-page .crit {
    padding: 0.95rem 0 1.05rem;
}

.article-page .crit + .crit {
    border-top: 1px dotted var(--border);
}

/* id chip leads the row; the sentence sits flush beneath it */
.article-page .crit-id {
    display: inline-block;
    margin-bottom: 0.52rem;
    padding: 0.18em 0.58em 0.14em;
    border: 1px solid rgba(110, 58, 30, 0.18);
    border-radius: 3px;
    background: rgba(110, 58, 30, 0.05);
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.67rem;
    letter-spacing: 0.01em;
    color: var(--accent);
}

.article-page .crit p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.66;
    color: var(--text);
}

/* ------------------------------------------------------------
   artifact: dossier — typed scenario card
   ------------------------------------------------------------ */

.article-page .dossier {
    padding: 1.25rem 1.5rem 1.35rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    box-shadow:
        0 1px 2px rgba(40, 34, 26, 0.06),
        0 8px 22px rgba(40, 34, 26, 0.07);
    font-family: "Special Elite", "Courier New", cursive;
    color: var(--text);
}

.article-page .dossier-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.05rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    text-transform: uppercase;
}

.article-page .dossier-head .dossier-file {
    color: var(--accent);
    text-transform: none;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.article-page .dossier-body {
    font-size: 0.85rem;
    line-height: 1.85;
}

.article-page .dossier-body p {
    margin: 0 0 0.95em;
}

.article-page .dossier-body p:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------
   artifact: document plate — typeset persona prompt
   ------------------------------------------------------------ */

.article-page .plate {
    padding: 1.9rem 2.1rem 2rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--surface);
    box-shadow:
        0 1px 2px rgba(40, 34, 26, 0.06),
        0 8px 22px rgba(40, 34, 26, 0.07);
}

/* "# " heading -> small-caps section head, rust hairline under */
.article-page .plate h3 {
    margin: 2.5rem 0 1.05rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(110, 58, 30, 0.3);
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--text);
}

.article-page .plate h3:first-child {
    margin-top: 0;
}

/* "## " heading -> serif subhead */
.article-page .plate h4 {
    margin: 1.75rem 0 0.7rem;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.99rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

.article-page .plate p {
    margin: 0 0 0.85rem;
    font-size: 0.93rem;
    line-height: 1.68;
    color: var(--text);
}

.article-page .plate p:last-child {
    margin-bottom: 0;
}

/* spec rows: tag column + hanging text. Carries DO / DO NOT
   tags, typeset numerals and bullet markers alike, so every
   continuation line in the document aligns. */
.article-page .spec {
    display: grid;
    grid-template-columns: 4.1rem minmax(0, 1fr);
    column-gap: 0.95rem;
    padding: 0.3rem 0;
}

.article-page .spec p {
    margin: 0;
}

.article-page .spec-tag {
    padding-top: 0.36em;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: right;
    white-space: nowrap;
}

.article-page .spec--do .spec-tag {
    color: var(--text);
}

.article-page .spec--dont .spec-tag {
    color: var(--accent);
}

/* typeset numerals for the ordered list */
.article-page .spec--num .spec-tag {
    padding-top: 0.06em;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.88rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-muted);
}

/* plain bullet rows: a small rust square sits in the tag column */
.article-page .spec--item .spec-tag {
    position: relative;
}

.article-page .spec--item .spec-tag::after {
    content: "";
    position: absolute;
    top: 0.62em;
    right: 0.05rem;
    width: 4px;
    height: 4px;
    background: rgba(110, 58, 30, 0.55);
}

.article-page .spec-group {
    margin: 0 0 0.85rem;
}

/* ------------------------------------------------------------
   artifact: stat block — headline results
   ------------------------------------------------------------ */

.article-page .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: var(--space) 0 calc(var(--space) * 1.5);
    border-top: 1px dotted var(--border-strong);
    border-bottom: 1px dotted var(--border-strong);
}

.article-page .stat {
    padding: 1.1rem 0 1rem;
}

.article-page .stat + .stat {
    border-left: 1px dotted var(--border);
    padding-left: 2.1rem;
}

.article-page .stat-label {
    display: block;
    margin-bottom: 0.55rem;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.article-page .stat--mine .stat-label {
    color: var(--accent);
}

.article-page .stat-num {
    display: block;
    font-size: 2.45rem;
    font-weight: 600;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.015em;
    color: var(--text);
}

.article-page .stat-cap {
    display: block;
    margin-top: 0.5rem;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
}

.article-page .stat-sub {
    display: block;
    margin-top: 0.22rem;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   artifact: failure index — ranked list with dotted leaders
   ------------------------------------------------------------ */

.article-page .fail-index {
    list-style: none;
    margin: 0;
    padding: 0.45rem 0;
    border-top: 1px dotted var(--border-strong);
    border-bottom: 1px dotted var(--border-strong);
}

/* when a fail-index follows a stat block, the stats' bottom
   border already separates them — drop the duplicate hairline */
.article-page .stats + .artifact .fail-index {
    border-top: 0;
}

.article-page .fail-index li {
    padding: 0.72rem 0;
}

.article-page .fail-line {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
}

.article-page .fail-index code {
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.8rem;
    letter-spacing: 0.01em;
    color: var(--text);
    overflow-wrap: anywhere;
}

.article-page .fail-leader {
    flex: 1 1 auto;
    min-width: 1.5rem;
    border-bottom: 1px dotted var(--border);
}

.article-page .fail-count {
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.97rem;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.article-page .fail-cases {
    display: block;
    margin-top: 0.3rem;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
    color: var(--text-muted);
}

/* ------------------------------------------------------------
   artifact: embedded figures / custom elements
   ------------------------------------------------------------ */

/* embedded net sits in the column like any figure */
.article-page .artifact tau-airline-net {
    margin: 0;
}

/* ------------------------------------------------------------
   article nav, quiet (overrides site.css's two-column grid)
   ------------------------------------------------------------ */

/* flex row: with two links (bare <a>s or <div>-wrapped — both
   become flex items) Previous sits left and Next sits right;
   a lone link stays left because space-between with one item
   pins it to the start. Long titles never touch: min 3rem
   column gap, and overflow wraps onto a second row. */
.article-page .article-nav {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem 3rem;
    margin-top: calc(var(--space) * 2.4);
    padding-top: 1.15rem;
    border-top: 1px dotted var(--border);
}

.article-page .article-nav > * {
    min-width: 0;
}

.article-page .article-nav-link--next {
    grid-column: auto;
    text-align: left;
}

.article-page a.article-nav-link {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
    padding: 0.4rem 0;
    border: 0;
    background: transparent;
}

.article-page .article-nav-kicker {
    color: var(--text-muted);
}

.article-page a.article-nav-link:hover .article-nav-title,
.article-page a.article-nav-link:focus-visible .article-nav-title {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

/* narrow screens: Previous keeps the left, Next keeps the right —
   each link gets its half and wraps within it */
@media (max-width: 639px) {
    .article-page .article-nav {
        gap: 0.6rem 1rem;
    }

    .article-page .article-nav > * {
        max-width: 46%;
    }

    .article-page .article-nav-link--next {
        text-align: right;
    }

    .article-page .article-nav-title {
        font-size: 0.82rem;
    }
}

/* ============================================================
   topo background art — one great peak per post, real-elevation
   contours rendered at near-paper alpha (the SVGs bake their own
   faint stroke-opacity; this layer just places them). Static art,
   so it stays on under prefers-reduced-motion. .journal-shell is
   position:relative + z-index:1, so content always stacks above.
   ============================================================ */

.article-page .post-topo {
    /* the page's mountain, full-bleed behind everything — no frame,
       no corner box: the terrain IS the page's ground */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 899px) {
    /* mobile keeps clean paper */
    .article-page .post-topo {
        display: none;
    }
}

/* ============================================================
   responsive — rail collapses inline below 900px
   ============================================================ */

@media (max-width: 899px) {
    .article-page .journal-shell {
        padding: 3.4rem 1rem 4rem;
    }

    .article-page .journal {
        max-width: 62ch;
        padding-left: 0;
    }

    .article-page .journal::before {
        display: none;
    }

    .article-page .mn {
        float: none;
        clear: none;
        display: block;
        width: auto;
        margin: 0 0 0.55rem;
        padding-top: 0;
        text-align: left;
    }

    /* the heading already says it — drop the duplicate label */
    .article-page .mn--section {
        display: none;
    }

    .article-page .titleblock {
        display: flex;
        flex-direction: column-reverse;
    }

    .article-page .mn--meta {
        margin: 0.85rem 0 0;
        padding-top: 0;
        line-height: 1.6;
    }

    .article-page .mn--meta span {
        display: inline;
    }

    .article-page .mn--meta span + span::before {
        content: "\00b7";
        margin: 0 0.55em;
        color: var(--text-subtle);
    }
}

@media (max-width: 540px) {
    .article-page .journal {
        font-size: 1rem;
    }

    .article-page h1 {
        font-size: 1.66rem;
    }

    .article-page .plate {
        padding: 1.2rem 1.05rem 1.25rem;
    }

    .article-page .prose .excerpt,
    .article-page .prose .code-example,
    .article-page .prose .technical-note,
    .article-page .prose .table-note,
    .article-page .prose figure:not(.excerpt *, .code-example *, .technical-note *, .plate *, .dossier *):not(:has(.excerpt, .code-example, .technical-note, .plate, .dossier)),
    .article-page .prose pre:not(.excerpt *, .code-example *, .technical-note *, .table-note *, .plate *, .dossier *, figure *) {
        padding: 1.05rem 1rem;
    }

    .article-page .prose > img {
        padding: 0.45rem;
    }

    .article-page .spec {
        grid-template-columns: 3.5rem minmax(0, 1fr);
        column-gap: 0.7rem;
    }

    .article-page .spec-tag {
        letter-spacing: 0.1em;
    }

    .article-page .stat + .stat {
        padding-left: 1.2rem;
    }

    .article-page .stat-num {
        font-size: 1.85rem;
    }

    .article-page .fail-index code {
        font-size: 0.74rem;
    }

    .article-page .fail-count {
        font-size: 0.92rem;
    }

    .article-page .fail-cases {
        font-size: 0.68rem;
    }

    .article-page .dossier {
        padding: 1rem 1rem 1.05rem;
    }
}

/* ------------------------------------------------------------
   writing index (the /writing page)
   ------------------------------------------------------------ */

.article-page .windex {
    margin-top: calc(var(--space) * 0.4);
}

.article-page a.windex-entry {
    display: block;
    padding: 1.05rem 0 1.15rem;
    border-bottom: 1px dotted var(--border);
    text-decoration: none;
    border-bottom-color: var(--border);
}

.article-page a.windex-entry:hover,
.article-page a.windex-entry:focus-visible {
    border-bottom-color: rgba(110, 58, 30, 0.34);
}

.article-page .mn--entry {
    padding-top: 0.34em;
    font-family: "Special Elite", "Courier New", cursive;
    font-size: 0.7rem;
    line-height: 1.9;
    color: var(--text-muted);
}

.article-page .mn--entry span {
    display: block;
}

.article-page .mn--entry span:first-child {
    color: var(--text);
}

.article-page .windex-title {
    display: block;
    font-size: 1.22rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.008em;
    color: var(--text);
    transition: color 90ms ease-out;
}

.article-page a.windex-entry:hover .windex-title,
.article-page a.windex-entry:focus-visible .windex-title {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.article-page .windex-desc {
    display: block;
    margin-top: 0.3rem;
    font-family: "Literata", "Source Serif 4", Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
}

@media (max-width: 899px) {
    .article-page .mn--entry {
        margin-bottom: 0.3rem;
    }

    .article-page .mn--entry span {
        display: inline;
    }

    .article-page .mn--entry span + span::before {
        content: " · ";
        color: var(--text-subtle);
    }
}

/* ------------------------------------------------------------
   side headers only — the rail label IS the section header on
   desktop; the in-column h2 text returns when the rail collapses
   ------------------------------------------------------------ */

@media (min-width: 900px) {
    .article-page h2 {
        margin: calc(var(--space) * 2) 0 0;
        font-size: 0;
        line-height: 0;
    }

    .article-page h2::before {
        display: none;
    }

    .article-page h2 .mn--section {
        font-size: 0.64rem;
        line-height: 1.55;
    }
}

/* ------------------------------------------------------------
   unified paper cards — every artifact block reads as a white
   paper card with hairline border, soft shadow, faint grain.
   Covers the named artifact classes plus any bare pre, figure,
   or standalone image dropped into a .prose container, so new
   pages inherit the card language without extra classes. The
   :not() guards keep blocks that already sit inside a carded
   parent from getting a second card (and a double grain).
   ------------------------------------------------------------ */

.article-page .prose .excerpt,
.article-page .prose .code-example,
.article-page .prose .technical-note,
.article-page .prose .table-note,
.article-page .prose figure:not(.excerpt *, .code-example *, .technical-note *, .plate *, .dossier *):not(:has(.excerpt, .code-example, .technical-note, .plate, .dossier)),
.article-page .prose pre:not(.excerpt *, .code-example *, .technical-note *, .table-note *, .plate *, .dossier *, figure *),
.article-page .prose > img {
    position: relative;
    /* auto sides keep max-width figures centered; computes to 0
       for full-width blocks */
    margin: var(--space) auto calc(var(--space) * 1.5);
    padding: 1.5rem 1.7rem 1.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 1px solid var(--border);
    border-radius: 4px;
    box-shadow:
        0 1px 2px rgba(40, 34, 26, 0.07),
        0 10px 28px rgba(40, 34, 26, 0.10);
}

/* the card supplies the paper surface — drop the old tinted
   inset frame around figure images; the image keeps its own
   hairline from site.css */
.article-page .prose figure .figure-frame {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* bare code blocks carded directly: code-example typography */
.article-page .prose pre {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-family: "SF Mono", "Menlo", "Consolas", monospace;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text);
}

.article-page .prose pre code {
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: inherit;
}

/* standalone images read as small paper plates */
.article-page .prose > img {
    display: block;
    width: 100%;
    height: auto;
    padding: 0.6rem;
}

.article-page .plate,
.article-page .dossier {
    border-radius: 4px;
    box-shadow:
        0 1px 2px rgba(40, 34, 26, 0.07),
        0 10px 28px rgba(40, 34, 26, 0.10);
}

.article-page .prose .excerpt::after,
.article-page .prose .code-example::after,
.article-page .prose .technical-note::after,
.article-page .prose .table-note::after,
.article-page .prose figure:not(.excerpt *, .code-example *, .technical-note *, .plate *, .dossier *):not(:has(.excerpt, .code-example, .technical-note, .plate, .dossier))::after,
.article-page .prose pre:not(.excerpt *, .code-example *, .technical-note *, .table-note *, .plate *, .dossier *, figure *)::after,
.article-page .plate::after,
.article-page .dossier::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0.5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.13 0 0 0 0 0.09 0 0 0 0.045 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

.article-page .plate,
.article-page .dossier {
    position: relative;
}

/* ------------------------------------------------------------
   wide tables — let data breathe past the text measure
   ------------------------------------------------------------ */

.article-page .prose table {
    width: 100%;
}

.article-page .prose th {
    white-space: nowrap;
}

@media (min-width: 1100px) {
    .article-page .journal .prose:has(> table),
    .article-page .journal .prose:has(table) {
        width: calc(100% + clamp(2rem, 14vw, 14rem));
        max-width: none;
    }
}

/* ------------------------------------------------------------
   typewriter display layer — titles and wayfinding speak in the
   homepage's ink voice; body prose stays serif for reading
   ------------------------------------------------------------ */

.article-page h1 {
    font-family: "Special Elite", "Courier New", cursive;
    font-size: 1.9rem;
    font-weight: 400;
    font-variant-ligatures: none;
    letter-spacing: 0.015em;
    line-height: 1.25;
}

.article-page .windex-title {
    font-family: "Special Elite", "Courier New", cursive;
    font-size: 1.04rem;
    font-weight: 400;
    font-variant-ligatures: none;
    letter-spacing: 0.02em;
}

.article-page .article-nav-kicker {
    font-family: "Special Elite", "Courier New", cursive;
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: lowercase;
}

.article-page .article-nav-title {
    font-family: "Special Elite", "Courier New", cursive;
    font-size: 0.92rem;
    font-variant-ligatures: none;
    letter-spacing: 0.02em;
}

@media (max-width: 540px) {
    .article-page h1 {
        font-size: 1.5rem;
    }
}

/* ------------------------------------------------------------
   topo provenance note — the page quietly admits which mountain
   it stands on; color matches the page's range
   ------------------------------------------------------------ */

.article-page .topo-note {
    position: fixed;
    right: 22px;
    bottom: 18px;
    margin: 0;
    z-index: 0;
    font-family: "Special Elite", "Courier New", monospace;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    text-transform: lowercase;
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

@media (max-width: 899px) {
    .article-page .topo-note {
        display: none;
    }
}

/* ------------------------------------------------------------
   paper, more paper — stronger grain and card-stock lighting on
   every paper surface: a lit top edge, a settled bottom edge,
   and visible tooth
   ------------------------------------------------------------ */

.article-page .prose .excerpt,
.article-page .prose .code-example,
.article-page .prose .technical-note,
.article-page .plate,
.article-page .dossier {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -1px 2px rgba(40, 34, 26, 0.05),
        0 1px 2px rgba(40, 34, 26, 0.08),
        0 10px 28px rgba(40, 34, 26, 0.11);
}

.article-page .prose .excerpt::after,
.article-page .prose .code-example::after,
.article-page .prose .technical-note::after,
.article-page .plate::after,
.article-page .dossier::after {
    opacity: 1;
    /* three layers of paper: edge shading, broad fibrous mottle, and
       fine tooth — the sheet reads as stock, not vector */
    background-image:
        radial-gradient(ellipse 130% 110% at 50% -5%,
            transparent 62%, rgba(40, 34, 26, 0.05) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.018' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.13 0 0 0 0 0.09 0 0 0 0.085 0'/%3E%3C/filter%3E%3Crect width='420' height='420' filter='url(%23m)'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' seed='11'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.13 0 0 0 0 0.09 0 0 0 0.1 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
}

/* phones: data tables compress to fit — no horizontal scrolling */
@media (max-width: 540px) {
    .article-page .prose th {
        white-space: normal;
    }

    .article-page .prose table {
        font-size: 0.62rem;
        line-height: 1.4;
    }

    .article-page .prose th,
    .article-page .prose td {
        padding: 0.4rem 0.45rem;
    }

    .article-page .prose .table-wrap {
        overflow-x: visible;
    }

    /* the Section row-headers give up their reserved width and wrap */
    .article-page .prose .results-table th[scope="rowgroup"] {
        width: 22%;
        white-space: normal;
        overflow-wrap: break-word;
        font-size: 0.6rem;
    }

    .article-page .prose td {
        white-space: normal;
    }
}
