/* Neutral near-black canvas with distinct editing-module surfaces. */
html[data-theme="dark"]{color-scheme:dark;--surface:#101010;--ink:#d4d4d4;--muted:#9b9a97;--rule:rgba(255,255,255,.13);--link:#b4b4b0;--hover:#2f2f2f;--tooltip:#f7f7f7;--tooltip-ink:#555;--tooltip-strong:#1a1a1a;--outline:#434343;--underline:rgba(255,255,255,.28)}
body{background:var(--surface)}
a{text-decoration-color:var(--underline)}
a:hover{color:var(--ink)}
.column a{color:var(--link)}
.embed-shell{border-color:var(--rule)}
.editing-frame{background:var(--surface)}
.file-row a:hover,.index-link a:hover{background:var(--hover)}
.outline a:after{border-color:var(--outline)}
.outline a:hover:after,.outline a.active:after{border-color:var(--muted)}
.outline a span,.skip{background:var(--surface);border-color:var(--rule)}
.editing-comment{background:var(--tooltip);color:var(--tooltip-ink)}
.editing-comment strong{color:var(--tooltip-strong)}
/* Small editorial notes share one treatment throughout the site. */
.small-note,.editing-hint,.article .image-credit,.article .page-content>.editing-privacy{font-family:inherit;font-size:12px;line-height:1.35;font-style:italic;letter-spacing:.01em;color:var(--muted);padding:0}
.article .page-content>.editing-privacy{margin:0 0 24px}

/* A consistent homepage grid, with deliberate image frames. */
.home main{width:min(800px,calc(100% - 48px))}
.home h1{margin-bottom:64px}
.home .page-content>h2{margin:0 0 24px}
.home .page-content>hr{margin:0 0 40px}
.home .page-content>.empty-block{display:none}
.home .project-module{display:grid;grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);align-items:start;gap:40px;padding:0;margin:0 0 64px;color:inherit;text-decoration:none;cursor:pointer}
.project-module:hover{color:inherit}
.project-module .column{margin:0;min-width:0}
.project-module .column figure{margin:0}
.project-module .project-image{display:block;margin:0;background:none}
.project-module .project-image img{width:100%;height:auto;transition:opacity .15s ease,filter .15s ease}
.project-module.document-project .project-image{padding:0;aspect-ratio:928/624;overflow:hidden}
.project-module.document-project .project-image img{width:100%;height:auto}
.project-copy{opacity:1}
.project-read,.read-link{color:var(--link);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;text-decoration-color:var(--underline)}
.project-read:hover,.read-link:hover{color:var(--ink);text-decoration-color:currentColor}
.project-image:hover img,.project-module:focus-visible .project-image img{opacity:.78;filter:grayscale(.35)}
.project-module:focus-visible{outline:2px solid #888;outline-offset:6px}
.home .page-content>.editing-heading{margin-bottom:24px}
.home .editing-hint{margin:0 0 8px}
.home .editing-more{margin:0 0 64px}
.article blockquote{margin:24px 0;padding:0 0 0 16px;border-left:3px solid var(--ink);font-size:16px;line-height:1.5}
@media(max-width:600px){.home main{width:calc(100% - 48px)}.home h1{margin-bottom:40px}.home .project-module{grid-template-columns:minmax(0,1fr);gap:24px;margin-bottom:40px}.home .page-content>hr{margin-bottom:32px}.home .editing-more{margin-bottom:40px}}
@media(prefers-reduced-motion:reduce){.project-copy,.project-module .project-image img{transition:none}}
.editing-preview{display:block;background:#202020;color:#e9e9e7;border:1px solid var(--rule);border-radius:4px;padding:24px 32px;margin:0 0 16px;text-decoration:none;font:16px/1.75 Georgia,serif;cursor:pointer}
.editing-preview:hover{color:#e9e9e7}
.editing-preview-zone p{margin:0}
.editing-preview .fix{color:#ff6666}
.editing-preview.active .fix{color:#50cf7f}
.editing-preview .ca{border-bottom:2.5px solid #c9aa67}
@media(max-width:600px){.editing-preview{padding:20px;font-size:16px}}

/* Note markers remain small; bubbles reuse the editing-comment palette. */
.footnote{font-style:normal;font-weight:400;line-height:0;vertical-align:super;font-size:.7em;margin:0}
.footnote-ref{font:inherit;line-height:1;color:var(--link);background:none;border:0;padding:0;margin:0;position:relative;cursor:pointer;text-decoration:none}
.footnote-ref:hover,.footnote-ref[aria-expanded="true"]{color:var(--ink)}
.footnote-popover{pointer-events:auto;width:min(390px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;padding:16px 36px 16px 16px;line-height:1.6}
.footnote-popover p{margin:0;white-space:pre-line}
.footnote-popover a{color:#345b78;text-decoration-color:currentColor}
.footnote-close{position:absolute;top:7px;right:7px;font:inherit;line-height:1;background:none;border:0;padding:4px 6px;color:#555;cursor:pointer}
.footnote-ref::before{content:"";position:absolute;inset:-7px -5px}
@media(pointer:coarse){.footnote-ref::before{inset:-10px -8px}}

.article .page-content>.article-subtitle{font-size:20px;font-weight:600;line-height:1.35;margin:0 0 16px}

/* A quiet header above one continuous document. */
html.pdf-is-open{overflow:hidden}
.pdf-dialog{width:min(960px,calc(100vw - 24px));height:calc(100dvh - 24px);max-width:none;max-height:none;margin:auto;padding:0;border:0;border-radius:4px;background:#171717;color:var(--ink);overflow:hidden}
.pdf-dialog::backdrop{background:rgba(0,0,0,.8)}
.pdf-dialog[open]{display:flex;flex-direction:column}
.pdf-toolbar{display:flex;align-items:center;gap:20px;justify-content:space-between;padding:12px 16px;border-bottom:1px solid var(--rule);flex-shrink:0}
.pdf-toolbar h2{font-size:13px;font-weight:500;line-height:1.4;margin:0;min-width:0}
.pdf-actions{display:flex;align-items:center;gap:16px;flex-shrink:0;font-size:12px}
.pdf-dialog .pdf-close{font-family:inherit;font-size:24px;line-height:1;color:inherit;background:transparent;border:0;padding:0 4px;cursor:pointer}
.pdf-dialog .pdf-close:hover{color:#fff}
.pdf-scroll{flex:1;min-height:0;padding:16px;overflow:auto;overscroll-behavior:contain}
.pdf-status{text-align:center;margin:24px auto;max-width:500px;font-size:14px}
.pdf-status[hidden]{display:none}
.pdf-pages{display:flex;flex-direction:column;align-items:center;gap:16px}
.pdf-paper{position:relative;flex:none;background:white;color-scheme:light}
.pdf-paper canvas{display:block}
.pdf-paper .textLayer{font-family:sans-serif}
@media(max-width:600px){.pdf-dialog{width:100vw;height:100dvh;border-radius:0}.pdf-toolbar{gap:8px;align-items:start;flex-direction:column;padding:12px 44px 12px 16px}.pdf-toolbar h2{font-size:12px}.pdf-actions{gap:16px}.pdf-dialog .pdf-close{position:absolute;top:12px;right:12px}.pdf-scroll{padding:16px}.pdf-pages{gap:12px}}
