:root {
  color-scheme: light;
  --paper: #f8f5ee;
  --surface: #fffdf7;
  --ink: #1e332d;
  --green: #214e42;
  --muted: #52625b;
  --rust: #97462f;
  --line: #d5d1c3;
  --sans: "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  font: 100%/1.55 var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: var(--green); text-underline-offset: .21em; text-decoration-thickness: .08em; }
a:hover { color: var(--rust); }
:focus-visible { outline: 3px solid #936118; outline-offset: 4px; }
button, input { font: inherit; }
code { font-size: .92em; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 400; }
.wrap { width: min(73.5rem, calc(100% - clamp(2.25rem, 8vw, 7.5rem))); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 5; padding: .6rem 1rem; color: white; background: var(--green); }
.skip-link:focus { top: .5rem; color: white; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner { display: flex; align-items: center; gap: clamp(1rem, 3vw, 3.25rem); min-height: 4.75rem; }
.brand, .end-brand { display: inline-flex; align-items: center; gap: .68rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand { margin-right: auto; font: 1.62rem/1 var(--serif); letter-spacing: -.045em; }
.brand i { font-weight: 400; }
.brand img, .end-brand img { display: block; }
.primary-nav, .site-end nav { display: flex; align-items: center; gap: clamp(1.05rem, 2.8vw, 2.4rem); }
.primary-nav a, .portfolio-link, .site-end nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  color: var(--muted); text-decoration: none; font-weight: 550; font-size: .92rem;
}
.primary-nav a[aria-current], .primary-nav a:hover, .site-end nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .42em; }
.portfolio-link { gap: .45rem; color: var(--green); }
.portfolio-link::before { content: ""; margin-right: clamp(.45rem, 1.4vw, 1.4rem); width: 1px; height: 1.1rem; background: var(--line); }
.site-end { border-top: 1px solid var(--line); margin-top: 1rem; }
.end-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.65rem; }
.end-brand { font-family: var(--serif); font-size: 1.12rem; }

.eyebrow, .card-label, .plate-label, .plate-id, .plate-key {
  font: 650 .72rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .115em;
}
.eyebrow, .card-label { color: var(--rust); }
.eyebrow { margin: 0 0 .65rem; }
.field-label { display: flex; align-items: center; gap: .7rem; }
.field-label::before { content: ""; width: 1.75rem; height: 2px; background: currentColor; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .75rem;
  min-height: 2.85rem; padding: .65rem 1rem; border: 1px solid #a6b1a3; border-radius: .4rem;
  background: transparent; color: var(--green); font: 600 .96rem/1.3 var(--sans); text-decoration: none; cursor: pointer;
}
.button svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.button:hover { background: #eaece1; color: var(--ink); border-color: var(--green); }
.button-primary { background: var(--green); border-color: var(--green); color: #fffdf5; }
.button-primary:hover { background: #15392f; border-color: #15392f; color: white; }
.button-primary span { font-size: 1.15em; }
.button:disabled { opacity: .55; cursor: default; }
.text-link { display: inline-flex; align-items: baseline; gap: .5em; font-size: .94rem; font-weight: 650; }
.text-link span { text-decoration: none; }

.home-hero { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.12fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(2.6rem, 5.1vw, 4.9rem); }
.hero-copy h1 { margin: .15em 0 .2em; font-size: clamp(3.7rem, 6.4vw, 6rem); line-height: .98; letter-spacing: -.062em; }
.hero-copy h1 em { color: var(--rust); font-weight: 400; }
.hero-lede { max-width: 33rem; margin: 1.1rem 0 1.55rem; font-size: clamp(1.03rem, 1.38vw, 1.22rem); color: var(--muted); line-height: 1.6; }
.specimen-plate {
  position: relative; margin: 0; padding: clamp(1.05rem, 2vw, 1.7rem);
  color: #f5f2dc; border: 1px solid #244d40; border-radius: .8rem;
  background-color: #193e34;
  background-image: radial-gradient(circle, #73977d37 .8px, transparent .9px);
  background-size: 16px 16px;
  box-shadow: 0 12px 27px -20px #1d392f9c;
}
.plate-heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #73937b72; padding-bottom: .7rem; }
.plate-label { color: #e1e6ce; letter-spacing: .14em; }
.plate-id { font-family: Consolas, monospace; font-size: .7rem; color: #d9e1c6; }
.plate-drawing { display: block; width: 100%; height: auto; margin: .6rem 0 .45rem; }
.plate-caption { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #73937b72; padding-top: .65rem; }
.plate-caption > div { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .55rem; line-height: 1.3; font: 1.03rem/1.3 var(--serif); }
.plate-caption > div + div { border-left: 1px solid #73937b72; }
.plate-key { color: #d3dbc1; font-size: .63rem; }

.section-rule { padding-block: clamp(2rem, 3.5vw, 3.1rem); border-block: 1px solid var(--line); background: #f1f0e7; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: .85rem; margin-bottom: 1.4rem; }
.section-head h2, .source-spotlight h2, .chapter h2 { margin: 0; font-size: clamp(2rem, 3.5vw, 3.05rem); letter-spacing: -.047em; line-height: 1.1; }
.section-head .eyebrow { margin-bottom: .35rem; }
.study-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.study-card {
  display: grid; grid-template-columns: clamp(5.2rem, 9.8vw, 9rem) minmax(0,1fr) auto; align-items: center;
  gap: clamp(.7rem, 1.5vw, 1.4rem); padding: clamp(.74rem, 1.3vw, 1.1rem);
  border: 1px solid #c9cdbf; border-radius: .55rem; background: var(--surface); color: var(--ink); text-decoration: none;
}
.study-card:hover { border-color: #7c9280; color: var(--ink); box-shadow: 0 4px 13px #3b4e3d10; }
.study-art { display: grid; place-items: center; aspect-ratio: 1.1; border-radius: .28rem; overflow: hidden; }
.study-art svg, .study-art img { display: block; width: 88%; height: 88%; object-fit: contain; }
.art-grid { background: #e5eadb; color: #2f6451; }
.art-tiles { background: #efe1cd; }
.study-copy h3 { margin: .33rem 0 .26rem; font-size: clamp(1.42rem, 2vw, 1.95rem); letter-spacing: -.04em; line-height: 1.13; }
.study-copy p, .source-spotlight p:not(.eyebrow) { margin: 0; color: var(--muted); }
.study-copy p { font-size: .94rem; line-height: 1.43; }
.card-label { font-size: .64rem; letter-spacing: .1em; }
.card-go { align-self: start; font-size: 1.15rem; color: var(--green); }
.source-spotlight { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,5vw,5.4rem); align-items: center; padding-block: clamp(2.35rem,5vw,4.4rem); }
.source-spotlight h2 { font-size: clamp(1.9rem,3vw,2.6rem); }
.source-spotlight .text-link { margin-top: .6rem; }

.page-intro { max-width: 52rem; padding-block: clamp(2.4rem, 5vw, 4.3rem) 1.8rem; }
.page-intro h1 { margin: .1em 0 .2em; font-size: clamp(2.85rem, 5.6vw, 5rem); letter-spacing: -.055em; line-height: 1.02; }
.page-intro .intro-text { margin: 0; max-width: 45rem; color: var(--muted); font-size: clamp(1.04rem, 1.6vw, 1.25rem); }
.chapter { padding-block: clamp(1.6rem, 3.4vw, 3rem); border-top: 1px solid var(--line); }
.chapter > h2 { margin-bottom: 1rem; }
.chapter :is(section, article)[id], .chapter[id] { scroll-margin-top: 1.25rem; }
.case-finder { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 1rem 0; }
.case-finder label { font-weight: 650; }
.case-finder input { width: min(100%, 20rem); min-height: 2.75rem; border: 1px solid #849586; border-radius: .35rem; padding: .5rem .75rem; background: var(--surface); color: var(--ink); }
.case-finder .button { min-height: 2.75rem; }
.case-list { margin-top: .7rem; }
.case-entry { display: grid; grid-template-columns: minmax(13rem, .72fr) minmax(0, 1.28fr); gap: clamp(.85rem, 3vw, 3rem); padding: 1.45rem 0; border-top: 1px solid var(--line); }
.case-entry h3 { margin: .2rem 0 .45rem; font-size: clamp(1.5rem, 2.7vw, 2.1rem); line-height: 1.15; letter-spacing: -.035em; }
.case-entry p { margin: 0 0 .55rem; max-width: 64ch; }
.case-entry ol { margin: 0; padding-inline-start: 1.25rem; }
.case-entry li { margin-bottom: .3rem; }
.glossary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem; }
.glossary div { border-top: 2px solid #909e89; padding-top: .65rem; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: .3rem 0 0; color: var(--muted); }
.reading-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.reading-stop { padding: 1.15rem; border: 1px solid var(--line); border-radius: .4rem; background: var(--surface); }
.reading-stop h3 { margin: .25rem 0 .4rem; font-size: 1.45rem; line-height: 1.15; }
.reading-stop p { margin: .4rem 0 .6rem; color: var(--muted); }
.resource-links { display: flex; flex-wrap: wrap; gap: .55rem 1.25rem; align-items: baseline; margin: 1rem 0 .2rem; }
.research-table { width: 100%; border-collapse: collapse; margin: 1.1rem 0; font-variant-numeric: tabular-nums; }
.research-table caption { text-align: left; font-weight: 650; margin-bottom: .4rem; }
.research-table th, .research-table td { text-align: left; vertical-align: top; padding: .6rem .75rem; border-bottom: 1px solid var(--line); }
.research-table thead { background: #e7ebdf; }
.measure { max-width: 72ch; }
.quiet { color: var(--muted); }

@media (max-width: 58rem) {
  .study-grid { gap: .7rem; }
  .study-card { grid-template-columns: 4.4rem minmax(0,1fr) auto; }
}
@media (max-width: 48rem) {
  .masthead-inner { flex-wrap: wrap; padding-block: .65rem .24rem; column-gap: .6rem; row-gap: 0; }
  .primary-nav { order: 3; width: 100%; gap: 1.6rem; }
  .primary-nav a { min-height: 2.4rem; }
  .portfolio-link::before { display: none; }
  .home-hero { grid-template-columns: 1fr; gap: 1.7rem; padding-block: 2.1rem; }
  .hero-copy h1 { font-size: clamp(3.7rem, 10vw, 4.8rem); }
  .specimen-plate { width: min(100%, 36rem); justify-self: center; }
  .study-grid, .source-spotlight, .reading-grid { grid-template-columns: 1fr; }
  .study-card { grid-template-columns: clamp(4.5rem, 15vw, 7rem) minmax(0,1fr) auto; }
  .source-spotlight, .glossary { gap: 1rem; }
  .glossary { grid-template-columns: 1fr; }
  .case-entry { grid-template-columns: 1fr; }
  .end-inner { flex-wrap: wrap; }
}
@media (max-width: 31rem) {
  .brand { font-size: 1.45rem; }
  .brand img { width: 2rem; height: 2rem; }
  .section-head { align-items: start; flex-direction: column; }
  .plate-caption > div { font-size: .94rem; gap: .32rem; }
  .study-card { gap: .65rem; }
  .research-table { font-size: .9rem; }
  .research-table th, .research-table td { padding: .45rem .3rem; }
  .site-end nav { flex-wrap: wrap; column-gap: 1.05rem; }
}

.documentary-collection { background: #eef0e7; }
.documentary-collection .section-head { margin-bottom: .5rem; }
.collection-intro { max-width: 47rem; margin: 0 0 1.35rem; color: var(--muted); }
.documentary-collection + .section-rule { border-top: 0; background: var(--paper); }
.art-vanuatu { background: #ede2cc; color: #7a5036; }
.art-kolam { background: #e0e9de; color: #2f604c; }
.documentary-card .study-art svg { width: 92%; height: 92%; }
.primary-nav { flex-wrap: wrap; }
@media (max-width: 33rem) {
  .primary-nav { column-gap: 1rem; }
}
