/* ============================================================
   AHS Oral History
   ============================================================ */

/* ---------- Design Tokens ---------- */

:root {
    /* Surfaces */
    --paper:       #FBFAF7;
    --paper-alt:   #122C4C;
    --accent-soft: #E8EBE0;

    /* Ink (text on light surfaces) */
    --ink:       #122C4C;
    --ink-soft:  #46556A;

    /* Ink on paper-alt (text on navy surfaces) */
    --paper-alt-ink:       #F2ECDD;
    --paper-alt-ink-soft:  #C7CDB5;
    --paper-alt-brand:     #A9BD86;
    --paper-alt-rule:      #27405C;

    /* Brand */
    --brand:       #566142;
    --brand-fill:  #6E7E55;
    --brand-ink:   #F2ECDD;
    --accent:      #122C4C;

    /* Lines */
    --rule: #DCD9CE;

    /* Typography */
    --font-wordmark: "Cinzel", Georgia, serif;
    --font-display:  "Spectral", Georgia, serif;
    --font-body:     "Inter", system-ui, -apple-system, sans-serif;
    --font-mono:     "JetBrains Mono", ui-monospace, monospace;

    /* Spacing & Geometry */
    --radius: 6px;
    --card-shadow: 0 8px 24px -16px rgba(18,44,76,0.35), 0 1px 0 rgba(18,44,76,0.06);
    --max-width: 1200px;
    --section-pad-x: 48px;
    --section-pad-y: 64px;
}

/* ---------- Reset & Base ---------- */

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--brand);
    text-decoration: none;
}

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

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

/* ---------- Skip Link ---------- */

#skipnav {
    position: absolute;
    left: 0;
    top: -3em;
    padding: 8px 16px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    z-index: 1000;
}

#skipnav:focus {
    top: 0;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 0.5em;
}

h1 {
    font-size: 48px;
    line-height: 1.05;
}

h2 {
    font-size: 28px;
    line-height: 1.2;
}

h3 {
    font-size: 20px;
    line-height: 1.3;
}

.body-large {
    font-size: 17px;
    line-height: 1.6;
}

.body-small {
    font-size: 13px;
    line-height: 1.5;
}

.kicker {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.meta {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
}

/* ---------- Layout Containers ---------- */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--section-pad-x);
    padding-right: var(--section-pad-x);
}

.section {
    padding-top: var(--section-pad-y);
    padding-bottom: var(--section-pad-y);
}

/* ---------- Pre-header Strip ---------- */

.pre-header {
    background: var(--paper-alt);
    border-bottom: 1px solid var(--paper-alt-rule);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--paper-alt-ink-soft);
}

.pre-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}

.pre-header a {
    color: var(--paper-alt-ink-soft);
    text-decoration: none;
}

.pre-header .container > span:last-child a {
    margin-left: 16px;
}

.pre-header a:hover {
    color: var(--paper-alt-ink);
}

.pre-header a.pre-header-highlight {
    color: var(--paper-alt-ink);
    text-decoration: underline;
}

/* ---------- Header ---------- */

.site-header {
    background: var(--paper);
    color: var(--ink);
    border-bottom: 3px solid var(--brand-fill);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
    min-height: 72px;
    position: relative;
}

.site-header .site-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.site-header .site-title a {
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.site-title .header-logo {
    height: 64px;
    width: auto;
}

.site-title .header-divider {
    width: 1px;
    height: 28px;
    background: var(--paper-alt-rule, rgba(255, 255, 255, 0.25));
    flex-shrink: 0;
}

.site-title .wordmark {
    display: flex;
    flex-direction: column;
}

.site-title .wordmark-title-only .wordmark-name {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--ink);
}

.site-title .wordmark-has-subtitle .wordmark-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
}

.site-title .wordmark-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--brand);
}

/* ---------- Navigation ---------- */

#top-nav {
    display: flex;
    align-items: center;
}

#top-nav ul.navigation,
#top-nav-contents {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}

#top-nav ul.navigation li,
#top-nav-contents li {
    position: relative;
}

#top-nav ul.navigation a,
#top-nav-contents a {
    display: block;
    padding: 20px 16px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    color: var(--ink-soft);
    text-decoration: none;
    text-underline-offset: 4px;
    transition: color 0.15s;
}

#top-nav ul.navigation a:hover,
#top-nav-contents a:hover {
    color: var(--ink);
}

#top-nav ul.navigation .active > a,
#top-nav-contents .active a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--brand);
    text-decoration-thickness: 2px;
}

#mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ink);
    padding: 8px;
    cursor: pointer;
}

/* ---------- Subpage Hero ---------- */

.subpage-hero {
    background: var(--paper-alt);
    color: var(--paper-alt-ink);
    padding: 48px 0;
}

.subpage-hero .kicker {
    color: var(--paper-alt-brand);
}

.subpage-hero h1 {
    font-size: 44px;
    line-height: 1.1;
    color: var(--paper-alt-ink);
    margin-bottom: 0.25em;
}

.subpage-hero p {
    color: var(--paper-alt-ink-soft);
    font-size: 17px;
    max-width: 600px;
}

/* Collection intro band (thumbnail + abstract, below hero, above browse) */
.collection-intro-section {
    padding-bottom: 0;
}

.collection-intro {
    display: flex;
    gap: 28px;
    align-items: center;
}

.collection-intro-thumb {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: var(--radius);
    overflow: hidden;
}

.collection-intro-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.collection-intro-body {
    flex: 1;
    min-width: 0;
}

.collection-intro-body p {
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink);
    margin: 0;
    max-width: 60ch;
}

@media (max-width: 640px) {
    .collection-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .collection-intro-thumb {
        width: 120px;
        height: 120px;
    }
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
    background: var(--paper-alt);
    border-bottom: 1px solid var(--paper-alt-rule);
    padding: 12px 0;
    font-family: var(--font-mono);
    font-size: 12px;
}

.breadcrumb a {
    color: var(--paper-alt-ink-soft);
}

.breadcrumb a:hover {
    color: var(--paper-alt-ink);
}

.breadcrumb .separator {
    color: var(--paper-alt-ink-soft);
    margin: 0 8px;
}

.breadcrumb .current {
    color: var(--paper-alt-ink);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* Primary on navy: cream fill, navy text */
.btn-primary {
    background: var(--paper);
    color: var(--accent);
}

.btn-primary:hover {
    background: #F2ECDD;
    color: var(--accent);
}

/* Ghost on navy: sage border, parchment text */
.btn-ghost {
    background: transparent;
    color: var(--paper-alt-ink);
    border: 1px solid var(--brand-fill);
}

.btn-ghost:hover {
    background: rgba(110, 126, 85, 0.15);
    color: var(--paper-alt-ink);
}

/* Ghost button on light backgrounds */
.btn-ghost-light {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--rule);
}

.btn-ghost-light:hover {
    color: var(--ink);
    border-color: var(--ink-soft);
}

/* ---------- Pagination ---------- */

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--ink-soft);
}

.pagination form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pagination .page-input,
.pagination .page-input-top {
    width: 44px;
    padding: 6px 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    text-align: center;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
}

.pagination .page-count {
    color: var(--ink-soft);
}

.pagination .pagination-buttons {
    display: inline-flex;
    gap: 2px;
}

.pagination .button,
.pagination .o-icon-prev,
.pagination .o-icon-next {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink-soft);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.pagination .button:hover:not(.inactive) {
    border-color: var(--ink-soft);
    color: var(--ink);
}

.pagination .button.inactive {
    opacity: 0.35;
    cursor: default;
}

.pagination .row-count {
    color: var(--ink-soft);
    font-size: 12px;
    margin-left: 4px;
}

/* ---------- Browse Controls ---------- */

.browse-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.browse-controls .sorting {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.browse-controls select,
.browse-controls .sorting select {
    padding: 7px 28px 7px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233A4A5E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.browse-controls select:hover,
.browse-controls .sorting select:hover {
    border-color: var(--ink-soft);
}

.browse-controls select:focus-visible,
.browse-controls .sorting select:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.browse-controls .sorting button,
.browse-controls button[type="submit"] {
    padding: 7px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.browse-controls .sorting button:hover,
.browse-controls button[type="submit"]:hover {
    border-color: var(--ink-soft);
    background: var(--accent-soft);
}

/* Advanced search link — style as a small ghost button on light bg */
.browse-controls a.advanced-search,
.browse-controls a.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    background: transparent;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}

.browse-controls a.advanced-search:hover,
.browse-controls a.btn-ghost:hover {
    color: var(--ink);
    border-color: var(--ink-soft);
}

/* ---------- Advanced Search Form ---------- */

#advanced-search h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 24px;
}

#advanced-search .field {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--rule);
    align-items: flex-start;
}

#advanced-search .field-meta {
    flex: 0 0 180px;
    padding-top: 8px;
}

#advanced-search .field-meta label,
#advanced-search .field-meta .label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}

#advanced-search .field-meta .field-description {
    font-size: 13px;
    color: var(--ink-soft);
    margin-top: 4px;
}

#advanced-search .inputs {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

#advanced-search input[type="text"],
#advanced-search input[type="number"],
#advanced-search input[type="search"] {
    width: 100%;
    max-width: 480px;
    padding: 8px 12px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

#advanced-search input[type="text"]:focus,
#advanced-search input[type="search"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(118, 132, 95, 0.2);
}

#advanced-search select {
    padding: 8px 30px 8px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%233A4A5E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#advanced-search select:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

#advanced-search .value {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

#advanced-search .value:last-child {
    margin-bottom: 0;
}

/* Add/remove value buttons */
#advanced-search .add-value,
#advanced-search .remove-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

#advanced-search .add-value:hover {
    border-color: var(--brand);
    color: var(--brand);
}

#advanced-search .remove-value:hover {
    border-color: var(--brand);
    color: var(--brand);
}

/* Item set multiselect */
#advanced-search .item-set-select {
    max-width: 480px;
    width: 100%;
    min-height: 120px;
    padding: 4px;
    font-family: var(--font-body);
    font-size: 14px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
}

/* Collapsible sections */
#advanced-search .collapsible {
    cursor: pointer;
}

#advanced-search .expand {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
}

#advanced-search .expand:hover {
    color: var(--ink);
}

/* Submit button */
#advanced-search input[type="submit"],
#advanced-search button[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    margin-top: 24px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-ink);
    background: var(--brand);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.15s;
}

#advanced-search input[type="submit"]:hover,
#advanced-search button[type="submit"]:hover {
    background: var(--accent);
}

/* Checkbox and radio styling */
#advanced-search input[type="checkbox"],
#advanced-search input[type="radio"] {
    accent-color: var(--brand);
    margin-right: 4px;
}

/* ---------- Search Filters (active filter display) ---------- */

.search-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.search-filters .filter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-soft);
    background: var(--accent-soft);
    border-radius: var(--radius);
}

.search-filters .filter-label {
    font-weight: 600;
}

/* ---------- Cards ---------- */

.card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -12px rgba(18,44,76,0.35), 0 1px 0 rgba(18,44,76,0.06);
}

.card a {
    text-decoration: none;
    color: inherit;
}

.card-thumb {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 20px;
}

.card-body .kicker {
    color: var(--brand);
    margin-bottom: 8px;
}

.card-body h3 {
    margin-bottom: 8px;
}

.card-body p {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
}

/* Item set cards (pale blue background) */
.card-item-set {
    background: var(--accent-soft);
    box-shadow: none;
    border-top: 3px solid var(--brand-fill);
}

.card-item-set:hover {
    box-shadow: var(--card-shadow);
}

/* ---------- Grid Layouts ---------- */

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ---------- Interview Browse Results ---------- */

.result-row {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
}

.result-row:last-child {
    border-bottom: none;
}

.result-thumb {
    width: 80px;
    min-width: 80px;
    max-height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
    aspect-ratio: 1;
}

.result-body h3 {
    margin-bottom: 4px;
}

.result-body .meta {
    margin-bottom: 8px;
}

.result-body p {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0;
}

.tag-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    background: var(--accent-soft);
    color: var(--ink);
    border-radius: 3px;
}

/* ---------- Filter Sidebar ---------- */

.browse-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
}

.filter-sidebar {
    padding-top: 8px;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    margin-bottom: 12px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    padding: 4px 0;
    cursor: pointer;
}

/* ---------- Interview Page ---------- */

.interview-hero {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 32px 0;
}

.interview-portrait {
    width: 180px;
    flex-shrink: 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.interview-portrait img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

.interview-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

/* ---------- Audio Player ---------- */

.audio-player {
    background: var(--paper-alt);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--paper-alt-ink);
    position: sticky;
    top: 16px;
    z-index: 10;
}

.audio-player .controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-player .play-btn {
    background: var(--brand);
    color: var(--brand-ink);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.audio-player .scrubber {
    flex: 1;
    height: 4px;
    background: var(--paper-alt-rule);
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
}

.audio-player .scrubber::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--brand);
    border-radius: 50%;
    cursor: pointer;
}

.audio-player .time-display {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--paper-alt-ink-soft);
    white-space: nowrap;
}

.audio-player .speed-select {
    font-family: var(--font-mono);
    font-size: 12px;
    background: var(--paper-alt-rule);
    color: var(--paper-alt-ink);
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    cursor: pointer;
}

/* ---------- Transcript ---------- */

.transcript {
    margin-top: 24px;
}

.transcript-search {
    position: relative;
    margin-bottom: 20px;
}

.transcript-search input {
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
}

.transcript-search input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(118, 132, 95, 0.2);
}

.transcript-segment {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    padding: 12px 16px;
    margin: 0;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    transition: border-color 0.15s, background 0.15s;
}

.transcript-segment:hover {
    background: var(--accent-soft);
}

.transcript-segment.active {
    border-left-color: var(--brand);
    background: rgba(118, 132, 95, 0.06);
}

.transcript-segment .speaker {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    margin-bottom: 4px;
}

.transcript-segment mark {
    background: rgba(118, 132, 95, 0.2);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

/* ---------- Transcript ---------- */

.transcript-section {
    margin-top: 32px;
}

.transcript-section h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--rule);
}

.transcript-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ink);
}

.transcript-timestamp {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--brand);
    text-decoration: none;
    background: rgba(118, 132, 95, 0.1);
    padding: 1px 5px;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

.transcript-timestamp:hover {
    background: var(--brand);
    color: var(--brand-ink);
}

.transcript-timestamp.active {
    background: var(--brand);
    color: var(--brand-ink);
}

/* ---------- Media Embeds ---------- */

.media-embed {
    margin-bottom: 24px;
}

.media-embed img {
    max-width: 280px;
    height: auto;
    border-radius: var(--radius);
    display: block;
}

.media-embed .media-render a {
    pointer-events: none;
}

.media-player {
    margin-bottom: 24px;
    position: sticky;
    top: 16px;
    z-index: 10;
    background: var(--paper);
    padding: 12px;
    /* border-radius: var(--radius); */
    /* box-shadow: var(--card-shadow); */
}

.media-player audio,
.media-player video {
    width: 100%;
    /* border-radius: var(--radius); */
}

/* ---------- Interview Sidebar ---------- */

.interview-sidebar section {
    margin-bottom: 32px;
}

.interview-sidebar h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-soft);
    margin-bottom: 12px;
}

/* Sidebar map */
.sidebar-map #mapping-map {
    height: 250px !important;
    border-radius: var(--radius);
}

.sidebar-map #mapping-section {
    margin: 0;
    padding: 0;
}

.sidebar-value {
    font-size: 14px;
    color: var(--ink);
    margin: 0;
}

/* ---------- Citation Generator ---------- */

.citation-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 16px;
}

.citation-tab {
    padding: 8px 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: var(--ink-soft);
}

.citation-tab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.citation-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink-soft);
    background: var(--accent-soft);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 8px;
}

/* ---------- Hero Section (Home) ---------- */

.hero {
    background: var(--paper-alt);
    color: var(--paper-alt-ink);
    padding: 80px 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-text .body-large {
    color: var(--paper-alt-ink-soft);
    font-size: 17px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.hero-text .body-large a {
    color: var(--paper-alt-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hero-text .body-large a:hover {
    text-decoration: none;
}

.hero h1 {
    color: var(--paper-alt-ink);
    font-size: 38px;
}

.hero-picks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-pick {
    display: block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--paper-alt-ink);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-pick:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.55);
}

.hero-pick .kicker {
    color: var(--paper-alt-brand);
    margin-bottom: 6px;
}

.hero-pick h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--paper-alt-ink);
}

.hero-pick .listen-link {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--paper-alt-brand);
}

/* ---------- Section Headers ---------- */

.section-header {
    margin-bottom: 32px;
}

.section-header .kicker {
    color: var(--brand);
    margin-bottom: 8px;
}

/* ---------- Recent Items (homepage) ---------- */

.recent-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.recent-item-row {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 16px 20px;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.recent-item-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -12px rgba(18,44,76,0.35), 0 1px 0 rgba(18,44,76,0.06);
}

.recent-item-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
}

.recent-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recent-item-body {
    flex: 1;
    min-width: 0;
}

.recent-item-body .kicker {
    color: var(--brand);
    margin-bottom: 4px;
}

.recent-item-body h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
}

.recent-item-body p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-soft);
    margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
    background: var(--paper-alt);
    color: var(--paper-alt-ink-soft);
    border-top: 4px solid var(--brand-fill);
    padding: 48px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-logo {
    max-width: 220px;
    height: auto;
    margin-bottom: 16px;
}

.footer-col h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--paper-alt-ink);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--paper-alt-ink-soft);
    font-size: 14px;
    padding: 3px 0;
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--paper-alt-ink);
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid var(--paper-alt-rule);
    padding-top: 20px;
    font-size: 12px;
    color: var(--paper-alt-ink-soft);
}

.footer-bottom a {
    color: var(--paper-alt-ink-soft);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--paper-alt-ink);
    text-decoration: underline;
}

/* ---------- About / Editorial ---------- */

.editorial {
}

.editorial h1 {
    font-size: 44px;
    margin-bottom: 0.5em;
}

.editorial h2 {
    margin-top: 2em;
}

.editorial p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--ink-soft);
}

/* ---------- Exhibit Row ---------- */

.exhibit-row {
    display: flex;
    gap: 24px;
    padding: 24px 0;
    border-bottom: 1px solid var(--rule);
}

.exhibit-thumb {
    width: 280px;
    height: 180px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero .container {
        grid-template-columns: 1fr;
    }

    .interview-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad-x: 24px;
        --section-pad-y: 40px;
    }

    h1 { font-size: 28px; }
    .subpage-hero h1 { font-size: 28px; }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .browse-layout {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        border-bottom: 1px solid var(--rule);
        padding-bottom: 24px;
        margin-bottom: 24px;
    }

    /* Header */
    .site-title .header-logo {
        height: 36px;
    }

    /* Hero */
    .hero .container {
        grid-template-columns: 1fr;
    }

    /* Interview */
    .interview-hero {
        flex-direction: column;
    }

    .interview-portrait {
        width: 100px;
    }

    .interview-layout {
        grid-template-columns: 1fr;
    }

    .media-player {
        position: static;
    }

    /* Recent items */
    .recent-items {
        grid-template-columns: 1fr;
    }

    .recent-item-thumb {
        width: 56px;
        height: 56px;
    }

    /* Exhibit */
    .exhibit-row {
        flex-direction: column;
    }

    .exhibit-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Nav */
    #top-nav ul.navigation,
    #top-nav-contents {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 3px solid var(--brand-fill);
        box-shadow: var(--card-shadow);
        padding: 8px 0;
        z-index: 100;
    }

    #top-nav ul.navigation.open,
    #top-nav-contents.open {
        display: flex;
    }

    #top-nav ul.navigation a,
    #top-nav-contents a {
        padding: 12px var(--section-pad-x);
    }

    #mobile-nav-toggle {
        display: block;
    }

    .pre-header .container {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .pre-header .container > span:last-child a {
        margin-left: 8px;
    }
}

/* ---------- Child Page Cards ---------- */

.child-pages {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.child-page-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 20px;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s;
}

.child-page-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -12px rgba(18,44,76,0.35), 0 1px 0 rgba(18,44,76,0.06);
}

.child-page-thumb {
    flex-shrink: 0;
    width: 180px;
    border-radius: var(--radius);
    overflow: hidden;
}

.child-page-thumb img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.child-page-body {
    flex: 1;
    min-width: 0;
}

.child-page-body h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--ink);
}

.child-page-body p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin: 0 0 12px;
}

.child-page-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
}

@media (max-width: 600px) {
    .child-page-card {
        flex-direction: column;
    }

    .child-page-thumb {
        width: 100%;
    }
}

/* ---------- Browse Preview Block ---------- */

.block-browsePreview .resource-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.block-browsePreview .resource-list li.resource {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 20px;
    transition: transform 0.15s, box-shadow 0.15s;
}

.block-browsePreview .resource-list li.resource:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -12px rgba(18,44,76,0.35), 0 1px 0 rgba(18,44,76,0.06);
}

.block-browsePreview .resource-list li.resource img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    float: left;
    margin-right: 16px;
    aspect-ratio: auto;
}

.block-browsePreview .resource-list .resource-link {
    text-decoration: none;
    color: var(--ink);
}

.block-browsePreview .resource-list .resource-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.block-browsePreview .resource-list .description {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.block-browsePreview .preview-block > a {
    display: inline-block;
    margin-top: 20px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--brand);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.block-browsePreview .preview-block > a:hover {
    border-bottom-color: var(--brand);
}

/* ---------- Faceted Browse ---------- */

.faceted-browse-page #container {
    margin: 0;
    gap: 32px;
}

.faceted-browse-page .subpage-hero {
    margin-bottom: 0;
}

/* Sidebar */
.faceted-browse-page #section-sidebar {
    padding: 24px;
    background: var(--accent-soft);
    border-radius: var(--radius);
    width: 280px;
    flex-shrink: 0;
}

.faceted-browse-page #section-content {
    flex: 1;
    width: auto;
    padding-left: 0;
}

/* Category links */
.faceted-browse-page #categories li {
    border-bottom: 1px solid var(--rule);
    margin-bottom: 0;
    padding: 0;
}

.faceted-browse-page #categories a {
    display: block;
    padding: 10px 0;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.faceted-browse-page #categories a:hover {
    color: var(--brand);
}

/* Facet fieldsets */
.faceted-browse-page .facet legend {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.faceted-browse-page .facet label {
    font-size: 14px;
    color: var(--ink-soft);
    padding: 4px 0;
    cursor: pointer;
    align-items: center;
}

.faceted-browse-page .facet label:hover {
    color: var(--ink);
}

.faceted-browse-page .facet label input {
    accent-color: var(--brand);
}

/* Results table */
.faceted-browse-page #section-content table {
    border-collapse: collapse;
}

.faceted-browse-page #section-content table th {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    padding: 8px 12px;
    border-bottom: 2px solid var(--rule);
    text-align: left;
}

.faceted-browse-page #section-content table td {
    padding: 12px;
    border-bottom: 1px solid var(--rule);
    font-size: 14px;
    color: var(--ink);
}

.faceted-browse-page #section-content table tr:hover td {
    background: var(--accent-soft);
}

.faceted-browse-page .resource-link {
    text-decoration: none;
    color: var(--ink);
}

.faceted-browse-page .resource-link:hover .resource-name {
    color: var(--brand);
}

.faceted-browse-page .resource-name {
    font-family: var(--font-display);
    font-weight: 600;
    transition: color 0.15s;
}

.faceted-browse-page .resource-link img {
    border-radius: 4px;
}

/* Results as list */
.faceted-browse-page .faceted-results ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faceted-browse-page .faceted-results li {
    padding: 16px;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}

/* Browse controls (sort, pagination) */
.faceted-browse-page .browse-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.faceted-browse-page .browse-controls select {
    font-family: var(--font-body);
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
}

.faceted-browse-page .pagination a,
.faceted-browse-page .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius);
    font-size: 13px;
    text-decoration: none;
    color: var(--ink);
}

.faceted-browse-page .pagination a:hover {
    background: var(--accent-soft);
}

.faceted-browse-page .pagination .active {
    background: var(--brand);
    color: var(--brand-ink);
}

/* Permalink button */
.faceted-browse-page .button.permalink {
    font-size: 13px;
    padding: 6px 12px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
}

.faceted-browse-page .button.permalink:hover {
    background: var(--accent-soft);
}

/* Mobile sidebar modal */
.faceted-browse-page #section-sidebar-modal-toggle {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
    margin-bottom: 16px;
}

@media (max-width: 39.9988em) {
    .faceted-browse-page #section-sidebar.open {
        background-color: var(--paper);
        padding: 24px;
    }
}

/* ---------- Mapping browse page ---------- */

.mapping-browse-page .subpage-hero {
    margin-bottom: 0;
}

/* Map fills the editorial container instead of the module's 80% / centered default.
   Height is set inline on the element (see browse.phtml) so the map always has a
   height even if this stylesheet is cached/stale — Leaflet needs a sized container. */
.mapping-browse-map {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* Search-the-map form below the map */
.mapping-browse-page #advanced-search {
    margin-top: 32px;
}

.mapping-browse-page #advanced-search button[type="submit"] {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    background: var(--brand);
    color: var(--brand-ink);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 16px;
}

.mapping-browse-page #advanced-search button[type="submit"]:hover {
    filter: brightness(0.95);
}
