.product-page {
  max-width: var(--page-measure);
  margin: 0 auto;
  padding: 0 var(--page-pad-x);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

.product-page [hidden] {
  display: none;
}

.product-page main,
.product-header,
.product-footer {
  max-width: none;
  margin-inline: 0;
}

.product-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: clamp(2rem, 4vw, 4rem) 0 1.75rem;
  font-family: var(--mono);
}

.product-header .name {
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.product-header nav {
  color: var(--mute);
  font-size: 0.6875rem;
}

.product-header nav a {
  color: var(--ink);
}

.product-header nav span[aria-hidden] {
  margin-inline: 0.65rem;
}

.product-page a:focus-visible,
.product-page summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 1rem;
  transform: translateY(-150%);
  padding: 0.5rem 1rem;
  background: var(--paper);
  z-index: 2;
}

.skip-link:focus {
  transform: none;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 23rem) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding-block: 2rem;
}

.product-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
}

.product-art > .book-object {
  align-self: flex-start;
}

.product-art .physical-spec {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.product-art figcaption {
  align-self: stretch;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding: 0;
  flex-wrap: wrap;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.625rem;
}

.product-summary h1 {
  margin: 0.5rem 0 0.75rem;
  font-family: var(--serif-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.product-description {
  max-width: 31rem;
  color: var(--mute);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.release-status {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.release-status::before {
  content: "○";
  margin-right: 0.5rem;
  color: var(--mute);
}

.purchase {
  margin-top: 1.25rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--rule);
}

.bundle-label { padding: 0; max-width: 25rem; }
.bundle-label strong { display: block; margin-top: 0.25rem; font-size: 0.9375rem; font-weight: 500; }
.bundle-label p { margin-top: 0.25rem; color: var(--mute); font-size: 0.75rem; }
.purchase-action { width: 100%; border: 0; font-family: var(--sans); }
.purchase-action:disabled { cursor: not-allowed; background: transparent; border: 1px solid var(--rule); color: var(--mute); }
.related-titles strong { font-family: var(--serif-display); }

.purchase fieldset {
  border: 0;
  min-width: 0;
}

.purchase legend {
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.format-option {
  display: grid;
  grid-template-columns: 0.875rem minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  padding: 0.875rem;
  border: 1px solid var(--rule);
  cursor: pointer;
}

.format-option:has(input:checked) {
  border-color: var(--ink);
  background: color-mix(in srgb, var(--ink) 3%, var(--paper));
}

.format-option input {
  margin-top: 0.25rem;
  accent-color: var(--ink);
}

.format-option strong,
.format-name,
.format-detail {
  display: block;
}

.format-name {
  font-size: 0.75rem;
}

.format-option strong {
  margin-block: 0.35rem 0.1rem;
  font-size: 1.125rem;
  line-height: 1.35;
  font-weight: 500;
}

.format-detail,
.purchase-note,
.purchase-status,
.purchase-unavailable {
  font-size: 0.75rem;
  color: var(--mute);
}

.purchase-note {
  margin-top: 0.75rem;
}

.purchase-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  max-width: 25rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8125rem;
  transition: background 160ms ease;
}

.purchase-action:visited {
  color: var(--paper);
}

.purchase-action:hover {
  background: var(--orange);
  color: var(--paper);
}

.purchase-status {
  margin-top: 0.5rem;
}

.purchase-unavailable {
  border: 1px solid var(--rule);
  padding: 0.875rem;
  margin-top: 1rem;
}

.product-section {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--rule);
}

.product-section > h2 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.65;
}

.editorial-copy {
  max-width: 40rem;
}

.editorial-copy p + p {
  margin-top: 1.25rem;
}

.intro-copy {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
}

.editorial-copy .editorial-note {
  color: var(--mute);
  font-size: 0.75rem;
}

.section-title {
  max-width: 35rem;
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: 1.625rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.section-dek {
  margin-top: 0.75rem;
  max-width: 39rem;
  color: var(--mute);
  font-size: 0.875rem;
}

.contents-list {
  list-style: none;
  margin-top: 1.5rem;
}

.contents-list li {
  border-top: 1px solid var(--rule);
}

.contents-list summary,
.delivery-details summary {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.875rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.9375rem;
}

.contents-list summary::-webkit-details-marker,
.delivery-details summary::-webkit-details-marker {
  display: none;
}

.contents-list summary::after,
.delivery-details summary::after {
  content: "+";
  margin-left: auto;
  color: var(--mute);
}

.contents-list details[open] summary::after,
.delivery-details[open] summary::after {
  content: "−";
}

.contents-list summary:hover,
.delivery-details summary:hover {
  color: var(--orange);
}

.chapter-number {
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.6875rem;
  flex-shrink: 0;
}

.contents-list details p {
  margin: 0 0 1rem 2rem;
  color: var(--mute);
  font-size: 0.875rem;
}

.research-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.research-images img {
  display: block;
  width: 100%;
  height: auto;
}

.research-images figcaption,
.image-credit {
  margin-top: 0.625rem;
  color: var(--mute);
  font-size: 0.6875rem;
}

.image-credit a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.edition-details > div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.875rem;
}

.edition-details dt {
  color: var(--mute);
}

.delivery-details {
  margin-top: 1rem;
}

.delivery-details p {
  color: var(--mute);
  font-size: 0.8125rem;
}

.related-titles {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.related-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.related-header h2 {
  color: var(--ink);
  font-family: var(--serif-display);
  font-size: 1.375rem;
}

.related-header > a {
  font-family: var(--mono);
  font-size: 0.6875rem;
}

.related-titles ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  list-style: none;
}

.related-titles li a {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.related-titles img {
  width: 4.5rem;
  height: auto;
  flex-shrink: 0;
}

.related-titles strong,
.related-titles small {
  display: block;
}

.related-titles strong {
  font-size: 0.875rem;
  font-weight: 400;
}

.related-titles small {
  font-size: 0.75rem;
  color: var(--mute);
}

.product-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  margin-block: 3rem 0;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.6875rem;
}

@media (max-width: 699px) {
  .product-header {
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.5rem 0 1.25rem;
  }

  .product-hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 1.75rem 2rem;
    gap: 1.75rem;
  }

  .product-art {
    min-height: 0;
    padding: 0;
    width: min(100%, 23rem);
    margin-inline: auto;
  }

  .product-art > img {
    width: 100%;
  }

  .product-art figcaption {
    margin-top: 0.625rem;
  }

  .product-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    padding-block: 1.5rem;
  }

  .product-section > h2 {
    text-transform: uppercase;
  }

  .related-titles ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
  }

  .edition-details > div {
    grid-template-columns: 6rem minmax(0, 1fr);
  }
}

@media (max-width: 379px) {
  .format-option {
    padding: 0.75rem 0.5rem;
    gap: 0.5rem;
  }

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

  .product-footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .purchase-action {
    transition: none;
  }
}

.product-section,
.related-titles,
.product-footer {
  position: relative;
  border-top-color: transparent;
}

.product-section::before,
.related-titles::before,
.product-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: calc(-1 * var(--edge-bleed));
  height: 1px;
  background: var(--rule);
  pointer-events: none;
}
