:root {
  color-scheme: light;
  --navy: #243d49;
  --paper: #e2e9ec;
  --pale: #cad9df;
  --ink: #203743;
  --muted: #4c6571;
  --line: #aebfc7;
  --light-line: #637d88;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible, summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

h1, h2, p, figure, dl, dd {
  margin: 0;
}

h1, h2 {
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.055em;
}

h2 {
  font-size: clamp(2.25rem, 4.2vw, 4.15rem);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.frame {
  width: min(78rem, calc(100% - clamp(2.5rem, 8vw, 8rem)));
  margin-inline: auto;
}

.opening {
  color: var(--paper);
}

.masthead, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  padding-block: 1.6rem;
}

.masthead {
  border-bottom: 1px solid var(--light-line);
}

.brand {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  font-size: 0.85rem;
}

nav a {
  text-decoration: none;
}

nav a:hover, nav [aria-current] {
  text-decoration: underline;
}

.cover {
  padding-top: clamp(2.5rem, 5.2vw, 5rem);
}

.cover-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.cover h1 {
  font-size: clamp(3.4rem, 8.3vw, 8rem);
  line-height: 0.93;
}

.cover-heading > p {
  flex: 0 0 auto;
  color: var(--pale);
  padding-bottom: 0.3rem;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
}

.cover-photo img {
  aspect-ratio: 1.85;
  object-fit: cover;
  object-position: 50% 0%;
}

figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  font-size: 0.75rem;
  line-height: 1.5;
  padding-block: 0.8rem;
}

.cover-photo figcaption {
  padding-block: 0.9rem 1.5rem;
  color: var(--pale);
}

.body-paper {
  background: var(--paper);
  color: var(--ink);
}

.section {
  padding-block: clamp(3rem, 7vw, 6rem);
  scroll-margin-top: 1rem;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  margin-bottom: 1.2rem;
}

.portrait {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 7rem);
}

.portrait-text > h2 {
  margin-bottom: 1.6rem;
}

.lead {
  font-size: clamp(1.12rem, 1.7vw, 1.42rem);
  line-height: 1.55;
}

.portrait-text > p + p, .character-body > p + p {
  margin-top: 1rem;
}

.breed-data {
  margin-top: 1.8rem;
}

.breed-data div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.65rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.breed-data dt {
  color: var(--muted);
}

.breed-data dd {
  text-align: right;
}

.source {
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.65;
  margin-top: 1.2rem;
}

.standing-photo {
  margin-top: 0.25rem;
}

.standing-photo figcaption {
  color: var(--muted);
}

.character {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 7vw, 7rem);
  border-top: 1px solid var(--line);
  padding-bottom: 2.5rem;
}

.character-heading h2 {
  max-width: 10em;
}

.character-body {
  padding-top: 2.3rem;
}

.closeup {
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
}

.closeup img {
  aspect-ratio: 2.1;
  object-fit: cover;
  object-position: 50% 45%;
}

.closeup figcaption {
  color: var(--muted);
}

.care {
  background: var(--pale);
}

.care-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 7rem);
}

.care-intro {
  margin-top: 1.4rem;
  max-width: 24rem;
}

.care-notes details {
  border-top: 1px solid #94abb6;
}

.care-notes details:last-of-type {
  border-bottom: 1px solid #94abb6;
}

.care-notes summary {
  cursor: pointer;
  padding-block: 1.1rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.care-notes summary::marker {
  font-size: 0.7rem;
}

.care-notes details p {
  padding: 0 0 1.3rem 1.1rem;
}

.reading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  padding-block: 2.8rem;
}

.reading h2 {
  font-size: 1.5rem;
  letter-spacing: -0.025em;
}

.reading a {
  display: block;
  padding-block: 0.2rem;
  font-size: 0.88rem;
}

.footer {
  padding-block: 2rem;
}

.skip {
  position: absolute;
  z-index: 2;
  left: 1rem;
  top: -5rem;
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
}

.skip:focus {
  top: 1rem;
}

.document {
  max-width: 48rem;
  min-height: 65vh;
}

.document h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

.document h2 {
  font-size: 1.6rem;
  letter-spacing: -0.03em;
  margin-block: 2rem 0.7rem;
}

.document p + p {
  margin-top: 1rem;
}

.document ul {
  padding-left: 1.2rem;
}

.document li {
  margin-block: 0.85rem;
}

@media (max-width: 55rem) {
  .cover-heading {
    display: block;
  }

  .cover-heading > p {
    margin-top: 1.4rem;
  }

  .cover-heading > p br {
    display: none;
  }

  .cover-photo img {
    aspect-ratio: 1.55;
  }

  .portrait, .character, .care-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .portrait {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2rem;
  }

  .standing-photo {
    margin-top: 2.8rem;
  }

  .character-body {
    padding-top: 0;
  }

  .closeup img {
    aspect-ratio: 1.7;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 38rem) {
  .masthead {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.1rem;
  }

  nav {
    column-gap: 1.15rem;
    font-size: 0.82rem;
  }

  .cover h1 {
    font-size: clamp(2.5rem, 9.7vw, 3.65rem);
  }

  .cover-heading {
    padding-bottom: 1.6rem;
  }

  .cover-photo img {
    aspect-ratio: 1.2;
  }

  .portrait {
    grid-template-columns: minmax(0, 1fr);
  }

  .standing-photo {
    max-width: 26rem;
    margin-top: 0;
  }

  .breed-data div {
    font-size: 0.82rem;
  }

  .breed-data dd {
    max-width: 58%;
  }

  .character-heading h2 br, .care h2 br {
    display: none;
  }

  .closeup img {
    aspect-ratio: 1.25;
    object-position: 66% 50%;
  }

  .document {
    overflow-wrap: anywhere;
  }

  .document h1 {
    font-size: 2rem;
    letter-spacing: -0.035em;
  }
}
