:root {
  font-family: 'Trebuchet MS', system-ui, sans-serif;
  color: #17332f;
  background: #f5f0e5;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #17332f;
  --forest: #143d3a;
  --forest-2: #205a50;
  --sky: #d9edf0;
  --sky-deep: #82b9c2;
  --earth: #8d4933;
  --earth-dark: #5f3125;
  --sand: #e0b26b;
  --paper: #f8f4e9;
  --paper-deep: #eee6d5;
  --line: rgba(23, 51, 47, .18);
  --shadow: 0 18px 50px rgba(25, 45, 40, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; line-height: .98; letter-spacing: -.025em; }
h1 { font-size: clamp(3rem, 7vw, 6.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
h3 { font-size: 1.8rem; }
button, a { outline-offset: 4px; }
:focus-visible { outline: 3px solid #e39b2f; }

.skip-link { position: fixed; top: 8px; left: 8px; padding: .75rem 1rem; background: white; color: var(--ink); border: 0; z-index: 100; transform: translateY(-140%); border-radius: 4px; font-weight: 700; cursor: pointer; }
.skip-link:focus { transform: translateY(0); }
.site-shell { min-height: 100vh; overflow: hidden; }
.site-header { height: 76px; padding: 0 clamp(1rem, 4vw, 4rem); background: var(--forest); color: white; display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem); border-bottom: 1px solid rgba(255,255,255,.15); position: relative; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; white-space: nowrap; }
.brand > span { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.65); border-radius: 50% 50% 45% 55%; display: grid; place-items: center; font: 700 1.3rem 'Fraunces', serif; transform: rotate(-4deg); }
.brand strong { font: 600 1.08rem 'Fraunces', serif; line-height: 1; }
.brand i { display: block; font-size: .83rem; color: var(--sand); font-style: normal; letter-spacing: .08em; text-transform: uppercase; margin-top: .18rem; }
.site-header nav { display: flex; align-items: stretch; align-self: stretch; gap: clamp(.6rem, 1.8vw, 1.7rem); margin-left: auto; }
.site-header nav a { display: flex; gap: .35rem; align-items: center; position: relative; text-decoration: none; color: rgba(255,255,255,.78); font-size: .89rem; font-weight: 600; }
.site-header nav a:hover, .site-header nav a.active { color: white; }
.site-header nav a.active::after { content: ''; position: absolute; bottom: 0; height: 3px; left: 0; right: 0; background: var(--sand); }
.favorite-count { min-width: 1.35rem; height: 1.35rem; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: var(--forest); font-size: .7rem; }
.header-random { display: flex; align-items: center; gap: .45rem; min-height: 42px; padding: 0 1rem; color: var(--forest); background: var(--sand); border: 0; border-radius: 3px; font-size: .84rem; font-weight: 800; cursor: pointer; }
.header-random:hover { background: #edc078; }

.eyebrow { margin-bottom: .65rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .17em; color: var(--earth); }
.home-portal { min-height: calc(100vh - 76px); background: var(--forest); color: white; display: grid; grid-template-columns: minmax(300px, .8fr) minmax(550px, 1.2fr); position: relative; }
.home-portal::before { content: ''; position: absolute; inset: 0; opacity: .22; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(90deg, black, transparent 55%); }
.home-portal__intro { padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 6vw, 7rem); align-self: center; position: relative; }
.home-portal__intro .eyebrow { color: var(--sand); }
.home-portal__intro h1 { max-width: 7ch; margin-bottom: 1.6rem; }
.home-portal__intro > p:not(.eyebrow) { max-width: 42ch; color: rgba(255,255,255,.75); font-size: 1.08rem; line-height: 1.7; }
.cool-button { margin-top: 1.5rem; min-height: 82px; display: flex; align-items: center; gap: 1rem; padding: .9rem 1.4rem; background: var(--sand); color: var(--forest); border: 0; border-radius: 4px; box-shadow: 8px 8px 0 #0b2926; cursor: pointer; text-align: left; transition: transform .2s, box-shadow .2s; }
.cool-button > span:first-child { font-size: 2rem; }
.cool-button span:last-child { font-weight: 800; font-size: 1.04rem; }
.cool-button small { display: block; font-size: .67rem; text-transform: uppercase; letter-spacing: .13em; margin-bottom: .3rem; }
.cool-button:hover { transform: translate(-2px, -2px); box-shadow: 11px 11px 0 #0b2926; }
.world-gates { display: grid; grid-template-columns: 1fr 1fr; min-height: inherit; }
.world-gate { position: relative; padding: clamp(2rem, 4vw, 4rem); display: flex; flex-direction: column; justify-content: flex-end; color: white; text-decoration: none; overflow: hidden; isolation: isolate; transition: flex .3s; }
.world-gate::before, .world-gate::after { content: ''; position: absolute; inset: 0; z-index: -2; transition: transform .5s, filter .5s; }
.world-gate::after { z-index: -1; }
.world-gate--birds::before { background: linear-gradient(165deg, rgba(21,73,75,.1), rgba(8,44,43,.78)), url('../images/annas-hummingbird.jpg') center/cover; }
.world-gate--birds::after { background: linear-gradient(0deg, rgba(6,35,34,.85), transparent 65%); }
.world-gate--dinosaurs::before { background: linear-gradient(165deg, rgba(96,51,29,.1), rgba(45,27,20,.85)), url('../images/tyrannosaurus-rex.jpg') 55% center/cover; }
.world-gate--dinosaurs::after { background: linear-gradient(0deg, rgba(45,25,17,.9), transparent 65%); }
.world-gate:hover::before { transform: scale(1.035); filter: saturate(1.12); }
.world-gate__number { position: absolute; top: 2rem; left: 2rem; border-top: 1px solid rgba(255,255,255,.6); padding-top: .55rem; font-size: .66rem; font-weight: 800; letter-spacing: .15em; }
.world-gate__icon { font-size: 2.5rem; margin-bottom: 1.2rem; color: var(--sand); }
.world-gate strong { font: 600 clamp(2.5rem, 4.5vw, 4.8rem)/.95 'Fraunces', serif; max-width: 6ch; }
.world-gate > span:not(.world-gate__number):not(.world-gate__icon) { margin: 1rem 0 1.3rem; color: rgba(255,255,255,.8); max-width: 25ch; line-height: 1.5; }
.world-gate b { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--sand); }
.mission-strip { background: #102f2d; color: white; min-height: 85px; padding: 1rem clamp(2rem, 6vw, 7rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-top: 1px solid rgba(255,255,255,.1); }
.mission-strip p { margin: 0; color: rgba(255,255,255,.75); }
.mission-strip p span { color: var(--sand); font: 700 1.5rem 'Fraunces', serif; margin-right: .4rem; }
.mission-strip a { text-decoration: none; font-size: .9rem; font-weight: 700; }
.mission-strip a span { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; margin-right: .45rem; color: var(--sand); }
.dispatch { padding: clamp(4rem, 8vw, 8rem) clamp(1.2rem, 6vw, 7rem); background: var(--paper); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.2rem; }
.section-heading h2 { margin-bottom: 0; }
.shuffle-link { border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: .4rem 0; font-weight: 700; color: var(--ink); cursor: pointer; }
.dispatch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.dispatch-card { min-height: 340px; position: relative; padding: 1.5rem; display: flex; align-items: end; color: white; text-decoration: none; isolation: isolate; overflow: hidden; }
.dispatch-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,30,28,.94), transparent 75%); z-index: -1; }
.dispatch-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s; }
.dispatch-card:hover img { transform: scale(1.04); }
.dispatch-card__index { position: absolute; top: 1.5rem; left: 1.5rem; font: 600 1.6rem 'Fraunces', serif; }
.dispatch-card > span:last-child { display: grid; gap: .5rem; line-height: 1.45; color: rgba(255,255,255,.78); }
.dispatch-card small { text-transform: uppercase; letter-spacing: .15em; color: var(--sand); font-weight: 700; }
.dispatch-card strong { color: white; font: 600 2rem 'Fraunces', serif; }

.standard-page, .profile { max-width: 1500px; margin: auto; padding: 0 clamp(1.2rem, 5vw, 5rem) clamp(5rem, 9vw, 9rem); }
.page-intro { min-height: 360px; margin: 0 calc(clamp(1.2rem, 5vw, 5rem) * -1) 3rem; padding: clamp(3rem, 7vw, 6rem) clamp(1.2rem, 5vw, 5rem); display: flex; justify-content: space-between; align-items: end; position: relative; overflow: hidden; }
.page-intro::before { content: ''; position: absolute; inset: 0; opacity: .3; background-image: repeating-linear-gradient(0deg, transparent, transparent 34px, rgba(255,255,255,.09) 35px); }
.page-intro > div { position: relative; max-width: 800px; }
.page-intro h1 { margin-bottom: 1rem; }
.page-intro p:not(.eyebrow) { max-width: 65ch; font-size: 1.08rem; line-height: 1.65; margin-bottom: 0; }
.page-intro--bird { background: var(--sky); }
.page-intro--bird .page-intro__mark { color: var(--sky-deep); }
.page-intro--dinosaur { background: #d9c4a2; }
.page-intro--dinosaur .page-intro__mark { color: #a87b4b; }
.page-intro__mark { font: 600 clamp(9rem, 20vw, 20rem)/.7 'Fraunces', serif; position: relative; transform: rotate(-12deg); opacity: .5; }
.filter-row { margin-top: 2.5rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.filter-row > span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; margin-right: .5rem; }
.filter-row button, .segmented button { min-height: 42px; padding: .55rem 1rem; border: 1px solid var(--line); color: var(--ink); background: transparent; border-radius: 2rem; cursor: pointer; font-weight: 700; }
.filter-row button[aria-pressed=true], .segmented button[aria-pressed=true] { color: white; background: var(--forest); border-color: var(--forest); }
.result-count { margin: 1.5rem 0 1rem; color: #5b6b67; font-size: .85rem; }
.creature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.creature-card { background: #fffdfa; border: 1px solid var(--line); min-width: 0; box-shadow: 0 8px 28px rgba(25,45,40,.06); transition: transform .2s, box-shadow .2s; }
.creature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.creature-card__image-link { display: block; position: relative; overflow: hidden; aspect-ratio: 4/3; }
.creature-card__image-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.creature-card:hover .creature-card__image-link img { transform: scale(1.035); }
.creature-card__signal { position: absolute; left: .8rem; top: .8rem; padding: .4rem .6rem; background: rgba(248,244,233,.92); color: var(--ink); font-size: .64rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.creature-card--dinosaur .creature-card__signal { background: rgba(72,42,29,.9); color: white; }
.creature-card__body { padding: 1.3rem; }
.creature-card__heading { display: flex; align-items: start; justify-content: space-between; gap: .7rem; }
.creature-card__heading h2 { margin-bottom: .8rem; font-size: 1.8rem; }
.creature-card__heading h2 a { text-decoration: none; }
.creature-card__body > p { min-height: 4.5em; color: #5a6864; line-height: 1.5; font-size: .92rem; }
.favorite-button { min-height: 44px; padding: .6rem .95rem; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 2px; font-weight: 800; cursor: pointer; }
.favorite-button--compact { width: 44px; min-width: 44px; padding: 0; border-radius: 50%; font-size: 1.3rem; }
.favorite-button.is-saved { background: #f3d9a6; border-color: #c8892a; }
.card-prompt { min-height: 5.3rem; padding: .9rem; margin: 1rem 0; background: var(--paper-deep); font-size: .83rem; line-height: 1.45; border-left: 3px solid var(--sand); }
.creature-card--dinosaur .card-prompt { border-color: var(--earth); }
.card-prompt span { color: var(--earth); }
.text-link { display: inline-block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .25rem; }

.time-ribbon { display: grid; grid-template-columns: repeat(4, 1fr); margin: -5rem 0 3rem; position: relative; z-index: 2; background: var(--earth-dark); color: white; box-shadow: var(--shadow); }
.time-ribbon > div { min-height: 110px; padding: 1.2rem; border-right: 1px solid rgba(255,255,255,.15); display: grid; align-content: center; }
.time-ribbon span { color: var(--sand); font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.time-ribbon strong { font-family: 'Fraunces', serif; font-size: 1.2rem; margin: .2rem 0; }
.time-ribbon small { color: rgba(255,255,255,.65); }
.time-ribbon .is-active { background: rgba(224,178,107,.11); box-shadow: inset 0 4px var(--sand); }

.profile { padding-top: 2rem; }
.profile__trail { display: flex; justify-content: space-between; margin: 0 0 1.5rem; font-size: .8rem; color: #63706d; }
.profile__trail a { font-weight: 800; text-decoration: none; color: var(--ink); }
.profile-hero { min-height: 590px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); background: var(--forest); color: white; position: relative; }
.profile--dinosaur .profile-hero { background: var(--earth-dark); }
.profile-hero__image { position: relative; min-height: 500px; overflow: hidden; }
.profile-hero__image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 60%, rgba(20,61,58,.8)); pointer-events: none; }
.profile--dinosaur .profile-hero__image::after { background: linear-gradient(90deg, transparent 60%, rgba(95,49,37,.8)); }
.profile-hero__image > img { width: 100%; height: 100%; object-fit: cover; }
.image-credit { position: absolute; bottom: .8rem; left: .8rem; z-index: 1; padding: .4rem .6rem; background: rgba(10,30,28,.78); color: white; font-size: .64rem; text-decoration: none; }
.profile-hero__copy { padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 4vw, 4rem); align-self: center; position: relative; z-index: 1; }
.profile-hero__copy .eyebrow { color: var(--sand); }
.profile-hero__copy h1 { font-size: clamp(3.5rem, 6vw, 6rem); margin-bottom: .65rem; }
.pronunciation { margin-bottom: .4rem; color: rgba(255,255,255,.75); }
.latin-name { font: italic 1rem Georgia, serif; color: var(--sand); }
.profile-intro { margin: 1.5rem 0; font-size: 1.1rem; line-height: 1.65; color: rgba(255,255,255,.82); }
.profile-hero__copy .favorite-button { color: var(--forest); }
.wow-note { position: absolute; left: clamp(1rem, 4vw, 4rem); bottom: -2rem; width: min(450px, 47%); min-height: 140px; padding: 1.5rem 2rem; background: var(--sand); color: var(--forest); z-index: 2; box-shadow: var(--shadow); transform: rotate(-1deg); }
.wow-note span { font-size: .67rem; letter-spacing: .16em; font-weight: 900; }
.wow-note p { margin: .6rem 0 0; font: 600 1.25rem/1.35 'Fraunces', serif; }
.fact-band { margin-top: 4rem; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.fact-band > div { min-height: 150px; padding: 1.3rem; border-right: 1px solid var(--line); display: grid; align-content: start; gap: .45rem; }
.fact-band > div:last-child { border: 0; }
.fact-band > div > span { color: var(--earth); font-size: 1.3rem; }
.fact-band small { text-transform: uppercase; letter-spacing: .12em; font-weight: 800; color: #6e7775; }
.fact-band strong { line-height: 1.35; font-size: .94rem; }
.profile-story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 7rem); padding: clamp(5rem, 9vw, 9rem) 0; }
.profile-story h2 { margin-bottom: 1.3rem; }
.profile-story p { line-height: 1.75; color: #4c5d59; }
.scale-note { margin-top: 2rem; padding: 1.3rem; display: flex; gap: 1rem; align-items: center; background: var(--sky); }
.profile--dinosaur .scale-note { background: #eadbc5; }
.scale-note > span { font-size: 2.5rem; color: var(--earth); }
.scale-note small { display: block; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .12em; }
.field-facts ol { list-style: none; padding: 0; counter-reset: facts; }
.field-facts li { counter-increment: facts; padding: 1.25rem 0 1.25rem 3.5rem; border-top: 1px solid var(--line); position: relative; line-height: 1.6; }
.field-facts li::before { content: '0' counter(facts); position: absolute; left: 0; color: var(--earth); font: 600 1.1rem 'Fraunces', serif; }
.evidence-note { padding: 2rem; background: var(--forest); color: white; display: flex; align-items: center; justify-content: space-between; gap: 3rem; }
.profile--dinosaur .evidence-note { background: var(--earth-dark); }
.evidence-note .eyebrow { color: var(--sand); }
.evidence-note h2 { font-size: 2rem; margin-bottom: .4rem; }
.evidence-note p { margin-bottom: 0; max-width: 48ch; color: rgba(255,255,255,.75); }
.evidence-note a { color: var(--sand); }
.related { padding-top: clamp(5rem, 9vw, 9rem); }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }

.segmented { display: inline-flex; margin-bottom: 2rem; padding: .3rem; background: var(--paper-deep); border-radius: 3rem; }
.segmented button { min-width: 130px; border: 0; }
.compare-selectors { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: end; margin-bottom: 1.5rem; }
.compare-selectors label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.compare-selectors select { display: block; width: 100%; min-height: 54px; margin-top: .5rem; padding: 0 1rem; border: 1px solid var(--line); color: var(--ink); background: white; font-weight: 700; }
.compare-selectors > span { width: 48px; height: 48px; display: grid; place-items: center; background: var(--sand); border-radius: 50%; font: 700 .8rem 'Fraunces', serif; }
.compare-stage { display: grid; grid-template-columns: 1fr 2px 1fr; background: white; border: 1px solid var(--line); }
.compare-axis { background: var(--line); position: relative; }
.compare-axis span { position: sticky; top: 1rem; transform: translateX(-50%); background: var(--forest); color: white; padding: .5rem; writing-mode: vertical-rl; text-transform: uppercase; letter-spacing: .13em; font-size: .6rem; }
.compare-creature { min-width: 0; padding-bottom: 2rem; }
.compare-creature > img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.compare-creature > div, .compare-creature > dl, .compare-creature > a { margin-left: 2rem; margin-right: 2rem; }
.compare-creature > div { margin-top: 1.6rem; }
.compare-creature h2 { margin-bottom: 1rem; }
.compare-creature dl { margin-top: 1rem; margin-bottom: 1.5rem; }
.compare-creature dl > div { padding: 1rem 0; border-top: 1px solid var(--line); }
.compare-creature dt { color: #6b7774; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.compare-creature dd { margin: .4rem 0 0; line-height: 1.5; }
.compare-special { background: var(--paper-deep); margin: .5rem -1rem; padding: 1rem !important; border: 0 !important; }
.compare-special strong { display: block; margin-bottom: .4rem; font-family: 'Fraunces', serif; font-size: 1.15rem; }
.size-visual { margin-top: 3rem; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid var(--line); background: #fffdfa; }
.size-visual > div:first-child { max-width: 600px; margin-bottom: 2rem; }
.size-visual h2 { font-size: 2.2rem; margin-bottom: .7rem; }
.size-visual p { color: #65716e; line-height: 1.5; }
.size-bar-row { display: grid; grid-template-columns: minmax(120px, .4fr) 1fr minmax(170px, .5fr); gap: 1rem; align-items: center; padding: .8rem 0; font-size: .84rem; }
.size-bar-row > span { font-weight: 800; }
.size-bar-row > div { height: 14px; background: var(--paper-deep); }
.size-bar-row i { display: block; height: 100%; background: var(--forest-2); }
.size-bar-row:nth-child(3) i { background: var(--earth); }

.quiz-progress { height: 5px; background: var(--paper-deep); margin-bottom: 1.5rem; }
.quiz-progress span { display: block; height: 100%; background: var(--earth); transition: width .3s; }
.quiz-card { background: white; border: 1px solid var(--line); box-shadow: var(--shadow); }
.quiz-clue { padding: clamp(1.5rem, 4vw, 3.5rem); text-align: center; max-width: 900px; margin: auto; }
.quiz-clue h2 { font-size: clamp(1.7rem, 3.5vw, 3rem); line-height: 1.2; }
.quiz-clue > p { margin-bottom: 0; color: #697571; }
.quiz-options { padding: 0 clamp(1rem, 4vw, 3rem) 3rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.quiz-options button { position: relative; min-height: 220px; padding: 0; border: 3px solid transparent; background: var(--paper-deep); color: var(--ink); cursor: pointer; overflow: hidden; }
.quiz-options button:hover:not(:disabled) { border-color: var(--sand); }
.quiz-options button:disabled { cursor: default; opacity: .65; }
.quiz-options button.is-correct { border-color: #287c65; opacity: 1; }
.quiz-options button.is-try-again { border-color: #c07843; opacity: 1; }
.quiz-options img { width: 100%; height: 180px; object-fit: cover; }
.quiz-options span { display: block; padding: 1rem; font: 600 1.25rem 'Fraunces', serif; }
.quiz-reveal { border-top: 1px solid var(--line); padding: 1.4rem clamp(1.2rem, 4vw, 3rem); display: flex; align-items: center; justify-content: space-between; gap: 2rem; background: #f2e7d5; }
.quiz-reveal.is-correct { background: #dcece4; }
.quiz-reveal > div { display: flex; align-items: center; gap: 1rem; }
.quiz-reveal > div > span { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: white; font-size: 1.5rem; }
.quiz-reveal strong { font-family: 'Fraunces', serif; font-size: 1.2rem; }
.quiz-reveal p { margin: .3rem 0 0; line-height: 1.5; color: #4e5f5b; }
.quiz-reveal button { min-height: 46px; padding: 0 1.2rem; border: 0; background: var(--forest); color: white; font-weight: 800; cursor: pointer; white-space: nowrap; }
.quiz-note { text-align: center; margin: 1.5rem 0; color: #687470; font-size: .82rem; }
.empty-state { max-width: 760px; margin: 3rem auto; padding: clamp(2rem, 8vw, 6rem); text-align: center; background: white; border: 1px solid var(--line); }
.empty-state > span { display: inline-grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; background: var(--paper-deep); font-size: 2.5rem; color: var(--earth); }
.empty-state h1, .empty-state h2 { margin: 1.4rem 0 .8rem; }
.empty-state p { color: #63706d; line-height: 1.6; }
.empty-state > div { display: flex; justify-content: center; gap: .8rem; margin-top: 1.5rem; }
.button-link { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; padding: 0 1.3rem; background: var(--forest); color: white; text-decoration: none; font-weight: 800; }
.button-link--earth { background: var(--earth); }

.site-footer { min-height: 190px; padding: 2rem clamp(1.2rem, 5vw, 5rem); background: #0f2f2c; color: white; display: flex; align-items: center; gap: 3rem; }
.brand--footer { margin-right: auto; }
.site-footer > p { max-width: 520px; margin: 0; color: rgba(255,255,255,.65); font-size: .82rem; line-height: 1.6; }
.site-footer button { min-height: 44px; background: transparent; color: var(--sand); border: 1px solid rgba(255,255,255,.25); padding: 0 1rem; cursor: pointer; white-space: nowrap; }

@media (max-width: 1100px) {
  .site-header { padding-inline: 1rem; gap: 1rem; }
  .brand strong { display: none; }
  .site-header nav { gap: 1rem; }
  .home-portal { grid-template-columns: 1fr; }
  .home-portal__intro { min-height: 520px; }
  .world-gates { min-height: 640px; }
  .creature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-hero { grid-template-columns: 1fr 1fr; }
  .profile-hero__image::after { display: none; }
}

@media (max-width: 780px) {
  h1 { font-size: clamp(2.8rem, 14vw, 4.5rem); }
  .site-header { height: auto; min-height: 72px; flex-wrap: wrap; padding: .65rem 1rem 0; }
  .brand > span { width: 36px; height: 36px; }
  .site-header nav { order: 3; width: calc(100% + 2rem); margin: 0 -1rem; overflow-x: auto; padding: 0 1rem; height: 50px; gap: 1.3rem; scrollbar-width: none; }
  .site-header nav a { flex: 0 0 auto; }
  .header-random { margin-left: auto; }
  .home-portal { min-height: auto; }
  .home-portal__intro { min-height: 530px; padding: 4rem 1.4rem; }
  .home-portal__intro h1 { max-width: 8ch; }
  .world-gates { min-height: auto; grid-template-columns: 1fr; }
  .world-gate { min-height: 460px; padding: 2rem; }
  .world-gate strong { font-size: 3.4rem; }
  .mission-strip { padding: 1.2rem; flex-direction: column; align-items: start; gap: .8rem; }
  .dispatch { padding-inline: 1.2rem; }
  .dispatch-grid { grid-template-columns: 1fr; }
  .dispatch-card { min-height: 300px; }
  .section-heading { align-items: start; flex-direction: column; }
  .page-intro { min-height: 310px; }
  .page-intro__mark { position: absolute; right: -2rem; opacity: .2; }
  .creature-grid { grid-template-columns: 1fr; }
  .creature-card__body > p { min-height: 0; }
  .card-prompt { min-height: 0; }
  .time-ribbon { margin: -4.2rem 0 2rem; grid-template-columns: 1fr 1fr; }
  .time-ribbon > div { min-height: 95px; }
  .profile__trail span { display: none; }
  .profile-hero { grid-template-columns: 1fr; }
  .profile-hero__image { min-height: 360px; }
  .profile-hero__copy { padding-bottom: 6rem; }
  .wow-note { width: calc(100% - 2rem); left: 1rem; bottom: -3rem; }
  .fact-band { margin-top: 5rem; grid-template-columns: 1fr 1fr; }
  .fact-band > div { min-height: 130px; }
  .fact-band > div:nth-child(2) { border-right: 0; }
  .fact-band > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .profile-story { grid-template-columns: 1fr; }
  .evidence-note { align-items: start; flex-direction: column; }
  .related-grid { grid-template-columns: 1fr; }
  .compare-stage { grid-template-columns: 1fr; }
  .compare-axis { display: none; }
  .compare-creature--second { border-top: 8px solid var(--paper-deep); }
  .size-bar-row { grid-template-columns: 1fr; gap: .4rem; }
  .quiz-options { grid-template-columns: 1fr; }
  .quiz-options button { min-height: 120px; display: grid; grid-template-columns: 140px 1fr; align-items: center; text-align: left; }
  .quiz-options img { height: 120px; }
  .quiz-reveal { flex-direction: column; align-items: stretch; }
  .quiz-reveal button { width: 100%; }
  .site-footer { flex-direction: column; align-items: start; gap: 1.5rem; padding-block: 3rem; }
  .brand--footer strong { display: block; }
}

@media (max-width: 480px) {
  .header-random span:last-child { display: none; }
  .header-random { width: 42px; padding: 0; justify-content: center; }
  .world-gate { min-height: 420px; }
  .page-intro { margin-bottom: 2rem; }
  .filter-row { flex-wrap: nowrap; overflow-x: auto; margin-inline: -1.2rem; padding-inline: 1.2rem; }
  .filter-row > * { flex: 0 0 auto; }
  .time-ribbon { margin-inline: -1.2rem; }
  .profile { padding-inline: 0; }
  .profile__trail, .profile-story, .related { margin-inline: 1.2rem; }
  .fact-band { border-inline: 0; }
  .evidence-note { margin-inline: 0; }
  .compare-selectors { grid-template-columns: 1fr; }
  .compare-selectors > span { margin: -.2rem auto; }
  .compare-creature > div, .compare-creature > dl, .compare-creature > a { margin-left: 1.2rem; margin-right: 1.2rem; }
  .quiz-page { padding-inline: 0; }
  .quiz-page .page-intro, .quiz-progress, .quiz-note { margin-inline: 1.2rem; }
  .quiz-options button { grid-template-columns: 110px 1fr; }
  .quiz-options img { height: 110px; }
  .empty-state > div { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
