:root {
    --paper: #f6f5f2;
    --ink: #1c1c1c;
    --muted: #5c5854;
    --line: #d9d5ce;
    --rule: #1c1c1c;
    --accent: #8f1d2c;
    --accent-dark: #6d1521;
    --card: #ffffff;
    --dark: #1c1c1c;
    --dark-text: #f3f1ec;
    --ok: #1d6b45;
    --warn: #8a5a12;
    --serif: "Newsreader", Georgia, "Times New Roman", serif;
    --sans: "Public Sans", "Segoe UI", sans-serif;
    --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.02rem;
    line-height: 1.55;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-dark); }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: 0; }
h1 { font-size: clamp(3.4rem, 8vw, 6.4rem); margin: 0.05em 0 0.12em; font-weight: 500; }
h2 { font-size: clamp(1.7rem, 2.4vw, 2.15rem); margin: 0; font-weight: 500; }
h3 { font-size: 1.28rem; margin: 0 0 0.3em; font-weight: 500; }
p { margin: 0 0 0.75em; }
.wrap { width: min(var(--wrap), calc(100% - 3rem)); margin-inline: auto; }
.narrow { width: min(720px, calc(100% - 3rem)); }
.skip {
    position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: white; padding: 0.45rem 0.7rem;
}
.skip:focus { top: 0.5rem; z-index: 30; }

.site-header {
    position: sticky; top: 0; z-index: 20;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: 0.18em; font-size: 0.82rem; }
.brand-static { margin-bottom: 0.7rem; }
.mark { width: 1.35rem; height: 1.35rem; color: var(--ink); }
.mark circle { fill: currentColor; }
.mark path { fill: none; stroke: currentColor; stroke-width: 1.4; }
.nav-toggle {
    display: none; background: transparent; color: var(--ink); border: 1px solid var(--rule);
    padding: 0.35rem 0.7rem; font: inherit; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0.15rem 1.15rem; }
.site-nav a {
    color: var(--ink); text-decoration: none; font-size: 0.92rem; padding: 0.2rem 0;
    border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.site-nav a.is-active { border-bottom-color: var(--accent); color: var(--ink); }

.masthead { padding: 3.2rem 0 0.4rem; }
.kicker {
    margin: 0 0 0.8rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.lede { max-width: 38rem; font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.35; margin-bottom: 1.2rem; }
.masthead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.4rem; margin: 0 0 2rem; }
.text-link { color: var(--ink); font-weight: 600; text-underline-offset: 0.18em; }
.text-link:hover { color: var(--accent); }
.fact-row {
    display: grid; grid-template-columns: 1.1fr 1.3fr 0.8fr 1.4fr; gap: 1.4rem;
    margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--rule);
}
.fact-row div { margin: 0; }
.fact-row dt { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fact-row dd { margin: 0.28rem 0 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.3; }
.eyebrow { margin: 0 0 0.35rem; color: var(--muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.button, button.button {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--ink); color: white; border: 1px solid var(--ink);
    text-decoration: none; font: inherit; font-size: 0.92rem; font-weight: 600;
    padding: 0.62rem 0.95rem; cursor: pointer;
}
.button:hover, button.button:hover { background: var(--accent); border-color: var(--accent); color: white; }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.button-ghost:hover { background: var(--ink); color: white; }
.text-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

.section { padding: 3.1rem 0 0.2rem; }
.section-alt { background: transparent; }
.section-head {
    display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
    margin-bottom: 1.1rem; padding-top: 0.7rem; border-top: 1px solid var(--rule);
}
.section-head h2 { margin: 0; }
.section-head a { color: var(--ink); font-weight: 600; font-size: 0.92rem; text-underline-offset: 0.18em; }
.page-head { padding: 2.6rem 0 0.2rem; }
.page-head .wrap { padding-bottom: 1.2rem; border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); }
.home-intro { max-width: 44rem; font-size: 1.05rem; }
.intro { max-width: 46rem; color: var(--muted); }
.quiet { color: var(--muted); }
.byline { color: var(--muted); font-size: 0.95rem; }
.card-grid, .people-grid, .highlight-grid { display: grid; gap: 1.25rem 1.5rem; }
.card-grid, .highlight-grid { grid-template-columns: repeat(3, 1fr); }
.people-grid { grid-template-columns: 1fr 1fr; }
.partner-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.partner-row .card {
    background: transparent; border: 0; border-right: 1px solid var(--line);
    padding: 1.15rem 1.1rem 1rem 0; box-shadow: none;
}
.partner-row .card:last-child { border-right: 0; padding-right: 0; }
.partner-row .card:first-child { padding-left: 0; }
.card, .person { background: transparent; border: 0; padding: 0; box-shadow: none; }
.highlight-grid .card, .card-grid .card { padding-top: 0.9rem; border-top: 1px solid var(--line); }
.card h3 a, .card h2 a, .pub-card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover, .card h2 a:hover, .pub-card h3 a:hover { color: var(--accent); }
.person { display: grid; grid-template-columns: 84px 1fr; gap: 0.9rem; align-items: start; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.portrait {
    width: 84px; height: 84px; background: #ece8e2;
    display: grid; place-items: center; overflow: hidden;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.logo-well { height: 64px; display: flex; align-items: center; margin: 0 0 0.75rem; }
.logo-well img, .logo-frame img { max-height: 46px; max-width: 100%; width: auto; object-fit: contain; object-position: left center; }
.logo-frame { display: flex; align-items: center; height: 52px; }
.team-brand { display: flex; align-items: center; gap: 1.1rem; }
.team-brand .logo-frame { height: 58px; }
.team-brand .logo-frame img { max-height: 52px; max-width: 190px; }
.monogram { margin: 0 0 0.55rem; color: var(--ink); font-weight: 650; letter-spacing: 0.08em; font-size: 0.8rem; }
.portrait .monogram { margin: 0; font-family: var(--serif); font-size: 1.25rem; letter-spacing: 0; }
.links { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; padding: 0; margin: 0.45rem 0 0; list-style: none; }
.links a { font-size: 0.88rem; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-top: 1px solid var(--line); padding: 0.85rem 0; }
.project-layout, .split-lists { display: grid; grid-template-columns: 1.45fr 0.75fr; gap: 2.5rem; }
.split-lists { grid-template-columns: 1fr 1fr; }
.facts { border-top: 1px solid var(--rule); padding-top: 0.9rem; }
.facts h2 { margin-bottom: 0.8rem; }
.facts dl { margin: 0; }
.facts div { margin-bottom: 0.9rem; }
.facts div:last-child { margin-bottom: 0; }
.facts dt { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0.15rem 0 0; }
.pub-grid { display: grid; }
.pub-card {
    display: grid; grid-template-columns: 4.2rem 1fr; column-gap: 1.2rem; align-items: start;
    border-top: 1px solid var(--line); padding: 0.95rem 0 0.8rem; background: transparent;
}
.pub-year { margin: 0.15rem 0 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1; color: var(--ink); }
.pub-card h3 { grid-column: 2; font-size: 1.28rem; }
.pub-card .authors { grid-column: 2; margin: 0; color: var(--muted); font-size: 0.92rem; }
.pub-foot { grid-column: 2; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 0.35rem 0 0; }
.pub-foot .quiet { margin: 0; }
.bibliography { padding: 0; margin: 0; list-style: none; }
.bibliography li { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.bibliography strong, .bibliography .pub-title { font-family: var(--serif); }
.pub-link { margin-left: 0.45rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; white-space: nowrap; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.25em; }
.prose img { margin: 1rem 0; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 0.45rem 0.2rem; text-align: left; }
.prose blockquote { margin-left: 0; padding-left: 1rem; border-left: 2px solid var(--accent); color: var(--muted); }
.prose pre { overflow: auto; background: var(--dark); color: var(--dark-text); padding: 0.9rem 1rem; }
.site-footer { background: var(--dark); color: var(--dark-text); padding: 2.4rem 0; margin-top: 3.5rem; }
.site-footer a { color: white; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.7fr 1fr; gap: 1.8rem; }
.footer-nav { display: grid; align-content: start; gap: 0.3rem; }
.footer-nav a { text-decoration: none; font-weight: 600; }
.site-footer .brand { color: white; }

.auth-card { width: min(440px, calc(100% - 2rem)); margin: 2.5rem auto; background: transparent; border-top: 1px solid var(--rule); padding: 1.4rem 0 0; }
.auth-card h1 { font-size: 2.4rem; }
.auth-links { margin-top: 1rem; }
.flash { border-top: 1px solid #b7d8c6; border-bottom: 1px solid #b7d8c6; padding: 0.7rem 0; margin: 1rem auto; }
.flash-error { border-color: #e7b6b0; }
.flash ul { margin: 0; padding-left: 1.1rem; }
.field { display: grid; gap: 0.3rem; margin-bottom: 0.9rem; }
.field span { font-weight: 600; font-size: 0.92rem; }
input, textarea, select {
    width: 100%; font: inherit; color: inherit; background: white;
    border: 1px solid #c9c4bc; padding: 0.55rem 0.6rem;
}
textarea { resize: vertical; }
.error, .count { color: var(--accent-dark); }
.check { display: flex; gap: 0.5rem; align-items: center; margin: 0.4rem 0 1rem; }
.check input { width: auto; }
.form-narrow { width: min(760px, 100%); }
.stack { display: grid; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.editor-layout { display: grid; grid-template-columns: 1.5fr 0.8fr; gap: 1.5rem; align-items: start; }
.editor-side { border-top: 1px solid var(--line); padding-top: 0.8rem; }
.table { width: 100%; border-collapse: collapse; background: transparent; }
.table th, .table td { text-align: left; border-bottom: 1px solid var(--line); padding: 0.7rem 0.4rem; vertical-align: top; }
.row-actions, .inline-form { display: flex; gap: 0.7rem; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; }
.badge { display: inline-block; border-bottom: 1px solid var(--line); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-published { color: var(--ok); border-color: var(--ok); }
.badge-pending, .badge-rejected { color: var(--warn); border-color: var(--warn); }
.filters { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-bottom: 1rem; }
.filters a { color: var(--ink); }
.filters a.is-active { color: var(--accent); }
.pager { display: flex; gap: 1rem; margin-top: 1.2rem; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; border-top: 1px solid var(--rule); padding-top: 0.8rem; }
.stat { font-family: var(--serif); font-size: 2.4rem; margin: 0; }

.dash-body { background: #f3f1ec; }
.dash { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.dash-side { background: var(--dark); color: var(--dark-text); padding: 1.3rem 1rem 2rem; }
.dash-side .brand { color: white; }
.dash-who { color: #d5d0c8; font-size: 0.92rem; }
.dash-who span { color: white; }
.dash-nav { display: grid; gap: 0.15rem; margin: 1rem 0; }
.dash-nav a { color: var(--dark-text); text-decoration: none; padding: 0.38rem 0.2rem; border-bottom: 1px solid transparent; }
.dash-nav a.is-active, .dash-nav a:hover { border-bottom-color: white; }
.dash-main { padding: 1.5rem 1.6rem 3rem; }
.dash-top h1 { font-size: clamp(2rem, 4vw, 2.6rem); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 900px) {
    .fact-row, .project-layout, .split-lists, .card-grid, .people-grid, .footer-grid, .editor-layout, .stat-grid, .dash, .highlight-grid, .partner-row { grid-template-columns: 1fr; }
    .partner-row .card { border-right: 0; border-top: 1px solid var(--line); padding: 1rem 0; }
    .partner-row .card:first-child { border-top: 0; }
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        background: var(--paper); border-bottom: 1px solid var(--rule); padding: 0.4rem 1.5rem 0.8rem;
    }
    .site-nav.is-open { display: grid; gap: 0.35rem; }
    .card-grid, .highlight-grid { grid-template-columns: 1fr; }
    .pub-card, .pub-card h3, .pub-card .authors, .pub-foot { grid-column: auto; }
    .pub-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .wrap { width: min(var(--wrap), calc(100% - 2rem)); }
    .people-grid { grid-template-columns: 1fr; }
    .person { grid-template-columns: 68px 1fr; }
    .portrait { width: 68px; height: 68px; }
    .fact-row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
