.nmnh {
    --ink: #f8f6ec;
    --muted: #c1cdc3;
    --gold: #e8d3a4;
    --edge: #54685e;
    width: min(100%, 1260px);
    margin: 1rem auto 3rem;
    color: var(--ink);
    background: #152521;
    border: 1px solid var(--edge);
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
}
.nmnh, .nmnh * { box-sizing: border-box; }
.nmnh a { color: var(--gold); }
.nmnh a:focus-visible, .nmnh button:focus-visible, .nmnh input:focus-visible, .nmnh select:focus-visible {
    outline: 3px solid #fff1bc;
    outline-offset: 3px;
}
.nmnh .nmnh-masthead {
    position: relative;
    padding: clamp(1.4rem, 4vw, 3.25rem);
    background-color: #283d32;
    background-image: linear-gradient(95deg, #172a24 5%, rgba(23,42,36,.93) 37%, rgba(25,42,33,.1) 85%),
        url("photos/nmnhpaleobiology_12307098.jpg");
    background-position: center, right 45%;
    background-size: cover, 78% auto;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--edge);
}
.nmnh .nmnh-masthead h1 {
    color: var(--ink);
    margin: .3rem 0 .65rem;
    max-width: 23ch;
    font: 600 clamp(2.5rem, 4.1vw, 4.35rem)/1.03 Georgia, serif;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 8px #10241b;
}
.nmnh .nmnh-masthead p { color: var(--ink); margin: 0; max-width: 48ch; line-height: 1.5; }
.nmnh .nmnh-masthead .nmnh-kicker, .nmnh .nmnh-dept {
    color: var(--gold);
    font-size: .84rem;
    font-weight: 650;
    letter-spacing: .03em;
}
.nmnh .nmnh-back { display: inline-block; margin-bottom: .8rem; }
.nmnh-main, .nmnh-object { padding: clamp(1.15rem, 3vw, 2.5rem); }
.nmnh h2 { color: var(--ink); margin: 1.1rem 0 .85rem; font-size: clamp(1.4rem, 2vw, 2rem); line-height: 1.2; }
.nmnh-search { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem; padding-bottom: 1.35rem; border-bottom: 1px solid var(--edge); }
.nmnh-search label { color: var(--ink); font-weight: 600; margin: 0; min-width: 0; max-width: 100%; }
.nmnh .nmnh-query { flex: 1 1 265px; }
.nmnh-search input, .nmnh-search select { display: block; width: 100%; height: 2.65rem; margin: .35rem 0 0; padding: .45rem .65rem; background: #faf9f3; color: #19251e; border: 1px solid #b2bdb0; border-radius: 5px; }
.nmnh-search select { max-width: 15rem; }
.nmnh .nmnh-button {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 2.5rem; padding: .45rem .8rem; color: #f3e7cd;
    border: 1px solid #a7956c; background: #293e35; border-radius: 5px;
    font: inherit; font-size: .91rem; font-weight: 650; line-height: 1.25; text-decoration: none; cursor: pointer;
}
.nmnh .nmnh-primary, .nmnh .nmnh-pages [aria-current] { color: #202c23; background: var(--gold); }
.nmnh .nmnh-button:hover { background: #fcf0d6; color: #19291f; }
.nmnh .nmnh-count { color: var(--muted); margin: -.35rem 0 1rem; }
.nmnh-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.65rem, 1.1vw, 1.15rem); }
.nmnh .nmnh-card { display: flex; flex-direction: column; min-width: 0; background: #24362f; border: 1px solid var(--edge); border-radius: 7px; overflow: hidden; }
.nmnh .nmnh-photo { display: block; }
.nmnh .nmnh-card img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #e5e4da; display: block; }
.nmnh-card-body { padding: .9rem; display: flex; flex-direction: column; flex: 1; align-items: flex-start; }
.nmnh .nmnh-card h3 { font-size: 1.15rem; line-height: 1.2; margin: .4rem 0; color: var(--ink); overflow-wrap: anywhere; }
.nmnh .nmnh-card h3 a { color: inherit; text-decoration: none; }
.nmnh .nmnh-card h3 a:hover { text-decoration: underline; }
.nmnh .nmnh-card p { margin: 0 0 1rem; color: var(--muted); font-size: .93rem; }
.nmnh-actions, .nmnh-pages { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.nmnh-card .nmnh-actions { margin-top: auto; }
.nmnh-actions form { margin: 0; }
.nmnh-pages { margin-top: 1.2rem; }
.nmnh-object { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2rem; }
.nmnh-object h2 { margin-top: 0; }
.nmnh-object figure { margin: 0; }
.nmnh-object img { display: block; width: 100%; max-height: 620px; object-fit: contain; background: #e5e4da; }
.nmnh-object figcaption { color: var(--muted); margin-top: .6rem; }
.nmnh-object dl { margin: 1.2rem 0; }
.nmnh-object dt { color: var(--gold); font-weight: 650; }
.nmnh-object dd { color: var(--ink); margin: .15rem 0 .65rem; overflow-wrap: anywhere; }
.nmnh > [role=status] { padding: 1rem; margin: 0; }
@media (max-width: 1150px) { .nmnh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) {
    .nmnh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nmnh-object { grid-template-columns: 1fr; }
    .nmnh .nmnh-masthead { background-image: linear-gradient(90deg, rgba(20,39,31,.95), rgba(23,42,36,.73)), url("photos/nmnhpaleobiology_12307098.jpg"); background-size: cover; }
}
@media (max-width: 440px) {
    .nmnh-grid { grid-template-columns: minmax(0, 1fr); }
    .nmnh-search label { width: 100%; }
    .nmnh-search select { max-width: none; }
}
