:root {
  --bg: #141a16;
  --cream: #f6f1e6;
  --ink: #1a201c;
  --muted: #5c564c;
  --gold: #c6a15b;
  --gold-strong: #e0c07a;
  --green: #152018;
  --line: rgba(26, 32, 28, 0.14);
  --page-w: 11in;
  --page-h: 8.5in;
  --lookbook-scale: 0.72;
  --cover-top: 2.36in;
  --cover-side: 0.95in;
  --cover-bottom: 0.9in;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-brand: "Nunito Sans", system-ui, sans-serif;
  --font-lockup: "optima-nova-lt-pro", "optima-nova-lt-pro-titling", Optima, sans-serif;
  --pedigree-paternal: #2f6f6a;
  --pedigree-maternal: #7a3b45;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--bg);
}

.chrome {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #152018;
  border-bottom: 1px solid rgba(243, 239, 230, 0.12);
}

.chrome__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.chrome__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chrome a,
.chrome button,
.chrome select {
  font: inherit;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(198, 161, 91, 0.45);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  text-decoration: none;
}

.chrome select {
  background: #152018;
}

.chrome__book {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

html.is-published .chrome__book,
html.is-published #edit-link {
  display: none;
}

html.is-embed .chrome,
html.is-embed .scrub {
  display: none;
}

html.is-embed:not(.is-embed-mobile),
html.is-embed:not(.is-embed-mobile) body {
  height: 100%;
  overflow: hidden;
}

html.is-embed.is-embed-mobile,
html.is-embed.is-embed-mobile body {
  height: 100%;
  overflow: auto;
  background: #000;
}

html.is-embed.is-embed-mobile .stage {
  height: auto;
  min-height: 100%;
  overflow: visible;
}

html.is-embed body:not(.is-mobile-book) .stage {
  padding: 0.45rem 2.4rem;
  min-height: 100%;
  height: 100%;
  align-items: center;
  box-sizing: border-box;
}

html.is-embed body:not(.is-mobile-book) .spread {
  width: min(100%, calc((100vh - 0.9rem) * 22 / 8.5));
  max-height: calc(100vh - 0.9rem);
}

html.is-embed .page-arrows {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

html.is-embed .page-arrows__btn {
  pointer-events: auto;
}

.page--live-credit {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 0.4in 0.42in 0.48in;
}

.live-credit {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.72rem, 1.55cqh, 0.88rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.phone-credit {
  display: flex;
  align-items: flex-end;
  min-height: 40vh;
  padding: 1.4rem 1.1rem 1.6rem;
  background: var(--cream);
  color: var(--ink);
}

.chrome a:hover,
.chrome button:hover,
.chrome select:hover {
  border-color: var(--gold);
}

.chrome a[aria-current="page"] {
  border-color: var(--gold);
  color: var(--gold-strong);
}

.stage {
  padding: 1.5rem 1.5rem 1.1rem;
  display: flex;
  justify-content: center;
}

.scrub {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0.55rem 1.5rem 0.85rem;
  background: #152018;
  border-top: 1px solid rgba(243, 239, 230, 0.12);
}

.scrub__inner {
  width: min(100%, calc(var(--page-w) * 2 * 0.72));
  display: grid;
  grid-template-columns: auto 1.6rem minmax(0, 1fr) 1.6rem auto;
  align-items: center;
  gap: 0.75rem 0.7rem;
}

.scrub__step {
  margin: 0;
  padding: 0.28rem 0.65rem;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(198, 161, 91, 0.45);
  cursor: pointer;
}

.scrub__step:hover,
.scrub__step:focus-visible {
  border-color: var(--gold);
  color: var(--gold-strong);
}

.scrub__edge {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-align: center;
}

.scrub__rail {
  min-width: 0;
  display: grid;
  gap: 0.4rem;
}

.scrub__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.15rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.scrub__slider::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(var(--gold), var(--gold)) 0 / var(--progress, 0%) 100% no-repeat,
    rgba(198, 161, 91, 0.28);
}

.scrub__slider::-moz-range-track {
  height: 2px;
  background: rgba(198, 161, 91, 0.28);
}

.scrub__slider::-moz-range-progress {
  height: 2px;
  background: var(--gold);
}

.scrub__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 0.85rem;
  height: 0.85rem;
  margin-top: -0.38rem;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
}

.scrub__slider::-moz-range-thumb {
  width: 0.85rem;
  height: 0.85rem;
  border: 0;
  border-radius: 50%;
  background: var(--gold);
}

.scrub__status {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-strong);
}

.page-arrows {
  display: none;
}

.page-arrows__btn {
  position: absolute;
  top: 50%;
  width: 2.5rem;
  height: 4.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--gold);
  background: rgba(21, 32, 24, 0.35);
  transform: translateY(-50%);
  cursor: pointer;
}

.page-arrows__btn::before {
  font-size: 2.1rem;
  line-height: 1;
  content: "‹";
}

.page-arrows__btn--prev {
  left: 0.2rem;
}

.page-arrows__btn--next {
  right: 0.2rem;
}

.page-arrows__btn--next::before {
  content: "›";
}

.spread {
  display: flex;
  width: min(100%, calc(var(--page-w) * 2 * 0.72));
  aspect-ratio: 22 / 8.5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.page {
  width: 50%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: var(--cream);
  color: var(--ink);
}

.page--photo {
  background: #1c1814;
}

.page--photo .photo {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
  background: #1c1814;
}

.page--photo .photo img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: var(--photo-x, 50%) var(--photo-y, 42%);
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-x, 50%) var(--photo-y, 42%);
}

.page--photo .photo-label {
  position: absolute;
  left: 1.1rem;
  bottom: 0.85rem;
  margin: 0;
  color: rgba(246, 241, 230, 0.78);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.page--mosaic {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.14in;
  padding: 0.28in 0.28in 0.36in;
  background: var(--cream);
}

.page--mosaic-empty {
  background: var(--cream);
}

.page--mosaic .mosaic {
  gap: 0.12in;
}

.spread-caption {
  margin: 0 0.85in 0 0;
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page--text {
  padding: 0.22in 0.28in 0.38in 0.3in;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 27%;
  grid-template-areas:
    "head"
    "pedigree";
  gap: 0.12rem;
  min-width: 0;
  container-type: size;
}

.page-folio {
  position: absolute;
  right: 0.28in;
  bottom: 0.16in;
  z-index: 3;
  margin: 0;
  color: var(--gold);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.page--text:has(.page-story) {
  grid-template-rows: minmax(0, auto) minmax(36%, 1fr) 27%;
  grid-template-areas:
    "head"
    "story"
    "pedigree";
}

.page--essay {
  grid-template-rows: minmax(0, auto) minmax(0, 1fr);
  grid-template-areas:
    "head"
    "story";
}

.page--essay:not(:has(.page-story)) {
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "head";
}

.page--essay:not(:has(.page-story)) .page-head {
  align-content: stretch;
  grid-template-rows: auto minmax(0, 1fr);
}

.page--essay:not(:has(.page-story)) .section-lockup {
  display: grid;
  align-content: center;
  align-self: stretch;
  min-height: 0;
}

.page--chapter-left {
  background: var(--cream);
}

.section-title {
  margin: 0 0 0.28rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 6.4cqh, 3.15rem);
  line-height: 0.94;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.section-copy {
  margin: 0.18rem 0 0;
  max-width: 28em;
  font-size: clamp(1.22rem, 3.4cqh, 1.72rem);
  line-height: 1.38;
}

.section-copy p {
  margin: 0 0 0.7em;
}

.section-copy p:last-child {
  margin-bottom: 0;
}

.section-extras {
  display: grid;
  gap: 0.28rem;
  height: 100%;
  min-height: 0;
}

.section-extras--1 {
  grid-template-columns: 1fr;
}

.section-extras--2 {
  grid-template-columns: 1fr 1fr;
}

.page-head {
  grid-area: head;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: grid;
  align-content: start;
  gap: 0.1rem;
}

.page-story {
  grid-area: story;
  min-width: 0;
  min-height: 0;
  padding-bottom: 0.08in;
}

.page-head .horse-copy {
  margin-top: 0.08rem;
  max-width: none;
  font-size: clamp(0.86rem, 1.85cqh, 1.02rem);
  line-height: 1.38;
}

.page-head .horse-copy--cols {
  column-count: 2;
  column-gap: 0.9rem;
  column-fill: balance;
}

.page-head .horse-copy p {
  margin: 0 0 0.45em;
  orphans: 2;
  widows: 2;
}

.page-head .horse-copy p:last-child {
  margin-bottom: 0;
}

@media screen {
  body:not(.editor-body) .page--text {
    grid-template-rows: minmax(0, 1fr) 1.5in;
  }

  body:not(.editor-body) .page--text:has(.page-story) {
    grid-template-rows: minmax(0, auto) minmax(36%, 1fr) 1.5in;
  }

  body:not(.editor-body) .page-head .horse-copy {
    font-size: clamp(0.48rem, 1.35cqw, 0.68rem);
    line-height: 1.28;
  }

  body:not(.editor-body) .page-head .horse-copy--cols {
    column-gap: 0.55rem;
  }

  body:not(.editor-body) .page-head .horse-copy p {
    margin: 0 0 0.22em;
  }
}

.kicker {
  margin: 0 0 0.08rem;
  color: var(--gold);
  font-size: clamp(0.64rem, 1.25cqh, 0.8rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
}

.horse-name-brand {
  flex: 0 0 auto;
  width: clamp(1.85rem, 4.6cqh, 2.45rem);
  height: clamp(1.85rem, 4.6cqh, 2.45rem);
  display: grid;
  place-items: center;
}

.horse-name-brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0;
  line-height: 0.95;
}

.horse-name {
  font-size: clamp(1.7rem, 4.4cqh, 2.25rem);
}

.sex-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.48rem;
  font-size: clamp(0.58rem, 1.15cqh, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a201c;
  background: var(--gold);
}

.note {
  margin: 0.12rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.page-story,
.horse-pedigree,
.subject-facts,
.horse-pedigree__tree,
.mosaic {
  min-height: 0;
}

.horse-copy {
  min-width: 0;
  font-size: 0.68rem;
  line-height: 1.38;
}

.horse-copy p {
  margin: 0 0 0.4em;
}

.horse-copy p:last-child {
  margin-bottom: 0;
}

.mosaic {
  display: grid;
  gap: 0.09in;
  min-height: 0;
  min-width: 0;
  height: 100%;
  background: transparent;
}

.mosaic--1 {
  grid-template-columns: 1fr;
}

.mosaic--2 {
  grid-template-columns: 1.12fr 0.88fr;
}

.mosaic--3 {
  grid-template-columns: 1.48fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.mosaic--3 .mosaic__cell--lead {
  grid-row: 1 / span 2;
}

.mosaic--4 {
  grid-template-columns: 1.58fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
}

.mosaic--4 .mosaic__cell--lead {
  grid-row: 1 / span 3;
}

.mosaic--5 {
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.mosaic--5 .mosaic__cell--lead {
  grid-row: 1 / span 2;
}

.mosaic__cell {
  margin: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
  display: grid;
  background: var(--cream);
}

.mosaic__cell img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  object-position: var(--photo-x, 50%) var(--photo-y, 38%);
  transform: scale(var(--photo-zoom, 1));
  transform-origin: var(--photo-x, 50%) var(--photo-y, 38%);
}

.extra-photos {
  display: grid;
  gap: 0.18rem;
  min-height: 0;
}

.extra-photos--1,
.extra-photos--2,
.extra-photos--3 {
  grid-template-rows: 1.35in;
}

.extra-photos--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.extra-photos--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.extra-photos__cell {
  margin: 0;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #1c1814;
  display: flex;
  align-items: center;
  justify-content: center;
}

.extra-photos__cell img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.extra-photos__cell figcaption {
  position: absolute;
  left: 0.35rem;
  bottom: 0.28rem;
  color: rgba(246, 241, 230, 0.78);
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.horse-pedigree {
  grid-area: pedigree;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  container-type: size;
  --pedigree-paternal: #2f6f6a;
  --pedigree-maternal: #7a3b45;
}

.horse-pedigree__layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(9.2rem, 0.3fr) minmax(0, 1fr);
  gap: 0.22rem;
  align-items: stretch;
}

.subject-facts {
  margin: 0;
  min-width: 0;
  min-height: 0;
  padding: 0.08rem 0.22rem 0.08rem 0.24rem;
  background: #fffaf2;
  border: 1px solid rgba(198, 161, 91, 0.28);
  border-left: 3px solid var(--gold);
  display: flex;
  flex-direction: column;
  container-type: size;
}

.subject-facts__title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.12rem;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid rgba(198, 161, 91, 0.35);
}

.subject-facts__brand {
  flex: 0 0 auto;
  width: clamp(1.85rem, 16cqh, 2.7rem);
  height: clamp(1.85rem, 16cqh, 2.7rem);
  display: grid;
  place-items: center;
}

.subject-facts__brand img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.subject-facts__name {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(0.78rem, 8.4cqh, 1.02rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--ink);
}

.subject-facts dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1 1 auto;
  min-height: 0;
  gap: 0;
}

.subject-facts__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.12rem 0.4rem;
  align-items: baseline;
  padding: 0.04rem 0;
  border-top: 1px solid rgba(198, 161, 91, 0.22);
  min-width: 0;
}

.subject-facts__row:first-child {
  border-top: 0;
  padding-top: 0.04rem;
}

.subject-facts__row:last-child {
  padding-bottom: 0;
}

.subject-facts__row dt {
  margin: 0;
  color: var(--gold);
  font-size: clamp(0.52rem, 4.6cqh, 0.64rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}

.subject-facts__row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 6.6cqh, 0.98rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  line-height: 1.12;
  overflow-wrap: break-word;
  text-align: right;
}

.subject-facts__row--breeder {
  align-items: start;
}

.subject-facts__row--breeder dd {
  font-family: var(--font-body);
  font-size: clamp(0.58rem, 5cqh, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: normal;
}

.subject-facts__alt {
  display: inline;
  margin-left: 0.28em;
  font-family: var(--font-body);
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.horse-pedigree__tree {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0.06rem;
  min-height: 0;
  min-width: 0;
}

.horse-pedigree__gen {
  display: grid;
  gap: 0.06rem;
  min-width: 0;
  min-height: 0;
}

.horse-pedigree__gen--parents {
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.horse-pedigree__gen--grandparents {
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.horse-pedigree__gen--greats {
  grid-template-rows: repeat(8, minmax(0, 1fr));
}

.pedigree-node {
  min-width: 0;
  min-height: 0;
  padding: 0.04rem 0.1rem 0.04rem 0.12rem;
  background: #fffaf2;
  border: 1px solid var(--line);
  border-left-width: 3px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  container-type: size;
}

.pedigree-node--paternal {
  border-left-color: var(--pedigree-paternal);
}

.pedigree-node--maternal {
  border-left-color: var(--pedigree-maternal);
}

.pedigree-node--empty {
  opacity: 0.45;
}

.pedigree-node__role {
  margin: 0 0 0.04rem;
  font-size: clamp(0.52rem, 12cqh, 0.64rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.15;
}

.pedigree-node__main {
  display: flex;
  align-items: center;
  gap: 0.28em;
  min-width: 0;
}

.pedigree-node__brand {
  flex: 0 0 auto;
  width: clamp(1.9rem, 58cqh, 3.15rem);
  height: clamp(1.9rem, 58cqh, 3.15rem);
  display: grid;
  place-items: center;
}

.pedigree-node--md .pedigree-node__brand {
  width: clamp(1.5rem, 62cqh, 2.35rem);
  height: clamp(1.5rem, 62cqh, 2.35rem);
}

.pedigree-node--sm .pedigree-node__brand {
  width: clamp(1.2rem, 86cqh, 1.7rem);
  height: clamp(1.2rem, 86cqh, 1.7rem);
}

.pedigree-node__brand img,
.pedigree-node__brand-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pedigree-node__text {
  min-width: 0;
  overflow: hidden;
}

.pedigree-node__name {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(0.58rem, 28cqh, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pedigree-node--sm {
  padding: 0.08rem 0.1rem 0.08rem 0.12rem;
}

.pedigree-node--sm .pedigree-node__name {
  font-size: clamp(0.56rem, 40cqh, 0.7rem);
}

.pedigree-node--md .pedigree-node__name {
  font-size: clamp(0.58rem, 26cqh, 0.74rem);
}

.pedigree-node--lg .pedigree-node__name {
  font-size: clamp(0.7rem, 18cqh, 0.95rem);
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.pedigree-node__nin,
.pedigree-node__breeder {
  margin: 0.06em 0 0;
  font-size: clamp(0.52rem, 12cqh, 0.66rem);
  line-height: 1.15;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pedigree-node__breeder span {
  display: inline;
  margin-right: 0.28em;
  color: var(--gold);
  font-size: 0.92em;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page--gallery .photo-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #111;
}

.page--gallery .photo-grid__cell {
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #1c1814;
  display: grid;
  place-items: center;
}

.page--gallery .photo-grid__cell img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.page--gallery .photo-grid__cell figcaption {
  position: absolute;
  left: 0.5rem;
  bottom: 0.45rem;
  color: rgba(246, 241, 230, 0.75);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.cover {
  position: relative;
  width: min(100%, calc(var(--page-w) * 0.72));
  aspect-ratio: 11 / 8.5;
  background: var(--green);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--cover-top) var(--cover-side) var(--cover-bottom);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.cover__logo {
  width: min(2.4in, 36%);
  height: auto;
  align-self: flex-start;
  filter: brightness(0) invert(1);
}

.cover--back {
  position: relative;
  align-items: center;
  justify-content: center;
}

.cover--back .cover__logo {
  align-self: center;
  width: min(4.2in, 52%);
}

.cover__edition {
  display: none;
}

.page[data-cover-panel] {
  width: min(100%, calc(var(--page-w) * 0.72));
  height: auto;
  aspect-ratio: 11 / 8.5;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.page--inside-cover {
  display: grid;
  align-content: center;
  justify-items: start;
  padding: 0.7in 0.9in;
  background: var(--cream);
}

.inside-cover {
  max-width: 7.4in;
}

.inside-cover__copy {
  max-width: 24em;
}

.inside-cover__copy p {
  margin: 0 0 0.85em;
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 2.1cqh, 1.12rem);
  line-height: 1.45;
  color: var(--ink);
}

.inside-cover__copy p:last-of-type {
  margin-bottom: 0;
}

.inside-cover__marks {
  display: flex;
  align-items: center;
  gap: 0.5in;
  margin-top: 1.2em;
}

.inside-cover__assoc {
  display: flex;
  align-items: center;
  gap: 0.16in;
  min-width: 0;
}

.inside-cover__assoc-name {
  margin: 0;
  display: grid;
  gap: 0.12em;
  font-family: var(--font-body);
  font-size: 0.128in;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.012em;
  color: var(--ink);
}

.inside-cover__assoc-name span {
  display: block;
  white-space: nowrap;
}

.inside-cover__mark {
  display: block;
  width: auto;
}

.inside-cover__mark--apsl {
  height: 0.72in;
}

.inside-cover__mark--usla {
  height: 0.58in;
}

.cover__brand {
  display: flex;
  align-items: center;
  gap: 0.23in;
  align-self: flex-start;
  max-width: min(8.2in, 92%);
  color: var(--gold);
}

.cover__mark {
  width: 1.4in;
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.cover__wordmark {
  display: grid;
  gap: 0.08in;
  justify-items: start;
  min-width: 0;
  padding-top: 0.05in;
}

.cover__name,
.cover__tagline {
  margin: 0;
  text-align: left;
  white-space: nowrap;
  color: var(--gold);
}

.cover__name {
  font-family: var(--font-lockup);
  font-size: 0.39in;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: none;
}

.cover__tagline {
  font-family: var(--font-body);
  font-size: 0.19in;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: none;
  margin-left: 0.09in;
}

.cover__foot {
  display: grid;
  gap: 0.15rem;
}

.cover .page-folio {
  color: var(--gold);
}

.cover__foot p {
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--gold);
}

.cover h1 {
  margin: 0.15rem 0 0;
  font-size: 3rem;
  color: var(--cream);
}

.cover .tag {
  margin-top: 0.45rem;
  letter-spacing: 0.18em;
  color: rgba(246, 241, 230, 0.7);
}

.hidden {
  display: none !important;
}

html.is-print,
html.is-print body {
  margin: 0;
  background: #fff;
  min-height: 0;
}

@media (max-width: 900px), (max-height: 900px) and (orientation: landscape) {
  body:not(.editor-body) .chrome,
  body:not(.editor-body) .scrub {
    display: none;
  }

  body:not(.editor-body) .page-arrows {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 8;
    pointer-events: none;
  }

  body:not(.editor-body) .page-arrows__btn {
    pointer-events: auto;
  }

  body:not(.editor-body) .stage {
    padding: 0;
    align-items: stretch;
  }

  html.is-embed body:not(.editor-body):not(.is-mobile-book) .stage {
    padding: 0.45rem 2.4rem;
    min-height: 100%;
    height: 100%;
    align-items: center;
  }

  html.is-embed body:not(.editor-body):not(.is-mobile-book) .spread {
    width: min(100%, calc((100vh - 0.9rem) * 22 / 8.5));
    max-height: calc(100vh - 0.9rem);
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  body:not(.editor-body) {
    min-height: 100dvh;
    overflow: auto;
    background: #000;
  }

  body:not(.editor-body) .stage {
    display: block;
    min-height: 100dvh;
    overflow: visible;
    background: #000;
  }

  body:not(.editor-body) .phone-profile {
    width: 100%;
    max-width: 40rem;
    margin: 0 auto;
    padding: 0 0 2.4rem;
    background: #000;
    color: #fff;
  }

  body:not(.editor-body) .phone-hero {
    margin: 0;
    background: #111;
    cursor: pointer;
  }

  body:not(.editor-body) .phone-hero img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 62dvh;
    object-fit: contain;
    object-position: 50% 50%;
    transform: none;
  }

  body:not(.editor-body) .phone-card {
    margin: 0.7rem 0.85rem 0;
    padding: 0.85rem 0.95rem 0.95rem;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
  }

  body:not(.editor-body) .phone-profile__name,
  body:not(.editor-body) .phone-card__name {
    margin: 0 0 0.55rem;
    font-family: var(--font-brand);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
  }

  body:not(.editor-body) .phone-card__label {
    margin: 0 0 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9a9a9a;
  }

  body:not(.editor-body) .phone-card__copy {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: #fff;
  }

  body:not(.editor-body) .phone-facts {
    margin: 0;
  }

  body:not(.editor-body) .phone-facts__row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.4rem 1rem;
    align-items: baseline;
    padding: 0.42rem 0;
    border-top: 1px solid #2f2f2f;
  }

  body:not(.editor-body) .phone-facts__row:first-child {
    border-top: 0;
    padding-top: 0;
  }

  body:not(.editor-body) .phone-facts__row dt {
    margin: 0;
    color: #9a9a9a;
    font-size: 0.78rem;
  }

  body:not(.editor-body) .phone-facts__row dd {
    margin: 0;
    text-align: right;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
  }

  body:not(.editor-body) .phone-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px;
    margin: 0.7rem 0 0;
  }

  body:not(.editor-body) .phone-grid__cell {
    margin: 0;
    padding: 0;
    border: 0;
    background: #111;
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
  }

  body:not(.editor-body) .phone-grid__cell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
  }

  body:not(.editor-body) .phone-pedigree {
    margin: 1.1rem 0.85rem 0;
  }

  body:not(.editor-body) .phone-pedigree__title {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 600;
    color: #fff;
  }

  body:not(.editor-body) .phone-card--subject {
    margin: 0 0 0.7rem;
  }

  body:not(.editor-body) .phone-card__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.6rem;
    margin: 0 0 0.45rem;
  }

  body:not(.editor-body) .phone-card__brand {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
  }

  body:not(.editor-body) .phone-card__brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: invert(1);
  }

  body:not(.editor-body) .phone-card__name {
    margin: 0;
    flex: 1 1 auto;
  }

  body:not(.editor-body) .phone-card__sex {
    padding: 0.18rem 0.4rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #111;
    background: var(--gold);
  }

  body:not(.editor-body) .phone-tree {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.7rem 0 0;
  }

  body:not(.editor-body) .phone-tree__pair {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 0.4rem;
    align-items: stretch;
  }

  body:not(.editor-body) .phone-tree__pair > .pedigree-node--lg {
    height: 100%;
  }

  body:not(.editor-body) .phone-tree__branch {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node {
    height: auto;
    min-height: 0;
    padding: 0.55rem 0.6rem;
    overflow: visible;
    container-type: normal;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #fff;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node__role {
    font-size: 0.62rem;
    color: #9a9a9a;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node__nin,
  body:not(.editor-body) .phone-pedigree .pedigree-node__breeder {
    font-size: 0.68rem;
    color: #9a9a9a;
    white-space: normal;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node__name {
    font-size: 0.92rem;
    color: #fff;
    white-space: normal;
    overflow: visible;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node--md .pedigree-node__name {
    font-size: 0.8rem;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node--sm .pedigree-node__name {
    font-size: 0.72rem;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node__brand {
    width: 2.1rem;
    height: 2.1rem;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node--md .pedigree-node__brand {
    width: 1.7rem;
    height: 1.7rem;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node--sm .pedigree-node__brand {
    width: 1.25rem;
    height: 1.25rem;
  }

  body:not(.editor-body) .phone-pedigree .pedigree-node__brand img {
    filter: invert(1);
  }

  body:not(.editor-body) .phone-profile--photos .phone-name {
    position: static;
    margin: 0.8rem 0.85rem 0;
    text-align: left;
    color: #fff;
    text-shadow: none;
  }
}

@media (max-width: 900px) and (orientation: landscape), (max-height: 900px) and (orientation: landscape) {
  body:not(.editor-body) {
    min-height: 100dvh;
    overflow: hidden;
  }

  body:not(.editor-body) .stage {
    min-height: 100dvh;
  }

  body:not(.editor-body) .spread--phone {
    width: 100%;
    height: 100dvh;
    aspect-ratio: auto;
    box-shadow: none;
  }

  body:not(.editor-body) .page--phone {
    width: 100%;
    height: 100%;
    background: #0f1411;
  }

  body:not(.editor-body) .page--phone .photo {
    background: #0f1411;
  }

  body:not(.editor-body) .page--phone .photo img {
    object-fit: contain;
    object-position: 50% 50%;
    transform: none;
  }

  body:not(.editor-body) .phone-name {
    position: absolute;
    left: 3.1rem;
    right: 3.1rem;
    bottom: 1rem;
    z-index: 2;
    margin: 0;
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.04em;
    color: var(--cream);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
    pointer-events: none;
  }

  body:not(.editor-body) .pedigree-open {
    display: block;
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    z-index: 9;
    margin: 0;
    padding: 0.4rem 0.7rem;
    font: inherit;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(21, 32, 24, 0.62);
    border: 1px solid rgba(198, 161, 91, 0.5);
  }
}

.pedigree-dialog {
  display: none;
}

.pedigree-dialog[open] {
  display: flex;
  flex-direction: column;
  width: min(96vw, 74rem);
  height: min(92dvh, 46rem);
  max-width: none;
  max-height: none;
  padding: 0.7rem 0.8rem 0.9rem;
  border: 1px solid rgba(198, 161, 91, 0.45);
  background: var(--cream);
  color: var(--ink);
}

.pedigree-dialog::backdrop {
  background: rgba(12, 16, 14, 0.72);
}

.pedigree-dialog__bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.45rem;
}

.pedigree-dialog__close {
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid rgba(198, 161, 91, 0.45);
  padding: 0.28rem 0.65rem;
}

.pedigree-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
}

.pedigree-dialog .horse-pedigree {
  height: 100%;
}

.photo-view {
  display: none;
}

.photo-view[open] {
  display: block;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0f1411;
}

.photo-view::backdrop {
  background: #0f1411;
}

.photo-view__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 50%;
}

.photo-view__close {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  margin: 0;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(21, 32, 24, 0.62);
  border: 1px solid rgba(198, 161, 91, 0.5);
}

.photo-view__name {
  position: absolute;
  left: 3.1rem;
  right: 3.1rem;
  bottom: 1rem;
  z-index: 2;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

body.is-photo-view .page-arrows {
  display: none;
}

.pedigree-open {
  display: none;
}

@media (max-width: 900px), (max-height: 900px) and (orientation: landscape) {
  body:not(.editor-body) .pedigree-dialog[open] {
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    margin: 0;
    padding: 0.55rem 0.55rem 0.7rem;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  body:not(.editor-body) .pedigree-dialog .horse-pedigree__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  body:not(.editor-body) .pedigree-dialog .subject-facts {
    max-height: 28%;
  }
}

.is-print .pedigree-dialog {
  display: none !important;
}

.is-print .chrome,
.is-print .scrub,
.is-print .page-arrows,
.is-print .photo-view {
  display: none;
}

.is-print .stage {
  display: block;
  padding: 0;
  width: var(--sheet-w);
}

@media print {
  .chrome,
  .scrub,
  .page-arrows,
  .pedigree-dialog,
  .photo-view {
    display: none;
  }

  body {
    background: white;
  }

  .stage {
    padding: 0;
    display: block;
  }

  .spread,
  .cover {
    box-shadow: none;
    width: var(--page-w);
    height: var(--page-h);
    aspect-ratio: auto;
    page-break-after: always;
    break-after: page;
  }

  .spread {
    width: calc(var(--page-w) * 2);
    height: var(--page-h);
  }

  @page {
    size: 11in 8.5in landscape;
    margin: 0;
  }

  html.is-print .spread,
  html.is-print .cover,
  html.is-print .sheet .cover,
  html.is-print .sheet .page {
    width: 100%;
    height: 100%;
    page-break-after: auto;
    break-after: auto;
  }

  html.is-print .sheet {
    page-break-after: always;
    break-after: page;
  }
}
