:root {
  color-scheme: light;
  --ink: #173038;
  --muted: #4b6067;
  --deep: #183b40;
  --teal: #135f57;
  --accent: #9c422b;
  --paper: #f3f7f5;
  --white: #fff;
  --edge: #cad9d6;
  font: 1rem/1.55 system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--teal); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.15em; }
:focus-visible { outline: 3px solid #efaa4a; outline-offset: 3px; }
h1, h2, h3, p { margin-block: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font: 600 clamp(2.25rem, 5.3vw, 4.15rem)/1.02 Georgia, 'Times New Roman', serif; letter-spacing: -0.025em; }
h2 { font-size: 1.35rem; margin-bottom: 0.8rem; }
h3 { font-size: 1.16rem; }
.skip { position: absolute; top: 1rem; left: 1rem; padding: 0.65rem; background: var(--white); z-index: 2; transform: translateY(-160%); }
.skip:focus { transform: translateY(0); }
.wrap { width: min(100% - 2rem, 73rem); margin-inline: auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--edge); }
.header-inner, .footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.65rem 1.2rem; padding-block: 0.85rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.2rem; font-size: 0.9rem; }
.brand { font-weight: 750; text-decoration: none; }
.hero { background: var(--deep); color: var(--white); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: end; gap: 1.7rem 2.5rem; padding-block: 2.2rem; }
.hero h1 { max-width: 19ch; }
.project-name { font-size: 0.95rem; letter-spacing: 0.035em; font-weight: 700; margin-bottom: 0.75rem; color: #d0e9e5; }
.intro { margin-top: 0.85rem; color: #e4f0ed; max-width: 50ch; }
.hero [data-coolcode-commitments], .hero [data-coolcode-commitments] a { color: #e4f0ed; }
[data-coolcode-commitments] { margin-top: 0.65rem; }
.hero-facts { display: grid; gap: 0.65rem; margin: 0 0 0.3rem; }
.hero-facts div { display: flex; gap: 0.65rem; align-items: baseline; border-bottom: 1px solid #73938f; padding: 0.15rem 0 0.55rem; }
.hero-facts dt { font-size: 0.85rem; color: #e4f0ed; }
.hero-facts dd { order: -1; font-weight: 720; margin: 0; min-width: 5ch; font-variant-numeric: tabular-nums; }
.directory { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 20.5rem); gap: 2rem; padding-block: 1.8rem 3rem; }
form { margin: 0; display: grid; gap: 0.55rem; }
form label { font-size: 0.92rem; font-weight: 650; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; }
input, select, button { font: inherit; border: 1px solid #839f9c; border-radius: 0.4rem; padding: 0.6rem 0.68rem; background: var(--white); color: var(--ink); min-height: 2.75rem; }
input, select { width: 100%; }
select {
  appearance: none;
  padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--teal) 50%), linear-gradient(135deg, var(--teal) 50%, transparent 50%);
  background-size: 5px 5px;
  background-position: right 15px center, right 10px center;
  background-repeat: no-repeat;
}
button { cursor: pointer; background: var(--teal); color: var(--white); font-weight: 650; border-color: var(--teal); }
button:hover { background: var(--deep); }
.quiet { color: var(--teal); background: var(--white); }
.quiet:hover { color: var(--white); }
.form-note, .muted { font-size: 0.88rem; color: var(--muted); }
.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; margin-top: 0.45rem; }
.filters select { display: block; margin-top: 0.25rem; font-size: 0.88rem; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-block: 1.25rem 0.6rem; }
.result-bar p { color: var(--muted); font-size: 0.92rem; }
.result-bar button { padding-block: 0.35rem; min-height: 2.25rem; font-size: 0.84rem; }
.results { display: grid; gap: 0.8rem; }
.record { background: var(--white); border: 1px solid var(--edge); border-radius: 0.45rem; padding: 0.9rem 1rem; overflow-wrap: anywhere; }
.record .place { color: var(--accent); font-weight: 650; font-size: 0.86rem; margin-bottom: 0.28rem; }
.record .subjects { color: var(--muted); font-size: 0.86rem; margin-top: 0.35rem; }
.description, .destination, .survey-detail { margin-top: 0.52rem; }
.collection-link { font-weight: 680; }
.survey-detail { color: var(--muted); font-size: 0.88rem; }
.survey-detail summary { cursor: pointer; padding-block: 0.22rem; }
.survey-detail p + p { margin-top: 0.3rem; }
#more { margin-top: 1rem; }
.empty { padding: 1rem; background: var(--white); border: 1px solid var(--edge); }
.sidebar { border-left: 1px solid var(--edge); padding-left: 1.2rem; }
.sidebar p { margin-bottom: 1.4rem; }
.region-list { padding: 0; list-style: none; margin: 0 0 0.7rem; }
.region-list li { display: flex; gap: 0.5rem; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--edge); padding-block: 0.28rem; }
.region-list span { color: var(--muted); font-variant-numeric: tabular-nums; }
.source-panel { grid-column: 1 / -1; border-top: 1px solid var(--edge); padding-top: 1.35rem; }
.source-panel p + p, .readable p + p, .readable dl + p { margin-top: 0.75rem; }
.related { display: flex; flex-wrap: wrap; gap: 0.45rem 0.8rem; }
.footer { border-top: 1px solid var(--edge); color: var(--muted); font-size: 0.87rem; align-items: baseline; }
.readable { max-width: 55rem; margin-inline: auto; padding-block: 2rem 3rem; }
.readable h1 { max-width: 26ch; font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 0.7rem; }
.readable h2 { margin-top: 1.6rem; }
.readable .results { margin-top: 0.85rem; }
.readable ul { padding-inline-start: 1.2rem; }
.readable li + li { margin-top: 0.35rem; }
.readable .region-list { padding: 0; }
.readable .project-name { color: var(--accent); }
.readable dl { background: var(--white); border: 1px solid var(--edge); padding: 0.85rem 1rem; }
.readable dl div { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2fr); gap: 0.75rem; padding-block: 0.28rem; }
.readable dt { font-weight: 650; }
.readable dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 820px) {
  .directory { grid-template-columns: 1fr; gap: 1.6rem; }
  .sidebar { border-left: 0; border-top: 1px solid var(--edge); padding: 1.2rem 0 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 0.9rem; padding-block: 1.6rem; }
  .hero-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
  .hero-facts div { display: grid; gap: 0.15rem; }
}
@media (max-width: 520px) {
  .filters { grid-template-columns: 1fr; }
  .hero-inner, .directory { padding-top: 1.3rem; }
  .hero-facts dt { font-size: 0.8rem; }
  .readable dl div { grid-template-columns: 1fr; gap: 0.1rem; }
}
.subject-counts { width: 100%; border-collapse: collapse; margin-block: 1.3rem 0.8rem; font-variant-numeric: tabular-nums; }
.subject-counts caption { text-align: left; font-weight: 650; margin-bottom: 0.45rem; }
.subject-counts td, .subject-counts th { text-align: right; padding: 0.42rem; border-bottom: 1px solid var(--edge); }
.subject-counts th:first-child { text-align: left; }
@media (max-width: 520px) {
  .subject-counts { font-size: 0.86rem; table-layout: fixed; overflow-wrap: anywhere; }
  .subject-counts th:first-child { width: 34%; }
  .subject-counts td, .subject-counts th { padding: 0.3rem; }
}
