:root {
  --pilot-cream: #f0eadf;
  --pilot-accent: #b99a61;
  --pilot-green: #6f796d;
  --pilot-sage: #afb5a6;
  --pilot-blue: #182c3a;
}

.pilot-page {
  overflow-x: hidden;
  background: var(--pilot-cream);
}

.header-cta {
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(243, 236, 220, 0.6);
}

.pilot-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  min-height: 100svh;
  /* Room for the absolute header above and the private note below, so the
     copy sits in flow and a short window grows the hero instead of
     cutting the words off. */
  padding: 7.5rem 0 5rem;
  overflow: hidden;
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

.pilot-hero-image,
.pilot-hero-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.pilot-hero-image {
  object-fit: cover;
  object-position: 61% center;
  filter: saturate(0.74) brightness(0.73);
  transform: scale(1.015);
}

.pilot-hero-wash {
  background:
    linear-gradient(90deg, rgba(8, 20, 29, 0.9) 0%, rgba(8, 20, 29, 0.55) 48%, rgba(8, 20, 29, 0.08) 85%),
    linear-gradient(180deg, rgba(8, 20, 29, 0.38), transparent 45%, rgba(8, 20, 29, 0.7));
}

.pilot-hero-copy {
  position: relative;
  z-index: 2;
  margin-left: max(1.5rem, calc((100vw - 78rem) / 2));
  width: min(43rem, calc(100vw - 3rem));
}

.pilot-eyebrow,
.pilot-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.pilot-hero h1 {
  margin: 1.2rem 0 1.5rem;
  /* Wide but short windows cap the type by height, not just width. */
  font-size: min(clamp(4.5rem, 8vw, 8.5rem), 13svh);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.82;
}

.pilot-hero h1 em {
  color: #d8c79e;
  font-weight: 400;
}

.pilot-deck {
  max-width: 34rem;
  margin: 0;
  color: rgba(243, 236, 220, 0.88);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.45;
}

.pilot-enter {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 2.3rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(243, 236, 220, 0.48);
  font-family: var(--sans);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.pilot-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pilot-enter--primary {
  border-color: var(--pilot-accent);
  background: var(--pilot-accent);
  color: var(--pilot-blue);
  font-weight: 700;
}

.pilot-enter--send {
  border-color: rgba(243, 236, 220, 0.85);
  font-weight: 700;
}

.pilot-enter--send[hidden] {
  display: none;
}

.pilot-hero-note {
  position: absolute;
  z-index: 2;
  right: max(1.5rem, calc((100vw - 78rem) / 2));
  bottom: 2rem;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contribution {
  display: grid;
  width: var(--page);
  grid-template-columns: minmax(0, 0.55fr) minmax(28rem, 1.35fr) minmax(0, 0.55fr);
  gap: clamp(0.9rem, 2vw, 1.75rem);
  align-items: start;
  padding: 8rem 0;
}

.contribution-heading {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1.3fr);
  gap: 3rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

.contribution-heading .pilot-label {
  grid-column: 1;
}

.contribution-heading h2 {
  grid-column: 1;
}

.contribution-heading h2 {
  margin: 0;
  font-size: clamp(3.4rem, 6vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.contribution-heading > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 30rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.7;
}

.contribution-card {
  grid-column: 2;
}

.contribution-photo-rail {
  display: grid;
  gap: 1.25rem;
  align-self: center;
}

.contribution-photo-rail--left {
  grid-column: 1;
}

.contribution-photo-rail--right {
  grid-column: 3;
}

.contribution-photo-rail figure {
  margin: 0;
}

.contribution-photo-rail img {
  width: 100%;
  height: auto;
  border: 0.35rem solid #f7f2e8;
  box-shadow: 0 0.8rem 1.8rem rgba(23, 33, 42, 0.14);
}

.contribution-photo-rail figcaption {
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-style: italic;
}

.contribution-card {
  overflow: hidden;
  border: 1px solid rgba(23, 33, 42, 0.18);
  background: #f9f4e9;
  box-shadow: 0 1.5rem 4rem rgba(23, 33, 42, 0.12);
}

.contribution-privacy {
  padding: 1.4rem 1.6rem;
  background: var(--pilot-sage);
}

.contribution-privacy strong,
.memory-field > span,
.memory-media legend,
.draft-status,
.text-button,
.memory-review-button,
.memory-secondary-button,
.memory-share-button,
.share-explanation,
.share-status,
.memory-error {
  font-family: var(--sans);
}

.contribution-privacy strong {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contribution-privacy p {
  max-width: 42rem;
  margin: 0.5rem 0 0;
  line-height: 1.55;
}

.memory-form,
.memory-review {
  padding: clamp(1.4rem, 4vw, 3rem);
}

.memory-form[hidden],
.memory-review[hidden] {
  display: none;
}

.memory-field {
  display: block;
  margin-bottom: 2rem;
}

.memory-field > span,
.memory-media legend {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.memory-field input,
.memory-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.memory-field input {
  padding: 0.85rem 0;
  font-size: 1.25rem;
}

.memory-field textarea {
  min-height: 13rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
  font-size: 1.15rem;
  line-height: 1.65;
  resize: vertical;
}

.memory-field input:focus,
.memory-field textarea:focus {
  border-color: var(--pilot-blue);
  box-shadow: 0 0 0 2px rgba(28, 49, 65, 0.12);
}

.memory-field small {
  display: block;
  margin-top: 0.45rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.65rem;
  text-align: right;
}

.memory-media {
  margin: 0;
  padding: 0;
  border: 0;
}

.memory-media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.media-choice {
  display: flex;
  min-height: 12rem;
  flex-direction: column;
  padding: 1.2rem;
  border: 1px solid var(--line);
  cursor: pointer;
}

.media-choice:hover {
  background: rgba(185, 191, 170, 0.25);
}

.media-choice-number {
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.13em;
}

.media-choice strong {
  margin-top: 1.5rem;
  font-size: 1.65rem;
  font-weight: 400;
}

.media-choice > span:not(.media-choice-number) {
  margin-top: 0.4rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.media-choice input {
  width: 100%;
  margin-top: auto;
  padding-top: 1rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.65rem;
}

.media-choice input::file-selector-button {
  margin-right: 0.65rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.media-preview {
  margin-top: 1rem;
}

.media-preview:empty {
  display: none;
}

.media-preview-item {
  padding: 1rem;
  background: rgba(185, 191, 170, 0.22);
}

.media-preview-item p {
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere;
}

.media-preview-item audio {
  width: 100%;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.photo-preview-grid figure {
  min-width: 0;
  margin: 0;
}

.photo-preview-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo-preview-grid figcaption {
  overflow: hidden;
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draft-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0;
}

.draft-status,
.share-status,
.memory-error {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.72rem;
  line-height: 1.45;
}

.text-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 0.68rem;
  cursor: pointer;
}

.memory-error {
  margin-bottom: 1rem;
  color: #8a342c;
  font-weight: 700;
}

.memory-review-button,
.memory-share-button,
.memory-secondary-button {
  padding: 1rem 1.2rem;
  border: 1px solid var(--pilot-blue);
  cursor: pointer;
}

.memory-review-button,
.memory-share-button {
  width: 100%;
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.memory-review h3 {
  max-width: 32rem;
  margin: 0 0 2rem;
  font-size: clamp(2.6rem, 5vw, 4.7rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.memory-review-content {
  border-top: 1px solid var(--line);
}

.review-block {
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--line);
}

.review-block strong {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.review-block p {
  margin: 0.55rem 0 0;
  font-size: 1.1rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.share-explanation {
  margin: 2rem 0 1rem;
  padding: 1rem;
  background: var(--pilot-sage);
  font-size: 0.82rem;
  line-height: 1.55;
}

.share-status:not(:empty) {
  margin-bottom: 1rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
}

.memory-review-actions {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 0.75rem;
}

.memory-secondary-button {
  background: transparent;
  color: var(--pilot-blue);
}

.memory-share-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.pilot-intro {
  display: grid;
  width: var(--page);
  grid-template-columns: 1fr 3fr;
  gap: 4rem;
  padding: 8rem 0;
}

.pilot-intro > div {
  max-width: 52rem;
}

.pilot-intro h2,
.pilot-section-heading h2,
.privacy-copy h2,
.result-copy h2,
.pilot-join h2 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.pilot-intro p:not(.pilot-label) {
  max-width: 42rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}

.pilot-intro .pilot-lead {
  margin-top: 2rem;
  color: var(--ink);
  font-size: 1.4rem;
}

.pilot-gallery {
  position: relative;
  display: grid;
  width: var(--page);
  grid-template-columns: 0.8fr 1.2fr;
  gap: 3rem;
  align-items: end;
  margin: 0 auto 8rem;
  padding: 2rem 0 4rem;
}

.pilot-gallery::before {
  position: absolute;
  z-index: -1;
  inset: 14% -6vw 0;
  content: "";
  background: #ddd3c3;
  transform: rotate(-1deg);
}

.pilot-gallery figure {
  margin: 0;
}

.pilot-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pilot-gallery-tall {
  width: 78%;
  justify-self: end;
  transform: rotate(-1.5deg);
}

.pilot-gallery-wide {
  align-self: center;
  transform: rotate(1deg);
}

.pilot-gallery figure img {
  border: 0.5rem solid #f7f1e5;
  box-shadow: 0 1.4rem 2.8rem rgba(29, 34, 32, 0.18);
}

.pilot-gallery figcaption {
  margin-top: 0.8rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-style: italic;
}

.gallery-letter {
  grid-column: 2;
  max-width: 32rem;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.6;
}

.pilot-process,
.participation,
.pilot-timeline {
  padding: 8rem 0;
}

.pilot-process {
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

.pilot-section-heading {
  width: var(--page);
  margin: 0 auto 4rem;
}

.process-list,
.timeline-list {
  width: var(--page);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(243, 236, 220, 0.3);
}

.process-list li {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(243, 236, 220, 0.3);
}

.process-list > li > span,
.participation-grid article > span {
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}

.process-list h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  font-weight: 400;
}

.process-list p {
  max-width: 45rem;
  margin: 0;
  color: rgba(243, 236, 220, 0.72);
  line-height: 1.6;
}

.pilot-privacy {
  display: grid;
  grid-template-columns: minmax(22rem, 0.82fr) minmax(0, 1.18fr);
  background: var(--pilot-sage);
}

.pilot-privacy--copy-only {
  grid-template-columns: 1fr;
}

.pilot-privacy--copy-only .privacy-copy {
  width: min(56rem, var(--page));
  margin: 0 auto;
}

.privacy-art {
  position: relative;
  min-height: 52rem;
}

.privacy-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.privacy-art p {
  position: absolute;
  right: 1.2rem;
  bottom: 1.2rem;
  margin: 0;
  padding: 0.75rem 0.9rem;
  background: rgba(19, 35, 45, 0.82);
  color: var(--pilot-cream);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.4;
}

.privacy-copy {
  align-self: center;
  padding: 5rem clamp(2rem, 7vw, 7rem);
}

.privacy-copy h2 {
  font-size: clamp(3.4rem, 5.5vw, 6rem);
}

.privacy-copy ul {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(23, 33, 42, 0.25);
}

.privacy-copy li {
  padding: 1rem 0 1rem 1.7rem;
  border-bottom: 1px solid rgba(23, 33, 42, 0.25);
  line-height: 1.55;
}

.privacy-copy li::before {
  float: left;
  margin-left: -1.7rem;
  content: "—";
}

.participation-grid {
  display: grid;
  width: var(--page);
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.participation-grid article {
  display: flex;
  min-height: 21rem;
  flex-direction: column;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.participation-grid .active {
  background: #d8d8ca;
}

.participation-grid--formats {
  grid-template-columns: repeat(3, 1fr);
}

.participation-grid h3 {
  margin: 4.5rem 0 0.8rem;
  font-size: 2rem;
  font-weight: 400;
}

.participation-grid p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}

.participation-grid small {
  margin-top: auto;
  padding-top: 1.5rem;
  font-family: var(--sans);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pilot-timeline {
  background: #ded4c4;
}

.timeline-list {
  border-color: var(--line);
}

.timeline-list li {
  display: grid;
  grid-template-columns: minmax(8rem, 0.7fr) 2fr;
  gap: 2rem;
  padding: 1.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(1.2rem, 2.2vw, 1.9rem);
}

.timeline-list strong {
  color: var(--rose);
  font-weight: 400;
  font-style: italic;
}

.pilot-result {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(24rem, 0.75fr);
  background: var(--night);
  color: var(--pilot-cream);
}

.pilot-result--copy-only {
  grid-template-columns: 1fr;
}

.pilot-result--copy-only .result-copy {
  width: min(56rem, var(--page));
  margin: 0 auto;
}

.pilot-result figure {
  min-height: 47rem;
  margin: 0;
}

.pilot-result figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-copy {
  align-self: center;
  padding: 5rem clamp(2rem, 5vw, 5rem);
}

.result-copy h2 {
  font-size: clamp(3.4rem, 5vw, 5.8rem);
}

.result-copy p:not(.pilot-label) {
  margin-top: 2rem;
  color: rgba(243, 236, 220, 0.75);
  line-height: 1.7;
}

.result-copy .result-emphasis {
  padding-top: 2rem;
  border-top: 1px solid rgba(243, 236, 220, 0.28);
  color: #d8c79e;
  font-size: 1.35rem;
  font-style: italic;
}

.pilot-join {
  display: grid;
  width: var(--page);
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  padding: 9rem 0;
}

.pilot-join > div:first-child > p:not(.pilot-label) {
  max-width: 31rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

.reply-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-self: center;
  gap: 0.8rem;
}

.reply-choices span {
  padding: 1.3rem 1rem;
  border: 1px solid var(--line);
  font-size: 1.35rem;
  text-align: center;
}

.reply-choices span:first-child {
  background: var(--pilot-accent);
}

.reply-choices--single {
  width: min(100%, 24rem);
  grid-template-columns: 1fr;
  justify-self: center;
}

.reply-choices--single span {
  padding: 2rem 1rem;
  font-size: clamp(2rem, 5vw, 4rem);
  font-style: italic;
}

.pilot-signoff {
  grid-column: 1 / -1;
  max-width: 38rem;
  margin: 1rem auto 0;
  color: var(--ink-soft);
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.6;
  text-align: center;
}

/* Finished-first family review */
.finished-collection,
.reaction-section {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(5rem, 9vw, 9rem) 0;
}

.finished-heading,
.reaction-heading {
  display: grid;
  grid-template-columns: minmax(13rem, 0.7fr) minmax(0, 1.3fr);
  gap: 1rem 3rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.finished-heading .pilot-label,
.finished-heading h2,
.reaction-heading .pilot-label,
.reaction-heading h2 {
  grid-column: 1;
}

.finished-heading h2,
.reaction-heading h2 {
  margin: 0;
  font-size: clamp(3.4rem, 6vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.finished-heading > p:last-child,
.reaction-heading > p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 32rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
  line-height: 1.7;
}

.finished-grid {
  display: block;
  columns: 3 18rem;
  column-gap: clamp(0.8rem, 2vw, 1.5rem);
}

.finished-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 clamp(1.4rem, 3vw, 2.5rem);
  break-inside: avoid;
}

.finished-item picture {
  display: block;
}

.finished-item img {
  display: block;
  width: 100%;
  height: auto;
  border: 0.38rem solid #f8f3e9;
  box-shadow: 0 1rem 2.4rem rgba(23, 33, 42, 0.14);
}

.finished-item figcaption {
  margin-top: 0.55rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-style: italic;
}

/* Field-guide subjects: the category mark sits beside the caption. */
.family-caption-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.family-caption-row figcaption {
  margin-top: 0;
}

.family-field-guide-mark {
  flex: none;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1;
}

/* The wall's field guide: one strip at the top with every species mark,
   flora then fauna, numbered as in the book. Each jumps to its painting. */
.family-field-guide {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  padding: clamp(1rem, 2.4vw, 1.5rem) clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  background: rgba(248, 243, 233, 0.52);
}

.family-field-guide-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.family-field-guide-head .pilot-label,
.family-field-guide-count {
  margin: 0;
}

.family-field-guide-count {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-style: italic;
}

.family-field-guide-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.1rem 2.2rem;
}

.family-field-guide-label {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.family-field-guide-label .field-guide-emblem {
  width: 1.3rem;
  height: 1.3rem;
  color: var(--ink);
}

.family-field-guide-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family-field-guide-entry {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  background: rgba(255, 253, 247, 0.72);
  color: var(--ink);
  font: 0.82rem var(--serif);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.family-field-guide-entry:hover,
.family-field-guide-entry:focus-visible {
  border-color: var(--ink-soft);
  background: #fffdf7;
}

.family-field-guide-entry .species-mark {
  width: 3rem;
  height: 3rem;
}

.family-field-guide-entry .field-guide-emblem {
  width: 1.1em;
  height: 1.1em;
  margin: 0 0.25em;
}

.family-field-guide-number {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
}

.family-field-guide-entry[aria-pressed="true"] {
  border-color: var(--ink);
  background: #fffdf7;
  box-shadow: inset 0 0 0 1px var(--ink);
}

/* The viewer frame beneath the cards: painting left, description right. */
.family-field-guide-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  margin-top: clamp(1rem, 2.4vw, 1.5rem);
  padding-top: clamp(1rem, 2.4vw, 1.5rem);
  border-top: 1px solid var(--line);
  animation: field-guide-open 260ms ease;
}

@keyframes field-guide-open {
  from { opacity: 0; transform: translateY(0.35rem); }
  to { opacity: 1; transform: none; }
}

.family-field-guide-viewer-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  max-height: min(60vh, 34rem);
  border: 1px solid var(--line);
  background: #e7e2d8;
}

.family-field-guide-viewer-media picture,
.family-field-guide-viewer-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: min(60vh, 34rem);
  object-fit: contain;
}

.family-field-guide-viewer-copy {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.family-field-guide-viewer-kicker {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.family-field-guide-viewer-kicker .field-guide-emblem {
  width: 1.3rem;
  height: 1.3rem;
  color: var(--ink);
}

.family-field-guide-viewer-title {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.family-field-guide-viewer-line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.family-field-guide-viewer-bio {
  max-width: 34em;
  margin: 0.2rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

.family-field-guide-viewer-caption {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-style: italic;
}

.family-field-guide-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.8rem;
}

.family-field-guide-viewer-button {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.family-field-guide-viewer-button--quiet {
  background: transparent;
  color: var(--ink);
}

@media (max-width: 720px) {
  .family-field-guide-viewer {
    grid-template-columns: 1fr;
  }
}

.finished-item.is-field-guide-target {
  outline: 2px solid var(--blue);
  outline-offset: 6px;
}

.reaction-section {
  position: relative;
  padding-top: 2rem;
}

.reaction-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 0 auto -3.2rem;
  padding: 0 clamp(0.75rem, 4vw, 4rem);
}

.reaction-strip picture {
  min-width: 0;
}

.reaction-strip picture:nth-child(even) {
  transform: translateY(1.5rem);
}

.reaction-strip img {
  display: block;
  width: 100%;
  aspect-ratio: 0.86;
  border: 0.3rem solid #f8f3e9;
  object-fit: cover;
  box-shadow: 0 0.8rem 1.8rem rgba(23, 33, 42, 0.12);
}

.reaction-card {
  position: relative;
  z-index: 1;
  width: min(42rem, calc(100% - 2rem));
  overflow: hidden;
  margin: 0 auto;
  border: 1px solid rgba(23, 33, 42, 0.18);
  background: #f9f4e9;
  box-shadow: 0 1.5rem 4rem rgba(23, 33, 42, 0.14);
}

.reaction-privacy {
  padding: 1.25rem 1.5rem;
  background: var(--pilot-sage);
}

.reaction-privacy strong,
.reaction-privacy p,
.reaction-choices legend,
.reaction-choices span {
  font-family: var(--sans);
}

.reaction-privacy strong {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reaction-privacy p {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
}

.reaction-choices {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}

.reaction-choices legend {
  margin-bottom: 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reaction-choices label {
  position: relative;
  cursor: pointer;
}

.reaction-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.reaction-choices span {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.reaction-choices input:checked + span {
  border-color: var(--pilot-blue);
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

.reaction-choices input:focus-visible + span {
  outline: 3px solid rgba(24, 44, 58, 0.25);
  outline-offset: 2px;
}

.photo-drop {
  margin-bottom: 2rem;
}

.photo-drop .media-choice {
  min-height: 10.5rem;
  background: rgba(175, 181, 166, 0.13);
}

.memory-field--optional i {
  color: var(--ink-soft);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.reaction-form .memory-field textarea {
  min-height: 8rem;
}

.print-permission {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  margin: 0 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(175, 181, 166, 0.14);
  cursor: pointer;
}

.print-permission input {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--pilot-blue);
}

.print-permission span,
.print-permission small {
  display: block;
  font-family: var(--sans);
}

.print-permission strong {
  font-size: 0.78rem;
  line-height: 1.45;
}

.print-permission small {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .finished-heading,
  .reaction-heading {
    grid-template-columns: 1fr;
  }

  .finished-heading > p:last-child,
  .reaction-heading > p:last-child {
    grid-column: 1;
    grid-row: auto;
    margin-top: 1rem;
  }

  .contribution {
    grid-template-columns: 1fr;
  }

  .contribution-heading {
    display: block;
    grid-column: 1;
    margin-bottom: 0;
  }

  .contribution-heading > p:last-child {
    margin-top: 1.5rem;
  }

  .contribution-card,
  .contribution-photo-rail--left,
  .contribution-photo-rail--right {
    grid-column: 1;
  }

  .contribution-photo-rail {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
  }

  .contribution-photo-feature {
    grid-column: 1 / -1;
  }

  .pilot-privacy,
  .pilot-result {
    grid-template-columns: 1fr;
  }

  .privacy-art,
  .pilot-result figure {
    min-height: 70vw;
  }

  .participation-grid {
    grid-template-columns: 1fr 1fr;
  }

  .participation-grid article {
    min-height: 17rem;
  }
}

@media (max-width: 760px) {
  .pilot-page .site-header {
    width: calc(100vw - 2rem);
    padding: 0.8rem 0;
  }

  .pilot-page .header-actions > a {
    display: inline-flex;
  }

  .header-cta {
    min-height: 44px;
    align-items: center;
    padding: 0.65rem 0.8rem;
    background: rgba(24, 44, 58, 0.62);
    font-size: 0.62rem;
  }

  .pilot-hero {
    min-height: 88svh;
    padding: 6.5rem 0 3.5rem;
  }

  .pilot-hero-image {
    object-position: 65% center;
  }

  .pilot-hero-wash {
    background: linear-gradient(180deg, rgba(8, 20, 29, 0.55), rgba(8, 20, 29, 0.8));
  }

  .pilot-hero-copy {
    margin-left: 1rem;
    width: calc(100vw - 2rem);
  }

  .pilot-hero h1 {
    max-width: 21rem;
    margin: 0.8rem 0 1.1rem;
    font-size: clamp(3.15rem, 15vw, 4.65rem);
    line-height: 0.88;
  }

  .pilot-deck {
    max-width: 24rem;
    font-size: 1.04rem;
    line-height: 1.45;
  }

  .pilot-hero-actions {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.4rem;
  }

  .pilot-enter {
    min-height: 48px;
    justify-content: space-between;
    margin-top: 0.6rem;
    padding: 0.85rem 0.95rem;
  }

  .pilot-hero-actions .pilot-enter:first-child {
    width: 100%;
    margin-top: 2rem;
  }

  .pilot-hero-actions .pilot-enter:last-child {
    padding-left: 0;
    border-color: transparent;
  }

  .pilot-hero-note {
    display: none;
  }

  .pilot-intro,
  .pilot-join {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 3.75rem 0;
  }

  .finished-collection,
  .reaction-section {
    width: calc(100vw - 2rem);
    padding: 3.75rem 0;
  }

  .finished-heading,
  .reaction-heading {
    display: block;
    margin-bottom: 2rem;
  }

  .finished-heading h2,
  .reaction-heading h2 {
    margin-top: 0.6rem;
    font-size: clamp(2.75rem, 13vw, 4rem);
    line-height: 0.94;
  }

  .finished-heading > p:last-child,
  .reaction-heading > p:last-child {
    margin-top: 1.25rem;
    font-size: 1rem;
  }

  .finished-grid {
    columns: 2 8.5rem;
    column-gap: 0.65rem;
  }

  .finished-item {
    margin-bottom: 1.2rem;
  }

  .finished-item img {
    border-width: 0.22rem;
    box-shadow: 0 0.5rem 1.2rem rgba(23, 33, 42, 0.1);
  }

  .finished-item figcaption {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .reaction-section {
    padding-top: 1rem;
  }

  .reaction-strip {
    display: flex;
    width: 100vw;
    margin-left: calc((100% - 100vw) / 2);
    margin-bottom: -1.3rem;
    padding: 0 1rem 1.5rem;
    gap: 0.65rem;
    overflow-x: auto;
    scroll-padding: 1rem;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .reaction-strip::-webkit-scrollbar {
    display: none;
  }

  .reaction-strip picture {
    flex: 0 0 58vw;
    scroll-snap-align: start;
  }

  .reaction-strip picture:nth-child(even) {
    transform: translateY(0.6rem);
  }

  .reaction-strip img {
    border-width: 0.18rem;
    aspect-ratio: 0.82;
  }

  .reaction-card {
    width: 100%;
    box-shadow: 0 0.8rem 2.2rem rgba(23, 33, 42, 0.1);
  }

  .reaction-privacy {
    padding: 1rem;
  }

  .reaction-privacy p {
    font-size: 0.8rem;
  }

  .reaction-choices span {
    min-height: 3.25rem;
  }

  .contribution {
    gap: 1.75rem;
    padding: 3.75rem 0;
  }

  .contribution-heading h2,
  .pilot-intro h2,
  .pilot-section-heading h2,
  .privacy-copy h2,
  .result-copy h2,
  .pilot-join h2 {
    font-size: clamp(2.75rem, 13vw, 4rem);
    line-height: 0.94;
  }

  .contribution-heading > p:last-child {
    margin-top: 1.25rem;
    font-size: 1rem;
  }

  .contribution-photo-rail {
    gap: 0.5rem;
  }

  .contribution-photo-rail img {
    border-width: 0.25rem;
    box-shadow: 0 0.5rem 1.2rem rgba(23, 33, 42, 0.11);
  }

  .contribution-photo-rail figcaption {
    margin-top: 0.3rem;
    font-size: 0.7rem;
  }

  .contribution-card {
    box-shadow: 0 0.8rem 2.2rem rgba(23, 33, 42, 0.09);
  }

  .contribution-privacy {
    padding: 1.1rem;
  }

  .contribution-privacy p {
    font-size: 0.94rem;
  }

  .memory-form,
  .memory-review {
    padding: 1.1rem;
  }

  .memory-field {
    margin-bottom: 1.5rem;
  }

  .memory-field input {
    min-height: 48px;
  }

  .memory-field textarea {
    min-height: 11rem;
    padding: 0.85rem;
    font-size: 1rem;
  }

  .memory-media-grid,
  .memory-review-actions {
    grid-template-columns: 1fr;
  }

  .media-choice {
    min-height: 9rem;
    padding: 1rem;
  }

  .media-choice input::file-selector-button,
  .memory-review-button,
  .memory-share-button,
  .memory-secondary-button {
    min-height: 48px;
  }

  .photo-preview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pilot-gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 3.75rem;
    padding-bottom: 2rem;
  }

  .pilot-gallery-tall {
    width: 100%;
    justify-self: start;
    transform: none;
  }

  .pilot-gallery-wide {
    transform: none;
  }

  .pilot-gallery-wide,
  .gallery-letter {
    grid-column: 1;
  }

  .pilot-process,
  .participation,
  .pilot-timeline {
    padding: 3.75rem 0;
  }

  .process-list li {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    gap: 1rem;
  }

  .privacy-art,
  .pilot-result figure {
    min-height: 78vw;
  }

  .privacy-copy,
  .result-copy {
    padding: 3.5rem 1rem;
  }

  .participation-grid {
    grid-template-columns: 1fr;
  }

  .participation-grid article {
    min-height: 12rem;
  }

  .participation-grid h3 {
    margin-top: 2.5rem;
  }

  .timeline-list li {
    grid-template-columns: 6rem 1fr;
    gap: 1rem;
  }

  .reply-choices {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    margin: 0.45in;
  }

  .skip-link,
  .pilot-enter {
    display: none;
  }

  .pilot-hero {
    min-height: 10.1in;
    break-after: page;
  }

  .pilot-process,
  .pilot-privacy,
  .participation,
  .pilot-timeline,
  .pilot-result,
  .pilot-join {
    break-inside: avoid;
  }
}

/* Direct family wall, one-photo handoff, and book preview */
[hidden] {
  display: none !important;
}

.family-add,
.book-preview {
  width: min(78rem, calc(100vw - 2rem));
  margin: 0 auto;
  padding: clamp(3.75rem, 8vw, 7rem) 0;
}

.family-add {
  padding-top: 1rem;
}

.portrait-carousel {
  position: relative;
  z-index: 0;
  width: 100vw;
  margin: 0 0 -1.15rem calc(50% - 50vw);
  padding: 0 0 2rem;
}

.portrait-carousel-bar {
  display: flex;
  width: min(92rem, calc(100vw - 2rem));
  min-height: 3rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  border-top: 1px solid rgba(23, 33, 42, 0.22);
  color: var(--ink-soft);
  font-family: var(--sans);
}

.portrait-carousel-bar > p {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portrait-carousel-bar > p span {
  margin-left: 0.65rem;
  color: rgba(23, 33, 42, 0.5);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.portrait-carousel-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.portrait-carousel-position {
  min-width: 3.6rem;
  color: rgba(23, 33, 42, 0.55);
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  text-align: right;
}

.portrait-carousel-controls button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 33, 42, 0.24);
  border-radius: 50%;
  outline: none;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.92rem;
  transition: background 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

.portrait-carousel-controls button:hover,
.portrait-carousel-controls button:focus-visible {
  border-color: rgba(23, 33, 42, 0.55);
  background: rgba(223, 229, 229, 0.72);
}

.portrait-carousel-controls button:focus-visible,
.portrait-card:focus-visible,
.portrait-carousel-track:focus-visible {
  box-shadow: 0 0 0 3px rgba(96, 122, 141, 0.28);
}

.portrait-carousel-controls button:disabled {
  cursor: default;
  opacity: 0.28;
}

.portrait-carousel-track {
  display: grid;
  grid-auto-columns: clamp(16rem, 22vw, 21rem);
  grid-auto-flow: column;
  gap: clamp(0.75rem, 1.2vw, 1.15rem);
  margin: 0;
  padding: 0.2rem max(1rem, calc((100vw - 92rem) / 2)) 1.15rem;
  overflow-x: auto;
  outline: none;
  overscroll-behavior-inline: contain;
  scroll-padding-inline: max(1rem, calc((100vw - 92rem) / 2));
  scroll-snap-type: inline mandatory;
  scrollbar-color: rgba(23, 33, 42, 0.28) transparent;
  scrollbar-width: thin;
}

.portrait-card {
  min-width: 0;
  margin: 0;
  outline: none;
  color: var(--ink);
  cursor: zoom-in;
  scroll-snap-align: start;
}

.portrait-card picture,
.portrait-card-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 5;
  place-items: center;
  overflow: hidden;
  border: 0.28rem solid #f8f3e9;
  background: #e7e3da;
  box-shadow: 0 0.8rem 1.8rem rgba(23, 33, 42, 0.11);
}

.portrait-card img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  box-shadow: none;
}

.portrait-card-person,
.portrait-card-caption,
.portrait-card > p:last-child {
  margin: 0.55rem 0 0;
}

.portrait-card-person {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portrait-card-caption,
.portrait-card > p:last-child {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-style: italic;
  line-height: 1.4;
}

.portrait-card-person + .portrait-card-caption {
  margin-top: 0.22rem;
}

.portrait-card--empty {
  cursor: default;
}

.portrait-card-placeholder {
  color: rgba(23, 33, 42, 0.38);
  font-family: var(--serif);
  font-size: clamp(2.3rem, 5vw, 4rem);
  font-style: italic;
}

.portrait-card:hover picture,
.portrait-card:focus-visible picture {
  border-color: #ffffff;
}

.family-add-card {
  position: relative;
  z-index: 1;
  width: min(42rem, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid rgba(23, 33, 42, 0.18);
  background: #f9f4e9;
  box-shadow: 0 1.5rem 4rem rgba(23, 33, 42, 0.13);
}

.family-add-card h2,
.book-heading h2 {
  margin: 0.65rem 0 1rem;
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.95;
}

.family-add-card > p:not(.pilot-label),
.book-heading > p:last-child {
  color: var(--ink-soft);
  line-height: 1.65;
}

.chatgpt-button {
  display: flex;
  min-height: 3.6rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1rem 1.1rem;
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.chatgpt-status,
.family-add-private,
.chatgpt-fallback {
  font-family: var(--sans);
  font-size: 0.72rem;
  line-height: 1.5;
}

.chatgpt-status {
  min-height: 1.2rem;
  margin: 0.65rem 0 0;
}

.chatgpt-fallback {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.chatgpt-fallback summary {
  cursor: pointer;
  font-weight: 700;
}

.chatgpt-fallback p {
  padding: 0.8rem;
  background: rgba(175, 181, 166, 0.14);
}

.family-add-private {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.book-preview {
  width: 100%;
  padding-bottom: clamp(5rem, 10vw, 9rem);
  background: #d9d5ca;
}

.book-heading {
  width: min(78rem, calc(100vw - 2rem));
  margin: 0 auto clamp(2rem, 5vw, 4rem);
}

.book-heading > p:last-child {
  max-width: 34rem;
  margin: 0;
}

.book-spreads {
  display: flex;
  gap: 1rem;
  width: 100%;
  overflow-x: auto;
  padding: 0 max(1rem, calc((100vw - 78rem) / 2)) 1.5rem;
  scroll-padding-inline: 1rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.book-spread {
  display: grid;
  flex: 0 0 min(88vw, 56rem);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  aspect-ratio: 10 / 7;
  overflow: hidden;
  background: #f8f4eb;
  box-shadow: 0 1.2rem 3rem rgba(23, 33, 42, 0.2);
  scroll-snap-align: center;
}

.book-spread--cover {
  flex-basis: min(72vw, 31rem);
  grid-template-columns: 1fr;
  aspect-ratio: 5 / 7;
}

.book-spread--panorama {
  grid-template-columns: 1fr;
}

.book-page {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: #fbf8f1;
}

.book-spread:not(.book-spread--cover) .book-page:first-child {
  box-shadow: inset -1px 0 rgba(23, 33, 42, 0.12);
}

.book-page picture,
.book-page img {
  display: block;
  width: 100%;
  height: 100%;
}

.book-page img {
  object-fit: cover;
}

.book-cover > picture {
  position: absolute;
  inset: 0;
}

.book-cover > div {
  position: absolute;
  z-index: 1;
  right: 10%;
  bottom: 9%;
  left: 10%;
  color: #f8f4eb;
  text-shadow: 0 1px 2px rgba(11, 27, 37, 0.65), 0 2px 10px rgba(11, 27, 37, 0.55), 0 6px 30px rgba(11, 27, 37, 0.5);
}

.book-cover span,
.book-folio {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.book-cover h3 {
  margin: 0.5rem 0;
  font-size: clamp(1.7rem, 5vw, 3.3rem);
  font-weight: 400;
  line-height: 0.95;
}

.book-cover p {
  margin: 0;
  font-size: clamp(0.6rem, 1.6vw, 0.9rem);
}

.book-page--caption,
.book-page--reaction {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1rem, 4vw, 3rem);
}

.book-page blockquote {
  margin: auto 0;
  font-size: clamp(1rem, 3vw, 2rem);
  font-style: italic;
  line-height: 1.3;
}

.book-page--portrait {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: clamp(0.65rem, 2.5vw, 1.8rem);
}

.book-page--portrait picture {
  min-height: 0;
}

.book-page--portrait img {
  object-position: center 38%;
}

.book-page--historical-map img {
  object-position: center center;
}

.book-page--panorama {
  position: relative;
}

.book-page--panorama picture,
.book-page--panorama img {
  width: 100%;
  height: 100%;
}

.book-page--panorama img {
  object-fit: cover;
}

.book-page--panorama p {
  position: absolute;
  right: clamp(0.7rem, 2.5vw, 1.6rem);
  bottom: clamp(0.7rem, 2.5vw, 1.6rem);
  max-width: 20rem;
  margin: 0;
  padding: 0.65rem 0.8rem;
  background: rgba(250, 246, 237, 0.86);
  color: var(--ink);
  font-size: clamp(0.58rem, 1.3vw, 0.82rem);
  font-style: italic;
  line-height: 1.4;
}

.book-page--portrait p,
.book-page--reaction p {
  margin: 0;
  padding-top: 0.75rem;
  color: var(--ink-soft);
  font-size: clamp(0.55rem, 1.4vw, 0.82rem);
  line-height: 1.45;
}

.book-page--objects {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.35rem;
}

@media (min-width: 761px) {
  .book-heading {
    display: grid;
    grid-template-columns: minmax(18rem, 0.9fr) minmax(22rem, 1.1fr);
    gap: 1rem 4rem;
    align-items: end;
  }

  .book-heading .pilot-label,
  .book-heading h2 {
    grid-column: 1;
  }

  .book-heading > p:last-child {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 760px) {
  .family-add,
  .book-heading {
    width: calc(100vw - 2rem);
  }

  .portrait-carousel {
    margin-bottom: -0.3rem;
    padding-bottom: 1rem;
  }

  .portrait-carousel-bar {
    width: calc(100vw - 2rem);
  }

  .portrait-carousel-bar > p span {
    display: none;
  }

  .portrait-carousel-track {
    grid-auto-columns: 78vw;
    gap: 0.7rem;
    padding-inline: 1rem;
    scroll-padding-inline: 1rem;
  }

  .portrait-card picture,
  .portrait-card-placeholder {
    border-width: 0.2rem;
  }

  .portrait-card-caption,
  .portrait-card > p:last-child {
    font-size: 0.7rem;
  }

  .family-add-card {
    padding: 1.4rem 1rem;
  }

  .book-spread {
    flex-basis: 92vw;
  }

  .book-spread--cover {
    flex-basis: 76vw;
  }
}

@media print {
  .site-header,
  .family-add,
  .finished-collection,
  .site-footer {
    display: none !important;
  }

  .book-preview {
    padding: 0;
    background: white;
  }

  .book-heading {
    display: none;
  }

  .book-spreads {
    display: block;
    overflow: visible;
    padding: 0;
  }

  .book-spread,
  .book-spread--cover {
    width: 100%;
    height: 7.5in;
    margin: 0;
    break-after: page;
    box-shadow: none;
  }
}
