/* Common site typography, navigation and release layouts. */
:root {
  --paper: #faf9f5;
  --ink: #182f30;
  --pine: #185349;
  --body: #30413f;
  --muted: #51635e;
  --rule: #cdd5cd;
  --ochre: #985021;
  --forest: #153e39;
  --cream: #fffaf0;
}
[hidden] { display: none !important; }
body { background: var(--paper); }
.wrap,.mastinner { width: min(1216px, 90%); }
.masthead { background: #fffefa; border-bottom: 1px solid var(--rule); }
.mastinner { min-height: 72px; }
.wordmark { gap: .24em; font-size: 1.7rem; }
.wordmark img { width: 35px; height: 35px; margin-right: .28em; }
.mastinner nav { gap: clamp(1.1rem, 3.4vw, 3.4rem); }
.mastinner nav a { color: #2b443f; }
.foot-links { display: flex; gap: 1.25rem; }
.footinner { padding-block: 1.4rem; }
.overline,.topic { font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; line-height: 1.4; }
.overline { color: #865023; }
.cover { background: var(--forest); color: var(--cream); border-bottom: 5px solid #c09b65; }
.cover .hero { grid-template-columns: 1.08fr 1fr; gap: clamp(2rem,5vw,5rem); padding: clamp(2.7rem,4.7vw,4.9rem) 0; }
.cover .overline { color: #f1c18b; }
.cover .overline span { width: 2.2rem; background: #dfb07c; }
.cover h1 { font-size: clamp(3rem,4.8vw,5rem); line-height: 1.03; color: #fffaf1; margin: .95rem 0 1.05rem; }
.cover h1 em { color: #f3c48a; }
.cover .lede { color: #deebe4; font-size: clamp(1rem,1.3vw,1.13rem); max-width: 49ch; }
.cover .hero-actions { margin-top: 1.3rem; gap: 1.25rem; }
.cover .btn { border-radius: 3px; background: #fcf4df; color: #1c3c35; }
.cover .btn:hover { background: white; }
.cover .plain-link { color: #fff9ed; }
.plain-link { text-decoration: underline; text-underline-offset: .26em; text-decoration-color: #a5b3a7; }
.cover .plain-link { text-decoration-color: #a3b4a6; }
.cover a:focus-visible { outline-color: #fbc36e; }
.plate { margin: 0; min-width: 0; position: relative; padding: .55rem; border: 1px solid #7a8e77; background: #e8dfc5; box-shadow: .45rem .45rem 0 #0d302d; }
.plate img { width: 100%; height: auto; aspect-ratio: 1.73; object-fit: cover; display: block; background: #f0e8d5; }
.plate figcaption { font: italic .94rem/1.25 var(--serif); display: flex; gap: .7rem; align-items: center; padding: .7rem .2rem .2rem; color: #394843; }
.plate-rule { width: 1.8rem; border-bottom: 1px solid #806c52; }
.collection,.home-library,.byline,.full-directory { padding-block: clamp(2.1rem,4vw,3.9rem); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1.4rem; }
.section-title h2,.home-library h2,.byline h2 { margin: .25rem 0 0; font-size: clamp(1.95rem,3.25vw,3.05rem); line-height: 1.09; letter-spacing: -.04em; }
.investigations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.15rem; }
.investigation-card { display: flex; flex-direction: column; text-decoration: none; border: 1px solid var(--rule); border-radius: 4px; background: #fffefb; overflow: hidden; }
.investigation-card:hover { border-color: #5e8071; box-shadow: 0 2px 7px #173e3915; }
.investigation-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.preview-plot { border-bottom: 1px solid var(--rule); background:#e7ede5; }
.preview-plot img { height: auto; width: 100%; display: block; }
.card-copy { padding: 1rem 1.25rem 1.3rem; }
.card-copy h3 { font-size: clamp(1.35rem,2.1vw,1.85rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.12; margin: .27rem 0 .55rem; }
.card-copy p { font-size: .98rem; line-height: 1.52; color: #475854; }
.topic { color: #535e54; font-size: .71rem; }
.home-library { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border-block: 1px solid var(--rule); }
.home-library p:not(.overline) { max-width: 43ch; margin: .75rem 0; }
.home-library ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; align-content: start; margin: 0; padding: 0; }
.home-library li a { display: block; padding: .65rem 0; border-bottom: 1px solid var(--rule); font-weight: 600; }
.directory-heading { padding: .65rem 0 2.3rem; }
.directory-heading h1 { font-size: clamp(2.8rem,5vw,4.35rem); line-height: 1.08; letter-spacing: -.045em; margin-bottom: .6rem; }
.directory-heading .crumb { margin-bottom: .8rem; }
.full-directory { padding-bottom: 0; }
#directory-search { display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: center; margin: 1.1rem 0 1.6rem; }
#directory-search label { font-weight: 650; }
#directory-search input { width: min(100%,25rem); border: 1px solid #82958a; padding: .55rem .75rem; border-radius: 3px; }
.directory-group { border-top: 1px solid var(--rule); display: grid; grid-template-columns: 1fr 2.5fr; gap: 1.3rem; padding: 1.35rem 0; }
.directory-group h3 { font-size: 1.6rem; letter-spacing: -.025em; }
.directory-group ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .9rem 1.8rem; }
.directory-group li a { font-weight: 650; }
.directory-group li p { color: var(--muted); font-size: .93rem; line-height: 1.45; margin: .14rem 0; }
.library-course { background: #fffefa; border-top: 3px solid #709381; }
.section-page,.stats-lab,.activity { padding-bottom: 3rem; }
.section-page .prose p { line-height: 1.7; }
:focus-visible { outline: 3px solid #9f4c19; outline-offset: 3px; }
@media (max-width: 860px) {
  .investigations { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cover .hero { gap: 1.5rem; }
  .cover h1 { font-size: clamp(2.5rem,5.7vw,3.65rem); }
  .directory-group { grid-template-columns: 1fr 2.4fr; }
}
@media (max-width: 660px) {
  .mastinner { min-height: auto; display: flex; flex-wrap: wrap; gap: .35rem 1rem; align-items: center; padding-block: .75rem .5rem; }
  .mastinner nav { flex-wrap: wrap; gap: .2rem 1.1rem; justify-content: start; }
  .mastinner nav a { font-size: .9rem; padding: .35rem 0; }
  .wordmark { font-size: 1.5rem; }
  .cover .hero { grid-template-columns: 1fr; gap: 1.6rem; padding-block: 2rem; }
  .cover h1 { font-size: clamp(2.65rem,9vw,3.5rem); }
  .plate { max-width: 32rem; }
  .plate img { aspect-ratio: 2.2; object-fit: contain; }
  .section-title { flex-wrap: wrap; gap: .55rem; }
  .home-library,.directory-group { grid-template-columns: 1fr; gap: .8rem; }
  .directory-group ul { grid-template-columns: 1fr; }
  .byline { padding-block: 2rem; gap: .8rem; }
}
@media (max-width: 510px) {
  .investigations { grid-template-columns: 1fr; }
  .preview-plot img { max-height: 6.5rem; }
}
@media print {
  .cover { background: white; color: black; }
  .cover h1,.cover h1 em,.cover .lede { color: black; }
  .investigation-card { break-inside: avoid; }
}

/* At high text magnification, allow labels and grid children to wrap within
   the viewport. Long book titles and mathematical terms retain their text. */
:where(main, .sitefoot) { overflow-wrap: anywhere; }
.section-title > *, .home-library > *, .directory-group > * { min-inline-size: 0; }
.footinner, .foot-links { flex-wrap: wrap; }
.foot-links { max-inline-size: 100%; }
@media (max-width: 660px) {
  .mastinner > .wordmark { max-inline-size: 100%; flex-wrap: wrap; white-space: normal; }
  .mastinner nav { min-inline-size: 0; max-inline-size: 100%; }
  .mastinner nav a { white-space: normal; }
  .home-library ul { grid-template-columns: repeat(auto-fit, minmax(min(100%, 8rem), 1fr)); }
}
