/* ==========================================================================
         ╔═╗╔═╗╔═╗╔═╗╦ ╦  ╔═╗╔═╗╔═╗
         ║╣ ╚═╗╚═╗╠═╣╚╦╝  ║  ╚═╗╚═╗
         ╚═╝╚═╝╚═╝╩ ╩ ╩   ╚═╝╚═╝╚═╝
   ========================================================================== */

/* --- TOKENS --- */
:root {
        --essay-fs: 1rem;
        --essay-lh: 1.65;
        --essay-measure: 41.25rem;
}

/* --- TYPE SCALE BY SCREEN --- */
@media (min-width: 768px) {
        :root { --essay-fs: 1.0625rem; --essay-lh: 1.7; }
}
@media (min-width: 1025px) {
        :root { --essay-fs: 1.0875rem; }
}
@media (min-width: 1900px) {
        :root { --essay-fs: 1.125rem; }
}

/* --- BASICS --- */
html {
        scroll-behavior: smooth;
}

body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        font-family: var(--font-body);
}

:target {
        scroll-margin-top: calc(var(--nav-h) + 1.5rem);
        animation: flash-highlight 1.6s ease-out;
}

@keyframes flash-highlight {
        from { background-color: rgba(var(--accent-rgb), 0.16); }
        to { background-color: transparent; }
}

/* --- BASE LAYOUT (MOBILE FIRST) --- */
.essay-wrapper {
        width: 100%;
        min-height: 100vh;
        display: grid;
        grid-template-columns: minmax(0, 100%);
        gap: 0;
        align-items: start;
        position: relative;
        color: var(--text-primary);
}

.essay-main-col {
        padding: 1.5rem 1.375rem 0;
        width: 100%;
        max-width: var(--essay-measure);
        margin: 0 auto;
        min-width: 0;
}

.essay-right-col {
        display: none;
        min-width: 0;
}

/* --- TITLE BLOCK --- */
.essay-thumbnail {
        display: block;
        width: 100%;
        height: auto;
        max-height: 15rem;
        object-fit: cover;
        border: 1px solid var(--border-color);
        border-radius: 2px;
        margin-bottom: 2rem;
}

.essay-title {
        font-family: var(--font-display);
        font-size: 2rem; /* for browsers without clamp() (・∀・) */
        font-size: clamp(1.65rem, 1.2rem + 2vw, 2.5rem);
        font-weight: 400;
        letter-spacing: 0.02em;
        text-align: center;
        line-height: 1.2;
        margin-bottom: 0.6rem;
        color: var(--text-heading);
        text-shadow: none;
        text-transform: uppercase;
}

.essay-subtitle {
        text-align: center;
        font-style: italic;
        color: var(--text-muted);
        font-size: calc(var(--essay-fs) * 0.95);
        line-height: 1.4;
        margin-bottom: 0.5rem;
}

.essay-meta {
        max-width: 32rem;
        margin: 0.9rem auto 1.75rem;
        padding-bottom: 1rem;
        text-align: center;
        font-size: 0.85rem;
        font-variant: small-caps;
        letter-spacing: 0.08em;
        color: var(--text-muted);
        border-bottom: 3px double var(--border-color);
}

/* --- BODY TEXT --- */
.essay-content {
        font-size: var(--essay-fs);
        line-height: var(--essay-lh);
}

.essay-content p {
        margin-bottom: 1.25em;
        text-align: justify;
        text-justify: inter-word;
        hyphens: auto;
        -webkit-hyphens: auto;
        text-wrap: pretty;
        orphans: 3;
        widows: 3;
}

/* drop cap φ(．．) */
.essay-content > p:first-of-type::first-letter,
.essay-content > h2 + p::first-letter,
.essay-content > h2 + .img-block + p::first-letter {
        float: left;
        font-family: var(--font-display);
        font-size: 3.7em;
        line-height: 0.8;
        margin: 0.07em 0.09em 0 0;
        color: var(--accent);
        text-transform: uppercase;
}

/* safari only thing */
.essay-content p,
.essay-content blockquote {
        hanging-punctuation: first allow-end last;
}

/* justify toggle */
body.force-left .essay-content p { text-align: left; hyphens: manual; -webkit-hyphens: manual; }

.essay-content h2 {
        font-family: var(--font-heading);
        font-size: 1.45em;
        font-weight: 400;
        line-height: 1.25;
        letter-spacing: 0.01em;
        color: var(--text-heading);
        text-shadow: none;
        margin: 2.4em 0 0.85em;
        padding-bottom: 0.35em;
        border-bottom: 3px double var(--border-color);
}

.essay-content > h2::before {
        content: "\00A7";
        margin-right: 0.45em;
        font-family: var(--font-body);
        font-size: 0.8em;
        color: var(--accent);
        opacity: 0.75;
}

.essay-content > h2:first-child {
        margin-top: 0;
}

.essay-content h3 {
        font-family: var(--font-body);
        font-size: 1.2em;
        font-style: italic;
        font-weight: 400;
        line-height: 1.3;
        color: var(--text-heading);
        text-shadow: none;
        margin: 1.8em 0 0.6em;
}

/* block quotes φ(．．) */
.essay-content blockquote {
        position: relative;
        margin: 2em 1.25em;
        padding: 0.9em 2.1em;
        border-top: 3px double var(--border-color);
        border-bottom: 3px double var(--border-color);
        background: none;
        font-style: normal;
        font-size: 0.93em;
        line-height: 1.6;
        color: var(--text-accent);
        text-align: center;
        hyphens: manual;
        -webkit-hyphens: manual;
}

.essay-content blockquote p,
body.force-left .essay-content blockquote p {
        text-align: center;
        hyphens: manual;
        -webkit-hyphens: manual;
}

.essay-content blockquote > .img-block.align-left,
.essay-content blockquote > .img-block.align-right {
        width: auto;
        max-width: 35%;
        margin: 0.25em 0 0.25rem;
}

.essay-content blockquote > .img-block.align-left {
        float: left;
        margin-right: 1.25rem;
}

.essay-content blockquote > .img-block.align-right {
        float: right;
        margin-left: 1.25rem;
}

.essay-content blockquote:has(> .img-block) {
        padding: 0.9em 0;
        display: flow-root;
}

.essay-content blockquote:has(> .img-block)::before {
        display: none;
}

.essay-content blockquote::before {
        content: "\201C";
        position: absolute;
        left: 0;
        top: 0.3em;
        font-family: var(--font-heading);
        font-size: 2.6em;
        line-height: 1;
        color: var(--accent);
        opacity: 0.7;
}

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

/* rule is at style.css so it's just spacing here */
hr {
        border: 0;
        margin: 3rem 0;
}

/* --- LINKS --- */
.essay-content a {
        color: var(--accent);
        text-decoration: underline;
        text-decoration-thickness: 1px;
        text-underline-offset: 0.2em;
        text-shadow: none;
        transition: color 0.2s ease;
}

@media (hover: hover) {
	.essay-content a:hover {
	        color: var(--text-heading);
	        text-shadow: none;
	}
}
/* --- FOOTNOTES --- */
.essay-content .fn-ref {
        font-size: 0.72em;
        line-height: 0;
        margin-left: 0.1em;
}

.essay-content .citation-link {
        font-weight: 600;
        text-decoration: none;
        padding: 0 0.12em;
        border-radius: 2px;
}

.essay-content .citation-link::before {
        content: "[";
}

.essay-content .citation-link::after {
        content: "]";
}

@media (hover: hover) {
	.essay-content .citation-link:hover {
	        background: rgba(var(--accent-rgb), 0.16);
	        color: var(--accent);
	        outline: none;
	}
}
.essay-content .citation-link:focus-visible {
        background: rgba(var(--accent-rgb), 0.16);
        color: var(--accent);
        outline: none;
}

.fn-popover {
        position: absolute;
        z-index: 300;
        width: max-content;
        max-width: min(24rem, calc(100vw - 16px));
        padding: 0.7rem 0.95rem;
        background: var(--surface-pop);
        border: 1px solid rgba(var(--accent-rgb), 0.45);
        border-radius: 3px;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
        color: var(--text-primary);
        font-family: var(--font-body);
        font-size: 0.9375rem;
        line-height: 1.5;
        text-align: left;
        overflow-wrap: anywhere;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

.fn-popover.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition-delay: 0s;
}

.fn-popover::after {
        content: "";
        position: absolute;
        left: clamp(14px, var(--arrow-x, 50%), calc(100% - 14px));
        bottom: -6px;
        width: 10px;
        height: 10px;
        background: var(--surface-pop);
        border-right: 1px solid rgba(var(--accent-rgb), 0.45);
        border-bottom: 1px solid rgba(var(--accent-rgb), 0.45);
        transform: translateX(-50%) rotate(45deg);
}

.fn-popover.below::after {
        bottom: auto;
        top: -6px;
        transform: translateX(-50%) rotate(225deg);
}

.fn-popover-num {
        margin-right: 0.5em;
        font-weight: 600;
        color: var(--accent);
}

.fn-popover a {
        color: var(--accent);
}

.fn-popover .fn-popover-jump {
        display: block;
        margin-top: 0.5rem;
        font-size: 0.8125rem;
        letter-spacing: 0.04em;
}

/* --- IMAGES & ALIGNMENT --- */
.img-block {
        margin-bottom: 1.125rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
}

.img-block img {
        border: 1px solid var(--border-color);
        border-radius: 2px;
        max-width: 100%;
        height: auto;
}

.img-caption {
        font-style: italic;
        font-size: 0.82em;
        color: var(--text-muted);
        text-align: center;
        margin-top: 0.5rem;
        line-height: 1.35;
}

.align-left, .align-right, .align-center, .align-full {
        display: block;
        margin: 1.125rem 0;
        width: 100%;
}

.align-left img, .align-right img, .align-center img, .align-full img {
        display: block;
        width: 100%;
        height: auto;
        margin: 0 auto;
}

.img-caption:empty {
        display: none;
}

.clear-fix {
        clear: both;
        display: block;
        height: 0;
}

/* --- TABLES (rules only, no cell borders) --- */
.table-wrapper {
        width: 100%;
        overflow-x: auto;
        display: block;
        margin: 1.5em 0;
        -webkit-overflow-scrolling: touch;
}

.essay-content table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.74em;
        table-layout: auto;
        border-top: 1px solid var(--text-primary);
        border-bottom: 1px solid var(--text-primary);
}

.essay-content th, .essay-content td {
        padding: 0.45em 0.4em;
        border: 0;
        border-bottom: 1px solid var(--border-color);
        text-align: left;
        vertical-align: top;
        overflow-wrap: break-word;
        word-break: normal;
        hyphens: auto;
        -webkit-hyphens: auto;
        line-height: 1.35;
}

@media (min-width: 480px) {
        .essay-content table { font-size: 0.82em; }
        .essay-content th, .essay-content td { padding: 0.5em 0.55em; }
}

.essay-content th {
        font-weight: 600;
        color: var(--text-heading);
        border-bottom: 1px solid var(--text-primary);
}

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

/* --- TABLE OF CONTENTS --- */
.essay-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        height: 100vh;
        background-color: rgba(var(--bg-primary-rgb), 0.98);
        border-right: 1px solid var(--border-color);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
        padding: 4.5rem 1.5rem 1.5rem;
        text-align: left;
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, visibility 0.4s ease;
        z-index: 200;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--border-color) transparent;
}
.essay-sidebar::-webkit-scrollbar {
        width: 3px;
}
.essay-sidebar::-webkit-scrollbar-track {
        background: transparent;
}
.essay-sidebar::-webkit-scrollbar-thumb,
.essay-sidebar::-webkit-scrollbar-thumb:hover {
        background-color: var(--border-color);
        border-radius: 2px;
}

.essay-sidebar.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
}

.essay-toc {
        --toc-num: 1.75em;
}

.essay-toc h3 {
        font-family: var(--font-nav);
        font-size: 0.95rem;
        font-variant: small-caps;
        letter-spacing: 0.12em;
        text-transform: none;
        text-shadow: none;
        color: var(--text-heading);
        margin: 0 0 1.25rem 0;
}

.essay-toc h3::after {
        content: "";
        display: block;
        width: 2.5rem;
        margin-top: 0.6rem;
        border-top: 1px solid rgba(var(--accent-rgb), 0.6);
}

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

.essay-toc a {
        display: block;
        font-family: var(--font-heading);
        line-height: 1.35;
        text-decoration: none;
        color: var(--text-primary);
        padding: 0.2rem 0;
        transition: color 0.2s ease;
}

.toc-num {
        color: var(--accent);
        font-variant-numeric: oldstyle-nums;
}

@media (hover: hover) {
	.essay-toc a:hover {
	        color: var(--accent);
	}
}

/* sections */
.toc-h2 a, .toc-h3 a {
        display: grid;
        grid-template-columns: var(--toc-num) 1fr;
}

.toc-h2 {
        margin-top: 0.45rem;
}

.toc-h2 a {
        font-size: 0.9rem;
        color: var(--text-heading);
}

.toc-h3 {
        margin-left: var(--toc-num);
}

.toc-h3 a {
        font-size: 0.78rem;
        font-style: italic;
        color: var(--text-muted);
}

/* back matter */
.toc-bib-item {
        margin-left: var(--toc-num);
}

:not(.toc-bib-item) + .toc-bib-item {
        margin-top: 1.1rem;
        padding-top: 0.9rem;
        border-top: 1px solid var(--border-color);
}

.toc-bib-link {
        font-size: 0.85rem;
        font-variant: small-caps;
        letter-spacing: 0.06em;
}

/* contents button */
.toc-toggle {
        position: fixed;
        top: calc(var(--nav-h) + 1px + 0.35rem);
        right: 0.35rem;
        z-index: 45;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.1rem;
        height: 2.1rem;
        padding: 0;
        background: var(--nav-bar-bg);
        border: 1px solid var(--nav-bar-line);
        border-radius: 2px;
        color: var(--nav-fg);
        cursor: pointer;
}
.toc-toggle svg {
        display: block;
        width: 1.15rem;
        height: 1.15rem;
}
.toc-toggle[aria-expanded="true"] {
        color: var(--accent);
        border-color: var(--accent);
}
@media (hover: hover) {
        .toc-toggle:hover {
                color: var(--text-heading);
                border-color: var(--accent);
        }
}
/* don't cover the season */
@media (max-width: 1024px) {
        .folio-line {
                padding-right: 2.6rem;
        }
}
#closeTocBtn {
        margin-top: 2rem;
        padding: 0.5rem 2rem;
        background: transparent;
        border: 1px solid var(--text-accent);
        color: var(--text-accent);
        font-family: var(--font-nav);
        font-size: 0.78rem;
        letter-spacing: 0.08em;
        cursor: pointer;
}

/* --- ACTIONS --- */
.action-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-muted);
        font-family: var(--font-nav);
        cursor: pointer;
        text-decoration: none;
        transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

@media (hover: hover) {
	.action-btn:hover {
	        border-color: var(--accent);
	        color: var(--accent);
	        background: rgba(var(--accent-rgb), 0.08);
	}
}
.action-btn.success {
        border-color: var(--success-color);
        color: var(--success-color);
}

/* action layout */
.mobile-actions-container {
        display: flex;
        justify-content: center;
        gap: 1.125rem;
        margin-bottom: 1.75rem;
        padding-bottom: 1.125rem;
        border-bottom: 1px solid var(--border-color);
}

.mobile-actions-container .action-btn {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        padding: 0;
}

body .mobile-actions-container .action-btn span {
        display: none;
}

.mobile-actions-container .action-btn svg {
        width: 1.05rem;
        height: 1.05rem;
}

/* alignment button */
.icon-align-left, .text-align-left { display: none; }
.icon-align-justify, .text-align-justify { display: inline-block; }

body.force-left .icon-align-justify,
body.force-left .text-align-justify { display: none; }

body.force-left .icon-align-left,
body.force-left .text-align-left { display: inline-block; }

/* --- REFERENCES --- */
.references-section {
        font-size: 0.9em;
        line-height: 1.55;
        color: var(--text-muted);
}

/* match the other headings */
.references-section h2 {
        margin-top: 0;
        font-size: calc(1.45em / 0.9);
}

.references-section ol {
        padding-left: 1.6em;
}

.references-section li {
        margin-bottom: 0.6em;
        padding-left: 0.3em;
        overflow-wrap: anywhere;
}

.references-section li::marker {
        color: var(--accent);
        font-variant-numeric: tabular-nums;
}

.essay-content .back-ref {
        margin-left: 0.3em;
        text-decoration: none;
        opacity: 0.7;
}

@media (hover: hover) {
	.back-ref:hover {
	        opacity: 1;
	}
}
.drop-cap {
        float: left;
        font-family: var(--font-display);
        font-size: 4.25rem;
        line-height: 0.8;
        margin-right: 0.75rem;
        margin-top: 0.375rem;
        color: var(--accent);
}

/* ==========================================================================
                TABLET & DESKTOP RESOLUTIONS
   ========================================================================== */

/* --- TABLET (min-width: 768px) --- */
@media (min-width: 768px) {
        .essay-main-col {
                padding: 3rem 2.75rem 0;
        }

        .essay-thumbnail {
                max-height: 24rem;
        }

        .align-left {
                float: left;
                margin: 0.3em 1.5rem 0.25rem 0;
                max-width: 45%;
                width: auto;
        }

        .align-right {
                float: right;
                margin: 0.3em 0 0.25rem 1.5rem;
                max-width: 45%;
                width: auto;
        }

        .align-center, .align-full {
                float: none;
                margin: 1.5rem auto;
                max-width: 100%;
                width: auto;
        }

        .align-center img {
                max-height: 600px;
                width: auto;
        }

        .table-wrapper {
                overflow-x: visible;
        }

        .essay-content table {
                table-layout: fixed;
                font-size: 0.9em;
        }

        .essay-content th, .essay-content td {
                padding: 0.5em 0.6em;
        }
}

/* --- MED SCREENS (min-width: 1025px) --- */
@media (min-width: 1025px) {
        .essay-wrapper {
                grid-template-columns: 15rem minmax(0, 1fr);
                justify-content: center;
        }

        .essay-sidebar {
                position: sticky;
                top: calc(var(--nav-h) + 1rem);
                left: auto;
                width: auto;
                height: auto;
                max-height: calc(100vh - var(--nav-h) - 2rem);
                background: transparent;
                border-right: 1px solid var(--border-color);
                box-shadow: none;
                padding: 1.5rem 2.25rem 1.5rem 1.5rem;
                transform: none;
                opacity: 1;
                visibility: visible;
                z-index: 40;
        }

        .toc-toggle,
        #closeTocBtn {
                display: none;
        }
}

@media (min-width: 1025px) and (max-width: 1399px) {
        .essay-wrapper {
                grid-template-columns: 18rem minmax(0, 1fr);
        }

        .essay-sidebar {
                padding: 1.5rem 1.5rem 1.5rem 1.25rem;
        }

        .essay-main-col {
                padding: 3rem 2rem 0;
        }
}

/* --- LARGE SCREENS (min-width: 1400px) --- */
@media (min-width: 1400px) {
        .essay-wrapper {
                --essay-measure: 42rem;
                grid-template-columns: minmax(200px, 18.75rem) minmax(0, var(--essay-measure)) minmax(200px, 18.75rem);
        }

        .essay-main-col {
                padding: 3rem 2rem 0;
        }

        .essay-right-col {
                display: block;
                border-left: 1px solid var(--border-color);
                align-self: stretch; /* sticky buttons fix */
                height: 100%;
        }

        .mobile-actions-container {
                display: none;
        }

        .essay-actions {
                position: sticky;
                top: calc(var(--nav-h) + 1.5rem);
                padding: 1.5rem 0 1.5rem 2.25rem;
                display: flex;
                flex-direction: column;
                gap: 0.75rem;
                align-items: flex-start;
        }

        .essay-actions .action-btn {
                padding: 0.55rem 1.125rem;
                width: 100%;
                max-width: 200px;
                gap: 0.75rem;
                border-radius: 0;
        }

        .essay-actions .action-btn svg {
                width: 1.05rem;
                height: 1.05rem;
                flex-shrink: 0;
        }
}


/* ==========================================================================
   READING AIDS AND BACK MATTER
   ========================================================================== φ(．．) */

/* publication note */
.essay-publication {
        margin: 0 0 2rem;
        padding: 0.8rem 1.1rem;
        background: rgba(70, 120, 190, 0.1);
        border: 1px solid rgba(110, 160, 230, 0.28);
        border-left: 3px solid rgba(110, 160, 230, 0.7);
        border-radius: 2px;
        font-size: 0.75rem;
        line-height: 1.55;
        color: var(--text-primary);
}
.essay-publication p { margin: 0; }
.essay-publication a {
        color: #8fb6e8;
        text-decoration: underline;
        text-underline-offset: 3px;
}
.essay-publication .pub-doi {
        display: inline-block;
        font-variant: small-caps;
        font-variant-numeric: lining-nums;
        letter-spacing: 0.04em;
        overflow-wrap: anywhere;
}
[data-theme="light"] .essay-publication {
        background: rgba(40, 90, 160, 0.07);
        border-color: rgba(40, 90, 160, 0.3);
        border-left-color: #2f5f9e;
}
[data-theme="light"] .essay-publication a { color: #2f5f9e; }

.essay-publication[data-status="press"] {
        margin: 0 0 1.5rem;
        padding: 0;
        background: none;
        border: none;
        color: var(--text-muted);
}

.essay-abstract {
        margin: 0 0 2.5rem;
        padding: 0.25rem 1.5rem 0.25rem 1.25rem;
        border-left: 1px solid rgba(var(--accent-rgb), 0.35);
        font-size: 0.9em;
        line-height: 1.6;
        color: var(--text-accent);
}
.essay-abstract .abstract-label {
        font-family: var(--font-nav);
        font-size: 0.72em;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--text-muted);
        margin: 0 0 0.45em;
}
.essay-abstract p { margin: 0 0 0.8em; }
.essay-abstract p:last-child { margin-bottom: 0; }

/* callouts: Obsidian's > [!warning] blocks, one colour per kind (the disclaimer
   kind matches .essay-disclaimer in style.css) */
.essay-content .callout {
        --callout: 96, 165, 250;
        margin: 1.8em 0;
        padding: 0.75em 1.1em;
        background: rgba(var(--callout), 0.09);
        border: 1px solid rgba(var(--callout), 0.28);
        border-left: 3px solid rgb(var(--callout));
        border-radius: 2px;
        font-size: 0.9em;
        line-height: 1.6;
        color: var(--text-primary);
        display: flow-root;
}
.essay-content .callout .callout-title {
        font-family: var(--font-nav);
        font-size: 0.72em;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        text-align: left;
        color: rgb(var(--callout));
        margin: 0 0 0.45em;
}
.essay-content .callout p { margin: 0 0 0.7em; }
.essay-content .callout p:last-child { margin-bottom: 0; }
.essay-content .callout .callout { margin: 0.9em 0; }
.essay-content .callout-tip { --callout: 45, 212, 191; }
.essay-content .callout-warning { --callout: 234, 179, 8; }
.essay-content .callout-danger { --callout: 248, 113, 113; }
.essay-content .callout-question { --callout: 192, 132, 252; }
.essay-content .callout-example { --callout: 148, 163, 184; }
.essay-content .callout-disclaimer { --callout: 63, 155, 90; }
[data-theme="light"] .essay-content .callout { background: rgba(var(--callout), 0.07); border-color: rgba(var(--callout), 0.35); border-left-color: rgb(var(--callout)); }
[data-theme="light"] .essay-content .callout-note { --callout: 37, 99, 235; }
[data-theme="light"] .essay-content .callout-tip { --callout: 15, 118, 110; }
[data-theme="light"] .essay-content .callout-warning { --callout: 161, 98, 7; }
[data-theme="light"] .essay-content .callout-danger { --callout: 185, 28, 28; }
[data-theme="light"] .essay-content .callout-question { --callout: 126, 34, 206; }
[data-theme="light"] .essay-content .callout-example { --callout: 71, 85, 105; }
[data-theme="light"] .essay-content .callout-disclaimer { --callout: 46, 125, 50; }
#introduction { display: block; scroll-margin-top: 4rem; }

/* series note */
.essay-series {
        padding: 0.85rem 1.1rem 0.9rem;
        line-height: 1.5;
}
.series-head {
        margin: 0 0 0.35rem;
}
.series-body.is-columns,
.series-list.is-columns {
        -webkit-column-width: 14rem;
        column-width: 14rem;
        -webkit-column-gap: 2rem;
        column-gap: 2rem;
}
.series-block {
        -webkit-column-break-inside: avoid;
        page-break-inside: avoid;
        break-inside: avoid;
        padding-bottom: 0.25rem;
}
.series-body .series-section {
        margin-top: 0;
}
.series-body .series-block + .series-block {
        padding-top: 0.35rem;
}
.series-list.is-columns {
        padding-left: 0;
}
.series-list.is-columns li {
        margin-left: 2.4em; /* room for the numbers */
        -webkit-column-break-inside: avoid;
        break-inside: avoid;
}
.series-section-no {
        margin-right: 0.2em;
        font-variant-numeric: lining-nums;
        color: #6fcf8f;
}
[data-theme="light"] .series-section-no { color: #1f6a2a; }
.series-section {
        margin: 0.6rem 0 0.15rem;
        font-size: 0.85em;
        font-variant: small-caps;
        letter-spacing: 0.1em;
        color: var(--text-muted);
}
.series-list {
        margin: 0;
        padding-left: 2.6em;
        list-style: upper-roman;
}
.series-list li {
        padding-left: 0.35em;
        margin: 0.12em 0;
}
.series-list .is-current {
        color: var(--text-heading);
}
.series-current {
        font-style: italic;
        border-bottom: 1px solid rgba(var(--accent-rgb), 0.7);
}
.series-here {
        margin-left: 0.45em;
        color: var(--accent);
}

/* reading progress */
.reading-progress {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        height: 1px;
        background: var(--accent);
        transform-origin: 0 50%;
        transform: scaleX(0);
        z-index: 51;
        pointer-events: none;
}

/* should have added a bibliography to begin with */
.bibliography-section {
        margin-top: 2.5rem;
        font-size: 0.9em;
        line-height: 1.55;
        color: var(--text-muted);
}
.bibliography-section h2 {
        margin-top: 0;
        font-size: calc(1.45em / 0.9);
}
.bibliography-section ul {
        list-style: none;
        padding: 0;
}
.bibliography-section li,
.bibliography-section p {
        margin: 0 0 0.6em;
        padding-left: 1.6em;
        text-indent: -1.6em;
        overflow-wrap: anywhere;
}

/* cite panel */
.cite-overlay {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 300;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.55);
}
.cite-overlay.is-open {
        display: flex;
}
.cite-dialog {
        width: 100%;
        max-width: 36rem;
        max-height: 100%;
        overflow-y: auto;
        padding: 1.5rem 1.6rem 1.25rem;
        background: var(--surface-pop);
        color: var(--text-primary);
        border: 1px solid rgba(var(--accent-rgb), 0.4);
        border-radius: 3px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
        font-family: var(--font-body);
}
.cite-dialog h2 {
        font-size: 1.25rem;
        margin: 0 0 0.25rem;
        text-shadow: none;
}
.cite-note {
        margin: 0 0 1rem;
        font-size: 0.85rem;
        font-style: italic;
        color: var(--text-muted);
}
.cite-format {
        padding: 0.75rem 0;
        border-top: 1px solid var(--border-color);
}
.cite-format-head {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 0.35rem;
        font-size: 0.85rem;
        font-variant: small-caps;
        letter-spacing: 0.1em;
        color: var(--text-muted);
}
.cite-copy {
        background: none;
        border: 1px solid var(--border-color);
        border-radius: 2px;
        padding: 0.15rem 0.6rem;
        color: var(--accent);
        font-family: var(--font-nav);
        font-size: 0.72rem;
        cursor: pointer;
        letter-spacing: 0.06em;
}
@media (hover: hover) {
	.cite-copy:hover { border-color: var(--accent); }
}
.cite-text {
        margin: 0;
        font-size: 0.95rem;
        line-height: 1.5;
        overflow-wrap: anywhere;
        user-select: all;
}
.cite-text.is-code {
        font-family: var(--font-mono), monospace;
        font-size: 0.85rem;
        white-space: pre-wrap;
        font-variant-numeric: lining-nums;
}
.cite-close {
        display: block;
        margin: 0.75rem 0 0 auto;
        background: none;
        border: none;
        color: var(--text-muted);
        font-family: var(--font-nav);
        font-size: 0.78rem;
        letter-spacing: 0.08em;
        cursor: pointer;
}
@media (hover: hover) {
	.cite-close:hover { color: var(--text-heading); }
}
@media (min-width: 1400px) {
        .essay-actions .action-btn {
                font-size: 0.78rem;
                letter-spacing: 0.05em;
        }
}
