/* ════════════════════════════════════════════════════════════════════════
   SYNTOPIKON · stylesheet
   ────────────────────────────────────────────────────────────────────────
    1. Fonts (@font-face)
    2. Tokens & base (:root, resets, .wrap, .mono)
    3. Display controls — theme + accent pill
    4. Masthead
    5. Index head + view toggle
    6. List view
    7. Card view
    8. Portraits + invite card
    9. Interview page
   10. Margin ToC (questions)
   11. Responsive — hyphenation + controls strip
   12. Site footer
   13. Prev / next
   14. Get in touch (invite actions)
   15. 404
   16. Lane-mates (thematic neighbours)
   17. Search (Pagefind)
   18. Clickable lane tags
   19. Inline primary nav
   20. Interests page grid
   ════════════════════════════════════════════════════════════════════════ */

/* ── self-hosted fonts · files live in static/fonts/ (see FONTS.md) ── */
@font-face {
    font-family: "Literata";
    src: url("/fonts/literata-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Literata";
    src: url("/fonts/literata-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Literata";
    src: url("/fonts/literata-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("/fonts/source-serif-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("/fonts/source-serif-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("/fonts/source-serif-semibold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Source Serif 4";
    src: url("/fonts/source-serif-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("/fonts/plex-mono-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("/fonts/plex-mono-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* ═══════════════════════════════════════════════════════════════════════
   Syntopikon — design tokens & styles
   One sheet of variables drives everything. Two themes (auto + toggle),
   a user-chosen accent that tints surfaces site-wide.
   Fonts: Source Serif 4 (voice) · Inter (reading) · IBM Plex Mono (meta)
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --bg: #faf9f6;
    --ink: #1a1815;
    --muted: #6c685f;
    --faint: #756e64;
    --tag: #45413a;
    --num: #c3bdb0;
    --line: #e6e2d9;
    --tint-amt: 6%;
    --accent: #2757e6;
    --on-accent: #ffffff;
    --surface: color-mix(in srgb, var(--accent) var(--tint-amt), var(--bg));
    --serif: "Source Serif 4", Georgia, serif;
    --body: "Literata", Georgia, serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
    --measure: 64ch;
    --pad: clamp(1.15rem, 5vw, 3.5rem);
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #17160f;
        --ink: #ece7db;
        --muted: #a29d90;
        --faint: #8f887a;
        --tag: #c3bcaa;
        --num: #524d43;
        --line: #2d2a22;
        --tint-amt: 12%;
    }
}
:root[data-theme="dark"] {
    --bg: #17160f;
    --ink: #ece7db;
    --muted: #a29d90;
    --faint: #8f887a;
    --tag: #c3bcaa;
    --num: #524d43;
    --line: #2d2a22;
    --tint-amt: 12%;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-size: clamp(1rem, 0.5vw + 0.92rem, 1.08rem);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition:
        background 0.25s,
        color 0.25s;
}
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 var(--pad);
}
.wrap-index {
    max-width: 1080px;
    transition: max-width 0.25s ease;
}
html[data-view="cards"] .wrap-index {
    max-width: 1280px;
    --pad: clamp(1.75rem, 5.5vw, 5.5rem);
}
a {
    color: inherit;
}
::selection {
    background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.mono {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--faint);
}
.rule {
    height: 1px;
    background: var(--line);
    border: 0;
    margin: 0;
}
img {
    max-width: 100%;
}

/* display controls (theme + accent) */
.controls {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    display: flex;
    gap: 0.9rem;
    align-items: center;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.controls .seg {
    display: flex;
    gap: 0.15rem;
}
.controls button {
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    border: 0;
    background: none;
    color: var(--faint);
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
}
.controls button[aria-pressed="true"] {
    background: var(--ink);
    color: var(--bg);
}
.controls .sw {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1.5px solid transparent;
    cursor: pointer;
    padding: 0;
}
.controls .sw[aria-pressed="true"] {
    border-color: var(--ink);
}
.controls .div {
    width: 1px;
    height: 16px;
    background: var(--line);
}
.controls .lbl {
    color: var(--faint);
}
.swatches {
    display: flex;
    gap: 0.35rem;
}

/* masthead */
.masthead {
    padding: clamp(3rem, 7vw, 5rem) 0 1.4rem;
}
.wordmark {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.6rem, 7vw, 4.4rem);
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0;
}
.wordmark a {
    text-decoration: none;
    color: inherit;
}
.wordmark b {
    color: var(--accent);
    font-weight: 600;
}
.thesis {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.15rem, 1vw + 1rem, 1.5rem);
    margin: 1.05rem 0 0;
    line-height: 1.4;
}
.mast-meta {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* index head + view toggle */
.index-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 1.5rem 0 0.25rem;
    flex-wrap: wrap;
}
.index-head h2 {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.72rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}
.ih-right {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.count {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--faint);
}
.viewtog {
    display: flex;
    gap: 0.15rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.15rem;
}
.viewtog button {
    font-family: var(--mono);
    font-size: 0.62rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 0;
    background: none;
    color: var(--faint);
    cursor: pointer;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
}
.viewtog button[aria-pressed="true"] {
    background: var(--accent);
    color: var(--on-accent);
}

/* LIST view */
.index-list .entry {
    position: relative;
    display: grid;
    grid-template-columns: 3.4rem 112px 1fr;
    gap: 1.25rem;
    align-items: center;
    padding: 1.5rem 0 1.5rem 0.8rem;
    border-top: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.12s;
}
.index-list .entry:last-child {
    border-bottom: 1px solid var(--line);
}
.entry.hide,
.card.hide {
    display: none;
}
.avatar {
    width: 112px;
    height: 112px;
    border-radius: 26%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 2.45rem;
    color: #fff;
}
.e-num {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1;
    text-align: right;
    color: var(--num);
    font-variant-numeric: lining-nums;
}
.e-mid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.e-name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.4rem, 1.9vw, 1.75rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.e-blurb {
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.e-lanes {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--tag);
    letter-spacing: 0.055em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.e-meta {
    font-family: var(--mono);
    font-size: 0.66rem;
    color: var(--faint);
}
.index-list .entry:hover {
    background: var(--surface);
    margin: 0 calc(-1 * var(--pad));
    padding: 1.5rem var(--pad) 1.5rem calc(var(--pad) + 0.8rem);
    border-radius: 12px;
}
.new {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 3px;
    padding: 0.08rem 0.34rem;
    margin-left: 0.5rem;
    vertical-align: 0.14em;
}

/* CARD view */
.card-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
    padding-top: 0.5rem;
}
.card {
    position: relative;
    display: grid;
    grid-template-columns: 150px 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition:
        transform 0.14s,
        border-color 0.15s;
    height: 186px;
}
.card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.card-pic {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 2.1rem;
    color: #fff;
}
.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.15rem 1.25rem;
    min-width: 0;
}
.card-name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.35rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
.card-role {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.42;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding-top: 0.4rem;
}
.card-lanes {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    color: var(--tag);
}
.card-meta {
    font-family: var(--mono);
    font-weight: 500;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    color: var(--muted);
}
html[data-view="cards"] .index-list {
    display: none;
}
html[data-view="cards"] .card-grid {
    display: grid;
}

/* portraits: fill their frame when a real photo is present */
.avatar img,
.avatar-lg img,
.card-pic img,
.lm-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.invite {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    padding: clamp(1.5rem, 4vw, 2.2rem);
    margin: 2.4rem 0 1rem;
}
.invite h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.6rem;
    margin: 0 0 0.4rem;
}
.invite p {
    margin: 0;
    max-width: 52ch;
    color: var(--muted);
}
footer {
    padding: 2.5rem 0 3.5rem;
}
footer .mono {
    display: block;
    line-height: 1.9;
}

/* interview */
.backlink {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    margin: clamp(1.75rem, 5vw, 2.75rem) 0 0;
    font-family: var(--mono);
    font-size: 0.72rem;
    color: var(--accent);
    text-decoration: none;
}
.backlink:hover {
    text-decoration: underline;
}
.guest-head {
    padding: 1.9rem 0 0;
}
.page .guest-head {
    padding-top: clamp(3rem, 7vw, 5rem);
}
.guest-index {
    margin-bottom: 0.65rem;
}
.guest-name {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 3.7rem);
    line-height: 1;
    letter-spacing: -0.025em;
    margin: 0 0 1.5rem;
    text-wrap: balance;
}
.guest-card {
    display: grid;
    grid-template-columns: 44% 1fr;
    background: var(--surface);
    border-radius: 16px;
    overflow: hidden;
    min-height: clamp(290px, 38vw, 370px);
}
.guest-photo {
    display: flex;
}
.avatar-lg {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(3rem, 7vw, 4rem);
    color: #fff;
}
.links {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    padding: clamp(1.3rem, 2.6vw, 1.75rem);
}
.link-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.6rem 0.8rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    text-decoration: none;
    color: var(--ink);
    transition: 0.15s;
}
.link-card:hover {
    border-color: var(--accent);
}
.link-card svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}
.lc-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}
.lc-label {
    font-family: var(--mono);
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--faint);
}
.lc-handle {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 0.12em;
}
.guest-sub {
    color: var(--muted);
    font-size: clamp(1.02rem, 1.2vw, 1.18rem);
    margin: 1.5rem 0 0;
    max-width: 52ch;
    line-height: 1.45;
}
.guest-divider {
    margin: 2.3rem 0 0;
}

.body-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 15rem;
    gap: clamp(3rem, 7vw, 6rem);
    align-items: start;
}
.qa-col {
    min-width: 0;
}
.qa {
    max-width: var(--measure);
    font-optical-sizing: auto;
    font-variant-numeric: oldstyle-nums;
}
.qa h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 2.6rem 0 0.85rem;
    scroll-margin-top: 1.75rem;
    text-wrap: balance;
    font-variant-numeric: lining-nums;
}
.qa h2:first-child {
    margin-top: 0;
}
.qa p {
    margin: 0 0 1.15rem;
    font-size: clamp(1.06rem, 0.45vw + 0.96rem, 1.18rem);
    line-height: 1.5;
    text-wrap: pretty;
}
.qa ul,
.qa ol {
    padding-left: 1.2rem;
    margin: 0 0 1.05rem;
}
.qa li {
    margin: 0.25rem 0;
}
.qa a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.qa img {
    border-radius: 10px;
    margin: 1.2rem 0;
}
.pullquote {
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    line-height: 1.2;
    margin: 2.7rem 0;
    padding-left: 1.1rem;
    border-left: 2px solid var(--accent);
    max-width: 28ch;
}

.filed {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1.4rem 0 0;
    max-width: var(--measure);
}
.filed .lbl {
    margin-right: 0.2rem;
}
.filed-tag {
    font-family: var(--mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tag);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    text-decoration: none;
    cursor: pointer;
    transition: 0.15s;
}
.filed-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* margin ToC (no numbers) */
.toc-col {
    position: sticky;
    top: 2rem;
    align-self: start;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}
.toc-label {
    margin-bottom: 0.9rem;
}
.toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--line);
}
.toc a {
    display: block;
    padding: 0.42rem 0 0.42rem 0.9rem;
    margin-left: -1px;
    border-left: 2px solid transparent;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
    text-decoration: none;
    transition: 0.18s;
}
.toc a:hover {
    color: var(--ink);
}
.toc a.active {
    color: var(--ink);
    border-left-color: var(--accent);
}

@media (max-width: 900px) {
    .body-layout {
        display: block;
    }
    .toc-col {
        display: none;
    }
    .index-list .entry:hover {
        margin: 0;
        padding: 1.5rem 0 1.5rem 0.8rem;
    }
}
@media (max-width: 620px) {
    .guest-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }
    .guest-photo {
        aspect-ratio: 3/2;
    }
    .links {
        padding: clamp(1.1rem, 4vw, 1.4rem);
    }
    .index-list .entry {
        grid-template-columns: 2.75rem 64px 1fr;
        gap: 1rem;
        padding: 1rem 0 1rem 0.8rem;
    }
    .avatar {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }
    .e-num {
        font-size: 1.5rem;
    }
    .e-name {
        font-size: 1.3rem;
    }
    .e-blurb {
        font-size: 0.9rem;
    }
    .index-list .entry:hover {
        padding: 1rem 0 1rem 0.8rem;
    }
}
/* hyphenate the reading column on narrow screens to even out the rag */
@media (max-width: 700px) {
    .qa p {
        hyphens: auto;
        -webkit-hyphens: auto;
        hyphenate-limit-chars: 7 3 3;
    }
}
/* on tablets and phones the controls become a static top strip */
@media (max-width: 820px) {
    .controls {
        position: static;
        top: auto;
        right: auto;
        margin: 0.85rem auto 0.5rem;
        width: max-content;
        max-width: calc(100% - 1.5rem);
        flex-wrap: wrap;
        justify-content: center;
    }
    .controls .lbl {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}
.skip {
    position: absolute;
    left: 0.5rem;
    top: -3rem;
    z-index: 100;
    background: var(--ink);
    color: var(--bg);
    font-family: var(--mono);
    font-size: 0.75rem;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    transition: top 0.15s;
}
.skip:focus {
    top: 0.5rem;
}
#content:focus {
    outline: none;
}

/* ── site footer (all pages) ── */
.site-footer {
    max-width: 1080px;
    margin: clamp(3rem, 8vw, 6rem) auto 0;
    padding: 2.4rem var(--pad) 3.5rem;
    border-top: 1px solid var(--line);
}
.foot-nav {
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
    margin-bottom: 1.1rem;
}
.foot-nav a {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    text-decoration: none;
}
.foot-nav a:hover {
    color: var(--accent);
}
.foot-note .mono {
    display: block;
    line-height: 1.9;
}

/* ── prev / next ── */
.prevnext {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2.6rem 0 0;
    max-width: var(--measure);
}
.pn {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.3rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.15s,
        transform 0.14s;
}
.pn:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.pn-next {
    text-align: right;
    align-items: flex-end;
}
.pn-dir {
    color: var(--faint);
}
.pn-name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

/* ── get in touch ── */
.invite-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 1.1rem;
}
.btn {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    text-decoration: none;
    background: var(--accent);
    color: var(--on-accent);
    border: 1px solid var(--accent);
    transition: 0.15s;
}
.btn:hover {
    opacity: 0.9;
}
.btn-ghost {
    background: color-mix(in srgb, var(--ink) 9%, var(--bg));
    color: var(--ink);
    border-color: transparent;
}
.btn-ghost:hover {
    background: color-mix(in srgb, var(--ink) 15%, var(--bg));
    color: var(--ink);
    border-color: transparent;
    opacity: 1;
}

/* ── 404 ── */
.notfound {
    max-width: var(--measure);
    padding: clamp(2.5rem, 9vw, 6rem) 0;
}
.nf-code {
    margin-bottom: 1rem;
}
.nf-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    text-wrap: balance;
}
.nf-body {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--muted);
    margin: 0 0 1.5rem;
    max-width: 48ch;
}

@media (max-width: 620px) {
    .prevnext {
        grid-template-columns: 1fr;
    }
    .pn-next {
        text-align: left;
        align-items: flex-start;
    }
}

/* ── more on the same lane (thematic neighbours) ── */
.lane-mates {
    margin: 2.6rem 0 0;
    max-width: var(--measure);
}
.lm-label {
    margin-bottom: 1rem;
}
.lm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.lm-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.15s,
        transform 0.14s;
    min-width: 0;
}
.lm-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.lm-pic {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 24%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
}
.lm-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.lm-name {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.05rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lm-lanes {
    font-family: var(--mono);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tag);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 620px) {
    .lm-grid {
        grid-template-columns: 1fr;
    }
}

/* ── search (Pagefind, home) — themed to the site tokens ── */
.search-wrap {
    margin: 1.5rem 0 0.25rem;
}
#search {
    --pagefind-ui-scale: 0.85;
    --pagefind-ui-primary: var(--accent);
    --pagefind-ui-text: var(--ink);
    --pagefind-ui-background: var(--bg);
    --pagefind-ui-border: var(--line);
    --pagefind-ui-tag: var(--surface);
    --pagefind-ui-border-width: 1px;
    --pagefind-ui-border-radius: 12px;
    --pagefind-ui-font: var(--body);
}
#search .pagefind-ui__search-input {
    font-family: var(--body);
    background: var(--surface);
}
#search .pagefind-ui__search-clear {
    color: var(--faint);
}
#search .pagefind-ui__result-title {
    font-family: var(--serif);
    font-weight: 500;
}
#search .pagefind-ui__result-link {
    color: var(--ink);
    text-decoration: none;
}
#search .pagefind-ui__result-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
#search .pagefind-ui__message {
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--faint);
}

/* ── clickable lane tags (stretched primary link keeps the whole card clickable) ── */
.e-link,
.card-link {
    color: inherit;
    text-decoration: none;
}
.e-link::after,
.card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.lane-link {
    position: relative;
    z-index: 2;
    color: inherit;
    text-decoration: none;
}
.lane-link:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── inline primary nav (serif, under the masthead / top of content pages) ── */
.sitenav {
    font-family: var(--serif);
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.2rem;
    margin-top: 1.4rem;
}
.sitenav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}
.sitenav a:hover {
    color: var(--ink);
}
.sitenav a.here {
    color: var(--ink);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 1px;
}
.sitenav-sep {
    color: color-mix(in srgb, var(--muted) 40%, var(--bg));
}
.wrap > .sitenav {
    margin-top: clamp(1.75rem, 5vw, 2.75rem);
}

/* ── interests page: title + grid of interest tiles ── */
.cat-title {
    font-family: var(--serif);
    font-weight: 600;
    font-size: clamp(2.4rem, 6vw, 3.7rem);
    line-height: 1;
    letter-spacing: -0.025em;
    margin: 0;
}
.cat-grid {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}
.cat-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition:
        border-color 0.15s,
        background 0.12s;
}
.cat-item:hover {
    border-color: var(--accent);
    background: var(--surface);
}
.cat-name {
    font-family: var(--mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tag);
}
.cat-count {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--faint);
    font-variant-numeric: tabular-nums;
}
