/* ==========================================================================
   Base — reset, type, shared chrome and utilities.
   Structure comes from 1px hairlines in var(--line). Nothing is rounded and
   nothing on the page carries a shadow; only fixed overlays do.
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--pg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
    max-width: 100%;
}

img {
    border-radius: 0;
}

::selection {
    background: var(--acc-tint);
}

a {
    color: var(--acc);
    text-decoration: none;
    transition: color .18s ease;
}

a:hover {
    color: var(--acc-solid);
}

[data-theme="light"] a:hover {
    color: var(--ink);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    margin: 0;
    text-wrap: pretty;
}

p {
    text-wrap: pretty;
}

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

:focus-visible {
    outline: 2px solid var(--acc);
    outline-offset: 2px;
}

button {
    font-family: inherit;
    border-radius: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 900;
    background: var(--pg2);
    border: 1px solid var(--acc);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 12px 18px;
}

.skip-link:focus {
    left: 12px;
    top: 12px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

@keyframes slidein {
    from { transform: translateY(14px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.wrap--wide {
    max-width: var(--max-wide);
}

.wrap--tight {
    max-width: 1080px;
    padding-left: var(--gutter-tight);
    padding-right: var(--gutter-tight);
}

/* Sections are separated by a rule with the label sitting under it. */
.section {
    padding-bottom: 80px;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
    margin-bottom: 34px;
}

.section-label {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .20em;
    text-transform: uppercase;
    color: var(--dim);
    margin: 0;
}

.section-link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .10em;
    white-space: nowrap;
}

/* ==========================================================================
   Registration marks — the blueprint frame.
   Drawn as eight hairlines in one pseudo-element so a framed object can never
   ship with its marks missing, and ::after stays free for the component.
   ========================================================================== */

.bp {
    position: relative;
    border: 1px solid var(--line);
}

.bp::before {
    content: "";
    position: absolute;
    inset: -6px;
    pointer-events: none;
    opacity: .7;
    background-image:
        linear-gradient(var(--acc), var(--acc)), linear-gradient(var(--acc), var(--acc)),
        linear-gradient(var(--acc), var(--acc)), linear-gradient(var(--acc), var(--acc)),
        linear-gradient(var(--acc), var(--acc)), linear-gradient(var(--acc), var(--acc)),
        linear-gradient(var(--acc), var(--acc)), linear-gradient(var(--acc), var(--acc));
    background-repeat: no-repeat;
    background-size: 11px 1px, 1px 11px, 11px 1px, 1px 11px,
                     11px 1px, 1px 11px, 11px 1px, 1px 11px;
    background-position:
        0 5px, 5px 0,                                   /* top-left */
        100% 5px, calc(100% - 5px) 0,                   /* top-right */
        0 calc(100% - 5px), 5px 100%,                   /* bottom-left */
        100% calc(100% - 5px), calc(100% - 5px) 100%;   /* bottom-right */
}

/* ==========================================================================
   Duotone imagery — every card and hero image is washed into the accent so
   the art reads as one palette. Hover lifts the wash to full colour.
   ========================================================================== */

.duotone {
    background: var(--duo);
    overflow: hidden;
    display: block;
}

.duotone > img {
    display: block;
    width: 100%;
    filter: grayscale(1) contrast(1.05);
    mix-blend-mode: luminosity;
    opacity: var(--duo-opacity);
    transition: filter .4s ease, opacity .4s ease;
}

.duotone--4x3 > img { aspect-ratio: 4 / 3; object-fit: cover; }

/* A photograph of a person renders at its own ratio and in full colour — the
   duotone wash is for the illustrated blog art, not for faces. */
.photo {
    display: block;
    overflow: hidden;
    background: var(--pg2);
}

.photo > img {
    display: block;
    width: 100%;
    height: auto;
}
.duotone--16x9 > img { aspect-ratio: 16 / 9; object-fit: cover; }

@media (hover: hover) {
    .duotone:hover > img,
    a:hover .duotone > img,
    a:focus-visible .duotone > img {
        filter: grayscale(0) contrast(1);
        mix-blend-mode: normal;
        opacity: 1;
    }
}

/* ==========================================================================
   Mono chrome — kickers, meta lines, tags, table columns, captions
   ========================================================================== */

.kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .20em;
    text-transform: uppercase;
    color: var(--acc);
}

.meta {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--acc);
}

.meta--dim {
    color: var(--dim);
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .06em;
    padding: 5px 9px;
    border: 1px solid var(--line);
    color: var(--dim);
}

a.tag:hover {
    color: var(--acc);
    border-color: var(--acc);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 26px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}

.btn:hover {
    border-color: var(--acc);
    color: var(--acc);
}

/* The one filled object on the page. */
.btn--primary {
    background: var(--acc-solid);
    border-color: var(--acc-solid);
    color: #fff;
}

.btn--primary:hover {
    background: var(--acc-deep);
    border-color: var(--acc-deep);
    color: #fff;
}

[data-theme="light"] .btn--primary:hover {
    background: var(--ink);
    border-color: var(--ink);
}

.btn--mono {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: none;
    padding: 11px 14px;
    color: var(--dim);
}

button.kbd {
    cursor: pointer;
    background: transparent;
    min-height: 0;
}

.kbd {
    display: inline-block;
    border: 1px solid var(--line);
    padding: 1px 5px;
    color: var(--acc);
    font-family: var(--font-mono);
    font-size: 10px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="url"],
textarea,
select {
    width: 100%;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 0;
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 17px;
    padding: 12px 14px;
    -webkit-appearance: none;
    appearance: none;
}

/* The platform clear button is a rounded glyph the system has no place for. */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--dim);
    opacity: .8;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--acc);
    outline: none;
}

textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}

/* A bordered field with a glyph in front of it — the rail search, the console. */
.field {
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    padding: 0 12px;
    min-height: 46px;
}

.field:focus-within {
    border-color: var(--acc);
}

.field__glyph {
    display: inline-flex;
    align-items: center;
    color: var(--acc);
    flex: none;
}

.field__glyph svg {
    width: 14px;
    height: 14px;
}

.field input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0;
    background: transparent;
    font-size: 15px;
}

.field input:focus {
    outline: none;
}

/* ==========================================================================
   Site nav
   ========================================================================== */

.site-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 18px var(--gutter);
    background: var(--pg);
    border-bottom: 1px solid var(--line);
}

.site-nav__brand {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ink);
    text-transform: uppercase;
    white-space: nowrap;
    flex: none;
}

.site-nav__qualifier {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    color: var(--dim);
    padding-top: 3px;
    white-space: nowrap;
}

.site-nav__links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0 0 0 auto;
    padding: 0;
    font-family: var(--font-heading);
    font-size: 14px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.site-nav__links a {
    color: var(--dim);
    display: inline-flex;
    align-items: center;
}

.site-nav__links a:hover {
    color: var(--ink);
}

.site-nav__links a.is-active {
    color: var(--acc);
}

.site-nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--dim);
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease;
}

.icon-btn:hover {
    color: var(--acc);
    border-color: var(--acc);
}

.icon-btn svg {
    width: 17px;
    height: 17px;
}

.site-nav__toggle {
    display: none;
}

/* Terminal register — the post page nav. */
.site-nav--terminal {
    gap: 24px;
    padding: 12px var(--gutter-tight);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .06em;
}

.site-nav--terminal .site-nav__brand {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: .06em;
    text-transform: none;
    color: var(--acc);
}

.site-nav--terminal .site-nav__path {
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-nav--terminal .site-nav__links {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: none;
    gap: 20px;
}

.site-nav--terminal .icon-btn {
    width: 34px;
    height: 34px;
    min-height: 34px;
}

/* Mobile drawer */
.nav-drawer {
    display: none;
}

@media (max-width: 1099px) {
    .site-nav__qualifier {
        display: none;
    }
}

@media (max-width: 991px) {
    .site-nav {
        gap: 12px;
        flex-wrap: nowrap;
    }

    .site-nav__qualifier {
        display: none;
    }

    .site-nav__links {
        display: none;
    }

    /* Brand + theme toggle + MENU on one row; the path is dropped. */
    .site-nav--terminal .site-nav__path {
        display: none;
    }

    .site-nav__brand {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-nav__toggle {
        display: inline-flex;
        font-family: var(--font-mono);
        font-size: 11px;
        letter-spacing: .14em;
        width: auto;
        padding: 0 14px;
        flex: none;
    }

    .site-nav__actions {
        margin-left: auto;
        flex: none;
    }

    .nav-drawer {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 80;
        background: var(--pg);
        padding: 24px var(--gutter-tight);
        transform: translateY(-100%);
        transition: transform .22s ease;
        overflow-y: auto;
    }

    .nav-drawer.is-open {
        transform: translateY(0);
    }

    .nav-drawer__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-bottom: 1px solid var(--line);
        padding-bottom: 18px;
        margin-bottom: 8px;
    }

    .nav-drawer ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .site-nav .btn--mono {
        display: none;
    }

    .nav-drawer a,
    .nav-drawer button {
        display: block;
        width: 100%;
        text-align: left;
        background: transparent;
        border: 0;
        font-family: var(--font-heading);
        font-size: 26px;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: var(--ink);
        padding: 18px 0;
        border-bottom: 1px solid var(--line);
        cursor: pointer;
    }
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 26px var(--gutter) 60px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .10em;
    color: var(--dim);
}

.site-footer__row {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.site-footer__links {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.site-footer__links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: .10em;
}

.site-footer__links a:hover {
    color: var(--acc);
}

.site-footer__links svg {
    width: 14px;
    height: 14px;
}

.type-switch {
    max-width: var(--max);
    margin: 26px auto 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.type-switch__label {
    letter-spacing: .18em;
    text-transform: uppercase;
}

.type-switch button {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .10em;
    text-transform: uppercase;
    padding: 8px 12px;
    cursor: pointer;
}

.type-switch button[aria-pressed="true"] {
    color: var(--acc);
    border-color: var(--acc);
}

/* ==========================================================================
   The console — command palette, inline rail answer, pinned post ask bar
   ========================================================================== */

.console-overlay {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(6, 11, 15, .66);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
}

.console-overlay[hidden] {
    display: none;
}

.console-panel {
    width: min(700px, 92vw);
    max-height: 76vh;
    overflow-y: auto;
    background: var(--pg2);
    border: 1px solid var(--acc);
    box-shadow: var(--shadow-panel);
    animation: slidein .18s ease-out;
}

.console-panel__prompt {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.console-panel__prompt span:first-child {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--acc);
}

.console-panel__prompt input {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 15px;
    padding: 2px 0;
}

.console-panel__prompt input:focus {
    outline: none;
}

.console-answer {
    padding: 14px 20px 8px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--dim);
    margin: 0;
}

.console-hits {
    padding: 6px 12px 14px;
}

.console-hit {
    display: grid;
    grid-template-columns: 92px 1fr 58px;
    gap: 14px;
    align-items: center;
    padding: 12px 10px;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    border-bottom: 1px solid var(--line);
}

.console-hit:hover {
    background: var(--acc-tint);
    color: var(--ink);
}

.console-hit__date { color: var(--acc); }
.console-hit__title { font-family: var(--font-body); font-size: 15px; }
.console-hit__read { color: var(--dim); text-align: right; }

.console-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--line);
}

.chip {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .04em;
    padding: 7px 11px;
    cursor: pointer;
    text-align: left;
}

.chip:hover {
    color: var(--acc);
    border-color: var(--acc);
}

.console-caret {
    width: 7px;
    height: 16px;
    background: var(--acc);
    animation: blink 1.1s step-end infinite;
    flex: none;
}

/* ==========================================================================
   Prose — rendered Markdown
   ========================================================================== */

.prose {
    font-size: 18px;
    line-height: 1.75;
    color: var(--ink);
    overflow-wrap: break-word;
}

/* A 37-character column rags heavily. Hyphenation closes most of that gap;
   justification would close all of it but opens rivers at this measure. */
@media (max-width: 767px) {
    .prose,
    .post__lede {
        hyphens: auto;
        -webkit-hyphens: auto;
    }
}

/* A long URL or identifier wraps rather than widening the column. */
.prose a,
.prose code,
.prose li,
.prose p {
    overflow-wrap: break-word;
}

.prose > p {
    margin: 0 0 20px;
}

.prose h2 {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--acc);
    margin: 44px 0 16px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: calc(var(--nav-h, 56px) + var(--askbar-h, 0px) + 24px);
}

.prose h3 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    margin: 32px 0 12px;
    scroll-margin-top: calc(var(--nav-h, 56px) + var(--askbar-h, 0px) + 24px);
}

.prose h4 {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
    margin: 26px 0 10px;
}

.prose ul,
.prose ol {
    margin: 0 0 22px;
    padding-left: 22px;
}

.prose li {
    margin-bottom: 9px;
}

.prose li::marker {
    color: var(--acc);
}

.prose strong,
.prose b {
    font-weight: 600;
    color: var(--ink);
}

.prose blockquote {
    margin: 30px 0;
    padding: 16px 20px;
    border-left: 2px solid var(--acc);
    background: var(--acc-tint);
    font-size: 15px;
    line-height: 1.7;
    color: var(--ink);
}

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

.prose a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--line);
}

.prose a:hover {
    text-decoration-color: var(--acc);
}

/* Code — first-class, with a mono title bar */
.prose pre {
    margin: 26px 0;
    border: 1px solid var(--line);
    background: var(--pg2);
    padding: 16px 14px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.85;
    color: var(--ink);
}

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

.code-block {
    margin: 26px 0;
    border: 1px solid var(--line);
    background: var(--pg2);
}

.code-block__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 13px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--dim);
}

.code-block__lang {
    color: var(--acc);
}

.code-block__copy {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--dim);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 4px 2px;
    min-height: 32px;
}

.code-block__copy:hover {
    color: var(--acc);
}

.code-block pre {
    margin: 0;
    border: 0;
    max-width: 100%;
}

.prose code {
    font-family: var(--font-mono);
    font-size: .88em;
    background: var(--acc-tint);
    border: 1px solid var(--line);
    padding: 1px 5px;
    color: var(--acc);
}

/* Figures, images and diagrams */
.prose img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    padding: 12px;
    background: var(--pg2);
    margin: 30px 0;
    cursor: zoom-in;
}

.prose figure {
    margin: 30px 0;
}

.prose figure img {
    margin: 0;
}

.prose figcaption,
.figure-caption {
    font-family: var(--font-mono);
    font-size: 10.5px;
    line-height: 1.7;
    color: var(--dim);
    margin-top: 10px;
}

.prose .mermaid {
    border: 1px solid var(--line);
    background: var(--pg2);
    padding: 20px 12px;
    margin: 30px 0;
    text-align: center;
    overflow-x: auto;
}

.prose .mermaid svg {
    max-width: 100%;
    height: auto;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    margin: 30px 0;
    font-size: 15px;
    display: block;
    overflow-x: auto;
}

.prose th {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--dim);
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.prose td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

.prose tr:last-child td {
    border-bottom: 0;
}

.prose .poetry {
    font-style: italic;
    color: var(--dim);
    text-align: center;
    margin: 30px 0;
}

/* Gist embeds inherit the ground rather than GitHub's white. */
.prose .gist,
.prose .gist .gist-file,
.prose .gist .highlight,
.prose .gist .gist-data,
.prose .gist .gist-meta {
    background: var(--pg2) !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
    border-radius: 0 !important;
}

/* ==========================================================================
   Reading progress, toast, lightbox
   ========================================================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    z-index: 200;
}

.reading-progress__bar {
    width: 0;
    height: 100%;
    background: var(--acc);
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translate(-50%, 20px);
    z-index: 600;
    background: var(--pg2);
    border: 1px solid var(--acc);
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .06em;
    padding: 13px 20px;
    box-shadow: var(--shadow-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(6, 11, 15, .92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
}

.lightbox.is-open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 84vh;
    border: 1px solid var(--line);
    background: var(--pg2);
    padding: 12px;
}

.lightbox__caption {
    position: absolute;
    bottom: 22px;
    left: 0;
    right: 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    color: var(--dim);
}

/* ==========================================================================
   Responsive baseline
   ========================================================================== */

@media (max-width: 991px) {
    :root {
        --gutter: 28px;
    }
}

@media (max-width: 575px) {
    :root {
        --gutter: 20px;
        --gutter-tight: 20px;
    }

    body {
        font-size: 17px;
    }

    .site-footer__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Touch and small screens: every target clears 44px. Fine pointers keep the
   designed density, which is what the comps show. */
@media (max-width: 991px), (pointer: coarse) {
    .site-nav__links a,
    .chip,
    .tag,
    .rail__row,
    .rail__answer-hits a,
    .pager > *,
    .next-writing a,
    .ask-bar__hits a,
    .console-hit,
    .post__series-part,
    .post__toc a,
    .site-footer__links a,
    .type-switch button,
    .code-block__copy,
    .icon-btn,
    .share-strip button {
        min-height: 44px;
    }

    .icon-btn,
    .site-nav--terminal .icon-btn,
    .share-strip button {
        width: 44px;
        height: 44px;
    }

    .tag,
    .chip {
        padding-top: 12px;
        padding-bottom: 12px;
    }
}

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