:root {
    --ink: #17212b;
    --muted: #607080;
    --line: #dce3e8;
    --paper: #ffffff;
    --wash: #f4f7f8;
    --brand: #173f5f;
    --brand-dark: #0d2d47;
    --accent: #c8932e;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--wash);
}

* { box-sizing: border-box; }
body { margin: 0; line-height: 1.6; }
a { color: var(--brand); }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { background: var(--brand-dark); color: white; border-bottom: 4px solid var(--accent); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: white; text-decoration: none; font-size: 1.3rem; font-weight: 750; letter-spacing: .01em; }
.header-note { color: #cbd8e1; font-size: .92rem; }
.hero { padding: 58px 0 24px; max-width: 760px; }
.hero h1, .record-detail h1 { font-family: Georgia, "Times New Roman", serif; line-height: 1.15; margin: .25rem 0 .8rem; }
.hero h1 { font-size: clamp(2.25rem, 6vw, 4rem); }
.hero p:last-child { color: var(--muted); font-size: 1.1rem; }
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 800; }
.search-panel { background: var(--paper); padding: 24px; border: 1px solid var(--line); border-radius: 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; box-shadow: 0 8px 24px rgba(25, 48, 66, .06); }
.search-wide { grid-column: 1 / -1; }
label { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 750; }
input, select { width: 100%; min-height: 44px; border: 1px solid #afbdc7; border-radius: 5px; padding: 9px 11px; background: white; color: var(--ink); font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(23, 63, 95, .18); border-color: var(--brand); }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; }
button, .button { appearance: none; border: 0; background: var(--brand); color: white; padding: 11px 18px; border-radius: 5px; font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--brand-dark); }
.button-secondary { background: #e7edf1; color: var(--brand-dark); }
.results-heading { margin: 36px 0 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); }
.results-heading h2 { margin: 0 0 10px; }
.results-heading p { color: var(--muted); }
.record-list { display: grid; gap: 14px; }
.record-card { background: white; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 6px; padding: 22px 24px; }
.record-card h3 { font-family: Georgia, "Times New Roman", serif; font-size: 1.38rem; line-height: 1.3; margin: 8px 0; }
.record-card h3 a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .83rem; }
.authors { font-weight: 650; margin-bottom: 2px; }
.source { color: var(--muted); font-style: italic; margin-top: 0; }
.read-more { font-weight: 750; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 24px; padding: 36px 0; }
.pagination a { font-weight: 750; }
.empty-state, .notice { background: white; border: 1px solid var(--line); padding: 28px; border-radius: 6px; }
.notice { margin-top: 24px; border-left: 4px solid var(--accent); }
.back-link { margin: 28px 0; }
.record-detail { background: white; border: 1px solid var(--line); border-radius: 8px; padding: clamp(24px, 5vw, 54px); margin-bottom: 48px; }
.record-detail h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.record-byline { color: var(--muted); font-size: 1.08rem; }
.metadata-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 30px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metadata-grid div { min-width: 0; }
.metadata-grid dt { color: var(--muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.metadata-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.record-detail section { max-width: 820px; margin-top: 32px; }
.record-detail section p { white-space: normal; }
.external-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.site-footer { background: #e7edf1; color: var(--muted); margin-top: 48px; padding: 30px 0; }

@media (max-width: 760px) {
    .search-panel, .metadata-grid { grid-template-columns: 1fr; }
    .results-heading { align-items: flex-start; flex-direction: column; gap: 0; }
    .header-note { display: none; }
}
