@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;700;800&display=swap");

* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: #fafaf5;
    color: #233b2c;
    font:
        15px/1.6 "DM Sans",
        sans-serif;
}
a {
    color: inherit;
    text-underline-offset: 4px;
}
button,
input,
select {
    font: inherit;
}
button {
    cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
    outline: 3px solid #a57423;
    outline-offset: 4px;
}
.nav {
    max-width: 1240px;
    margin: auto;
    padding: 24px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #d9dfd0;
    gap: 24px;
}
.brand {
    font:
        800 24px Manrope,
        sans-serif;
    text-decoration: none;
    letter-spacing: -1px;
}
.brand span {
    color: #758554;
}
.navlinks {
    display: flex;
    gap: 26px;
    font-size: 13px;
    flex-wrap: wrap;
}
.navlinks a {
    text-decoration: none;
}
.navlinks [aria-current] {
    border-bottom: 2px solid #567345;
}
main {
    max-width: 1240px;
    margin: auto;
    padding: 46px 40px 60px;
}
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
    font-weight: 700;
    color: #5b7055;
    margin: 0 0 12px;
}
h1 {
    font:
        400 clamp(38px, 5vw, 58px)/1.12 Georgia,
        serif;
    letter-spacing: -1.5px;
    margin: 0 0 20px;
}
.intro {
    max-width: 64ch;
    color: #596657;
    margin: 0 0 32px;
    font-size: 16px;
}
.searchbox {
    background: #edf1e6;
    padding: 24px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr 225px;
    gap: 20px;
    margin-bottom: 36px;
}
label {
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}
input,
select {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: #233b2c;
    background: #fff;
    border: 1px solid #becbb5;
    border-radius: 6px;
}
input::placeholder {
    color: #657160;
}
.layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 44px;
}
.collections {
    position: sticky;
    top: 20px;
    align-self: start;
}
.collections h2 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 16px;
}
.collections button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 14px 12px;
    margin: 0 0 5px;
    background: transparent;
    color: #405439;
    font-size: 13px;
}
.collections button[aria-pressed="true"] {
    background: #2f573c;
    color: #fff;
}
.collections button span {
    font-variant-numeric: tabular-nums;
    opacity: 0.8;
}
.sidebar-note {
    border-top: 1px solid #d9dfd0;
    margin: 24px 0 0;
    padding-top: 18px;
    font-size: 12px;
    color: #657160;
}
.results-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 16px;
    border-bottom: 1px solid #cbd5c2;
}
.results-heading h2 {
    font:
        400 28px Georgia,
        serif;
    margin: 0;
}
.results-heading p {
    font-size: 12px;
    color: #5d6c56;
    margin: 0;
}
.reference {
    padding: 24px 0;
    border-bottom: 1px solid #d9dfd0;
}
.ref-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 11px;
    letter-spacing: 0.3px;
    color: #63725c;
}
.status {
    background: #edf1e6;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.status.historical {
    background: #f4e5ca;
    color: #715022;
}
.reference h3 {
    font-size: 18px;
    line-height: 1.5;
    font-weight: 500;
    margin: 12px 0 8px;
    overflow-wrap: anywhere;
}
.reference h3 a {
    text-decoration: none;
}
.reference h3 a:hover {
    text-decoration: underline;
}
.reference h3 span {
    font-size: 14px;
    color: #758554;
}
.metadata,
.no-link {
    font-size: 12px;
    color: #64705f;
    margin: 7px 0;
}
.note {
    font-size: 14px;
    line-height: 1.7;
    color: #52634a;
    margin: 12px 0;
}
.reference details {
    font-size: 12px;
    color: #657160;
    margin-top: 12px;
}
.reference summary {
    cursor: pointer;
    width: fit-content;
}
.reference details p {
    background: #f0f3e9;
    padding: 12px;
    overflow-wrap: anywhere;
}
.empty {
    padding: 40px 0;
}
.reset {
    border: 1px solid #b8c5ad;
    padding: 10px 18px;
    background: #fff;
    border-radius: 5px;
    color: #233b2c;
}
.footer {
    border-top: 1px solid #d9dfd0;
    padding: 26px 5%;
    font-size: 12px;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}
.footer p {
    margin: 0;
    max-width: 80ch;
}
[hidden] {
    display: none !important;
}

@media (max-width: 760px) {
    .nav {
        padding: 20px;
    }
    .navlinks {
        gap: 12px;
    }
    .brand {
        font-size: 21px;
    }
    main {
        padding: 30px 20px;
    }
    .searchbox {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 16px;
    }
    .layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .collections {
        position: static;
    }
    .collection-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 5px;
    }
    .collections button {
        height: 100%;
        min-height: 48px;
    }
    .sidebar-note {
        margin-top: 15px;
        padding-top: 12px;
    }
    .reference h3 {
        font-size: 17px;
    }
    .footer {
        flex-direction: column;
    }
    .reference {
        padding: 22px 0;
    }
}

.nav {
    padding: 15px 28px;
}
main {
    max-width: 1100px;
    padding: 26px 28px 36px;
}
h1 {
    font-size: 34px;
    letter-spacing: -0.6px;
    margin-bottom: 10px;
}
.intro {
    font-size: 14px;
    max-width: none;
    margin-bottom: 18px;
}
.searchbox {
    background: none;
    padding: 0;
    gap: 16px;
    margin-bottom: 15px;
    grid-template-columns: 1fr 200px;
}
input,
select {
    min-height: 40px;
    padding: 8px 12px;
}
.layout {
    display: block;
}
.collections {
    position: static;
    margin-bottom: 18px;
}
.collections h2,
.sidebar-note {
    display: none;
}
.collection-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.collections button {
    width: auto;
    padding: 8px 12px;
    margin: 0;
    font-size: 12px;
}
.collections button span {
    margin-left: 5px;
}
.results-heading {
    padding-bottom: 10px;
}
.results-heading h2 {
    font-size: 22px;
}
.citation-group h3 {
    font:
        400 23px Georgia,
        serif;
    margin: 22px 0 12px;
}
.citation-group ol {
    padding-left: 28px;
    margin: 0;
}
.reference {
    display: list-item;
    padding: 0 0 0 5px;
    border: 0;
    margin-bottom: 9px;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.reference a {
    color: #2f573c;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}
.citation-meta {
    color: #586151;
    font-size: 13px;
}
.reference::marker {
    color: #586151;
    font-variant-numeric: tabular-nums;
}
.footer {
    padding: 18px 28px;
}

@media (max-width: 760px) {
    main {
        padding: 22px 18px;
    }
    h1 {
        font-size: 30px;
    }
    .nav {
        padding: 14px 18px;
    }
    .searchbox {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .collection-buttons {
        display: flex;
    }
    .collections button {
        min-height: 42px;
    }
    .reference {
        font-size: 14px;
    }
    .citation-group ol {
        padding-left: 24px;
    }
}

.error-notice {
    padding: 16px;
    border: 1px solid #cbd5c2;
}
