@font-face {
  font-family: "Agenda";
  src:
    url("/assets/fonts/agenda-4.woff2") format("woff2"),
    url("/assets/fonts/agenda-4.woff") format("woff");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Agenda";
  src:
    url("/assets/fonts/agenda-6.woff2") format("woff2"),
    url("/assets/fonts/agenda-6.woff") format("woff");
  font-style: italic;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Agenda";
  src:
    url("/assets/fonts/agenda-12.woff2") format("woff2"),
    url("/assets/fonts/agenda-12.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --footer: var(--brand-dark);
  --footer-muted: var(--brand-dark-muted);
  --shadow: 0 16px 36px rgb(48 38 24 / 10%);
  --shell: 1420px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-kerning: none;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgb(72 55 30 / 2.5%) 0.65px, transparent 0.65px);
  background-size: 4px 4px;
  content: "";
  pointer-events: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

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

h1,
h2,
h3 {
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.08;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(2.45rem, 5vw, 5.2rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(1.7rem, 2.7vw, 2.75rem);
  letter-spacing: -0.02em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
}

.shell {
  width: min(calc(100% - 88px), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  max-width: calc(100vw - 24px);
  padding: 10px 16px;
  overflow-wrap: anywhere;
  background: var(--ink);
  color: white;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.skip-link:focus {
  clip-path: inset(0);
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.kicker,
.footer-grid strong,
.availability {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.kicker {
  margin-bottom: 22px;
}

.lead {
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.68;
}

.preline {
  white-space: pre-line;
}

.text-link,
.back-link {
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 52%, transparent);
}

.text-link span {
  display: inline-block;
  transition: transform 160ms ease;
}

.text-link:hover span {
  transform: translateX(4px);
}

.button,
.catalog-submit {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button--accent {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button--dark {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.button--quiet {
  border-color: var(--line);
  background: var(--surface);
}

.button--block {
  width: 100%;
}

.button:hover,
.catalog-submit:hover {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: white;
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgb(244 239 229 / 96%);
}

.site-header__inner {
  display: grid;
  min-height: 136px;
  align-items: center;
  grid-template-areas:
    ". brand cart"
    ". nav .";
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: 82px 54px;
}

.brand {
  grid-area: brand;
  align-self: end;
  transition: transform 180ms ease;
}

.brand img {
  width: 299px;
  height: 44px;
  object-fit: contain;
}

.brand:hover {
  transform: translateY(-2px);
}

.main-nav {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3vw, 48px);
  grid-area: nav;
}

.main-nav a {
  position: relative;
  display: grid;
  height: 100%;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}

.main-nav a::after {
  position: absolute;
  right: 50%;
  bottom: -1px;
  left: 50%;
  height: 2px;
  background: var(--accent);
  content: "";
  transition: right 160ms ease, left 160ms ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  right: 0;
  left: 0;
}

.cart-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-self: end;
  gap: 8px;
  grid-area: cart;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.cart-link svg {
  display: none;
}

.cart-link b {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
}

.nav-toggle {
  display: none;
}

.pause-banner {
  border-top: 1px solid #dfc6a6;
  background: #f0dec5;
  color: #5e401f;
  font-size: 0.9rem;
  text-align: center;
}

.pause-banner .shell {
  padding-block: 9px;
}

.preview-banner {
  border-bottom: 1px solid #c8b27e;
  background: #f3e4b8;
  color: #4e3c17;
}

.preview-banner .shell {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-block: 6px;
}

.preview-banner p {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 0.82rem;
}

.preview-banner strong {
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.preview-banner form {
  margin: 0;
}

.preview-banner button {
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
}

.intro-section {
  display: grid;
  min-height: min(690px, calc(100svh - 136px));
  align-items: center;
  padding-top: clamp(52px, 6vw, 88px);
  padding-bottom: clamp(72px, 8vw, 124px);
  gap: clamp(42px, 7vw, 112px);
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.72fr);
}

.intro-section h1 {
  max-width: 820px;
  font-size: clamp(2.7rem, 5vw, 5.35rem);
}

.intro-section .lead {
  max-width: 650px;
  margin: 0 0 28px;
}

.intro-section__copy > * {
  animation: intro-in 700ms both cubic-bezier(0.2, 0.75, 0.25, 1);
}

.intro-section__copy > :nth-child(2) {
  animation-delay: 80ms;
}

.intro-section__copy > :nth-child(3) {
  animation-delay: 140ms;
}

.intro-section__copy > :nth-child(4) {
  animation-delay: 200ms;
}

.intro-section__art {
  width: min(100%, 500px);
  margin: 0;
  justify-self: center;
}

.intro-section__art img {
  width: 100%;
  animation: identity-in 900ms 120ms both cubic-bezier(0.2, 0.75, 0.25, 1);
}

@keyframes intro-in {
  from {
    transform: translateY(12px);
  }
}

@keyframes identity-in {
  from {
    opacity: 0;
    transform: translateY(16px) rotate(1deg);
  }
}

.catalog-section {
  padding-bottom: clamp(100px, 11vw, 172px);
}

.section-heading,
.page-heading > div {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.page-heading h1 {
  margin-bottom: 15px;
}

.section-heading h2 {
  font-size: clamp(1.85rem, 2.6vw, 2.65rem);
}

.result-count {
  flex: none;
  margin-bottom: 17px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.catalog-toolbar {
  display: grid;
  align-items: center;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 34px;
}

.filter-toggle {
  display: none;
}

.category-chips {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chips a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 7px 17px;
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.category-chips a:hover,
.category-chips a[aria-current="page"] {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.catalog-filters {
  display: grid;
  align-items: end;
  gap: 10px;
  grid-template-columns: minmax(240px, 310px) minmax(160px, 180px);
}

.catalog-filters .field--category {
  display: none;
}

@media (min-width: 761px) {
  .catalog-filters .field--sort select {
    height: 48px;
  }
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.86rem;
  font-weight: 700;
}

.field input,
.field select,
.field textarea,
.cart-item__action input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: var(--surface);
  font-size: 0.9rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.cart-item__action input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(168 64 46 / 12%);
}

.field small {
  color: var(--muted);
  font-size: 0.82rem;
}

.search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
}

.search-control input {
  min-width: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.catalog-submit {
  width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  border-color: var(--line);
  border-left: 0;
  background: var(--surface);
}

.catalog-submit svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.book-grid {
  display: grid;
  gap: clamp(48px, 5.3vw, 82px) clamp(18px, 2.6vw, 40px);
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.book-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.book-card__cover {
  display: block;
  margin-bottom: 20px;
  text-decoration: none;
}

.book-card__cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: filter 320ms ease;
}

.book-card:hover .book-card__cover img {
  filter: saturate(1.04);
}

.book-card__info {
  display: flex;
  min-height: 202px;
  flex: 1;
  flex-direction: column;
}

.availability {
  display: inline-block;
  line-height: 1.35;
}

.availability--sold_out {
  color: var(--muted);
}

.availability--upcoming {
  color: var(--muted);
}

.availability--preorder {
  color: #7a4d18;
}

.book-card h3 {
  display: -webkit-box;
  min-height: 2.32em;
  margin-bottom: 5px;
  overflow-wrap: anywhere;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-card h3 a {
  text-decoration: none;
}

.book-card h3 a:hover {
  color: var(--accent-dark);
}

.book-card__author {
  min-height: 1.4em;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-card__availability {
  display: flex;
  min-height: 64px;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  padding-top: 11px;
}

.book-card__availability .availability {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.book-card__availability .availability::before {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: #878078;
  content: "";
}

.book-card__availability .availability--in_stock::before {
  background: #4f8258;
}

.book-card__availability .availability--preorder::before {
  background: #bd7f26;
}

.book-card__availability small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.42;
}

.book-card__actions {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.book-card__actions strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.book-card__actions form {
  margin: 0;
}

.book-card__actions button {
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: transparent;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease;
}

.book-card__actions button:hover {
  background: var(--accent);
  color: white;
}

.book-card__actions button:disabled {
  border-color: #b99d92;
  background: transparent;
  color: #795f55;
  cursor: not-allowed;
}

.catalog-section + .page-heading,
.cart-page > .page-heading,
.checkout-page > .page-heading {
  width: auto;
}

.page-heading.shell {
  padding-top: clamp(76px, 9vw, 126px);
}

.page-heading > .kicker {
  margin-bottom: 18px;
}

.page-heading > div {
  margin-bottom: 28px;
}

.page-heading h1 {
  font-size: clamp(2.6rem, 5.2vw, 5rem);
}

.empty-state {
  padding-block: clamp(96px, 12vw, 180px);
  text-align: center;
}

.catalog-section .empty-state {
  padding-block: 72px;
  border-top: 1px solid var(--line);
}

.empty-state h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
}

.empty-state > p:not(.error-code) {
  max-width: 600px;
  margin: 0 auto 28px;
  color: var(--muted);
}

.error-code {
  margin-bottom: 12px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
}

.product {
  display: grid;
  padding-top: clamp(60px, 8vw, 112px);
  padding-bottom: clamp(100px, 10vw, 160px);
  gap: 70px clamp(48px, 7vw, 112px);
  grid-template-columns: minmax(0, 0.95fr) minmax(350px, 0.75fr);
}

.product__media {
  min-width: 0;
}

.product-image-button {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.product-image-button--main {
  width: min(100%, 660px);
  margin-inline: auto;
}

.product-image-button--main img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.product-image-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.placeholder-note {
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.product-gallery {
  display: grid;
  margin-top: 18px;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-gallery .product-image-button {
  width: 100%;
}

.product__buy {
  align-self: start;
  padding-top: 20px;
}

.product__buy .back-link {
  display: inline-block;
  margin-bottom: 56px;
}

.product__buy > .availability {
  margin-bottom: 18px;
}

.product__buy h1 {
  margin-bottom: 10px;
}

.product__author {
  margin-bottom: 30px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 1.3rem;
}

.product__price {
  margin-bottom: 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 700;
}

.product__price--sale {
  display: grid;
  gap: 6px;
}

.product__price--sale > span {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.product__price--sale del,
.card-price del,
.cart-item__action del {
  color: var(--muted);
  font-weight: 400;
}

.product__price--sale strong,
.card-price span {
  color: var(--accent-dark);
}

.product__price--sale small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
}

.product__lead {
  max-width: 580px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.add-form {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-block: 28px;
}

.field--quantity {
  width: 92px;
}

.add-form .button {
  flex: 1;
}

.product-topics {
  display: grid;
  gap: 9px;
  margin: 30px 0 8px;
}

.product-topics > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.product-topics > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-topics > div > span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 253 248 / 48%);
  color: var(--ink-soft);
  font-size: 0.76rem;
  line-height: 1.2;
}

.product-facts,
.product__details dl,
.order-summary dl,
.compact-dl {
  margin: 34px 0 0;
}

.product-facts > div,
.product__details dl > div,
.order-summary dl > div,
.compact-dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 13px;
  border-bottom: 1px solid var(--line);
}

.product-facts dt,
.product__details dt,
.order-summary dt,
.compact-dl dt {
  color: var(--muted);
}

.product__story {
  display: grid;
  gap: 54px;
}

.product__story section + section {
  padding-top: 50px;
  border-top: 1px solid var(--line);
}

.product__details {
  align-self: start;
  padding: 32px;
  background: var(--surface);
}

.product__details h2 {
  font-size: 1.55rem;
}

.product__details dl {
  margin-top: 12px;
  font-size: 0.9rem;
}

.product__details .funding-fact {
  display: grid;
  justify-content: stretch;
}

.funding-fact dd {
  display: grid;
  gap: 16px;
  margin: 10px 0 0;
}

.funder {
  display: grid;
  gap: 9px;
}

.funder + .funder {
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.funder img {
  width: auto;
  max-width: min(180px, 100%);
  height: auto;
  max-height: 54px;
  object-fit: contain;
  object-position: left center;
}

.funder span {
  color: var(--ink-soft);
  line-height: 1.5;
}

.image-viewer {
  width: min(94vw, 1100px);
  max-width: none;
  height: min(92vh, 900px);
  max-height: none;
  padding: 0;
  border: 0;
  background: #211f1b;
  color: white;
}

.image-viewer::backdrop {
  background: rgb(20 18 15 / 88%);
  backdrop-filter: blur(3px);
}

.image-viewer__inner {
  display: grid;
  height: 100%;
  align-items: center;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
}

.image-viewer figure {
  display: grid;
  height: 100%;
  min-height: 0;
  align-content: center;
  justify-items: center;
  padding: 34px 12px 20px;
  margin: 0;
}

.image-viewer figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100% - 44px);
  object-fit: contain;
}

.image-viewer figcaption {
  min-height: 24px;
  margin-top: 12px;
  color: rgb(255 255 255 / 72%);
  font-size: 0.82rem;
  text-align: center;
}

.image-viewer button {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 50%;
  background: rgb(255 255 255 / 8%);
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
}

.image-viewer button:hover,
.image-viewer button:focus-visible {
  background: rgb(255 255 255 / 18%);
}

.image-viewer__close {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  font-size: 1.8rem;
}

.image-viewer__previous,
.image-viewer__next {
  justify-self: center;
}

.card-price {
  display: grid;
  gap: 2px;
}

.card-price del {
  font-size: 0.75rem;
}

.cart-item__action strong {
  display: grid;
  gap: 2px;
}

.cart-item__action del {
  font-size: 0.75rem;
}

.prose {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.78;
}

.prose h2,
.prose h3 {
  color: var(--ink);
}

.rich-text > * {
  margin-bottom: 1.15em;
}

.rich-text > *:last-child {
  margin-bottom: 0;
}

.rich-text h2 {
  margin-top: 1.7em;
}

.rich-text h3 {
  margin-top: 1.45em;
}

.rich-text ul,
.rich-text ol {
  padding-left: 1.25em;
}

.rich-text li + li {
  margin-top: 0.45em;
}

.rich-text a {
  color: var(--accent-dark);
  font-weight: 700;
}

.preorder-box,
.notice {
  margin-block: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--warning);
  background: #efe2cc;
  color: #60451f;
  font-size: 0.9rem;
}

.preorder-box > *:last-child,
.notice > *:last-child {
  margin-bottom: 0;
}

.notice--success {
  border-color: var(--success);
  background: #e1ebe2;
  color: #31533a;
}

.notice--error {
  border-color: var(--error);
  background: #f2deda;
  color: #74251f;
}

.digital-included {
  margin-block: 24px;
  padding: 19px 21px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--paper));
  text-align: left;
}

.digital-included > strong {
  display: block;
  margin-bottom: 8px;
}

.digital-included ul {
  margin: 0 0 9px;
  padding-left: 1.15em;
}

.digital-included li small {
  color: var(--muted);
}

.digital-included p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.about-page,
.contact-page {
  display: grid;
  align-items: start;
  padding-block: clamp(82px, 10vw, 150px);
  gap: clamp(50px, 9vw, 150px);
  grid-template-columns: minmax(0, 0.9fr) minmax(330px, 0.7fr);
}

.about-page__story,
.contact-page > div {
  padding-top: 44px;
}

.about-page figure {
  margin: 0;
}

.about-page figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-page figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.8rem;
}

.contact-page address {
  padding: 36px;
  background: var(--surface);
  font-style: normal;
}

.contact-page address p {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.contact-page address p:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact-page address span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.text-page {
  max-width: 900px;
  padding-block: clamp(80px, 10vw, 150px);
}

.text-page h1 {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.text-page .prose {
  font-size: 1.05rem;
}

.cart-page,
.checkout-page {
  padding-block: clamp(70px, 8vw, 120px) clamp(100px, 10vw, 160px);
}

.cart-page > .page-heading,
.checkout-page > .page-heading {
  margin-bottom: 48px;
}

.cart-page > .page-heading h1,
.checkout-page > .page-heading h1 {
  margin-bottom: 0;
  font-size: clamp(2.6rem, 5vw, 4.8rem);
}

.cart-layout,
.checkout-layout {
  display: grid;
  align-items: start;
  gap: clamp(40px, 7vw, 100px);
  grid-template-columns: minmax(0, 1fr) minmax(290px, 390px);
}

.cart-items {
  margin-bottom: 24px;
  border-top: 1px solid var(--line);
}

.cart-item {
  display: grid;
  align-items: center;
  gap: 22px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 92px minmax(0, 1fr) auto;
}

.cart-item > a img {
  width: 92px;
  aspect-ratio: 3 / 4;
  object-fit: contain;
}

.cart-item h2 {
  margin-bottom: 7px;
  font-size: 1.35rem;
}

.cart-item h2 a {
  text-decoration: none;
}

.cart-item p {
  margin-bottom: 8px;
  color: var(--muted);
}

.cart-item small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.cart-item__action {
  display: grid;
  width: 108px;
  justify-items: end;
  gap: 6px;
}

.cart-item__action label {
  font-size: 0.82rem;
}

.cart-item__action input {
  width: 74px;
}

.link-button {
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-size: 0.84rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.order-summary {
  position: sticky;
  top: 24px;
  padding: 30px;
  background: var(--surface);
  box-shadow: 0 12px 32px rgb(48 38 24 / 6%);
}

.order-summary h2 {
  margin-bottom: 4px;
  font-size: 1.55rem;
}

.order-summary dl {
  margin-block: 18px 28px;
  font-size: 0.9rem;
}

.order-summary dl .total,
.compact-dl .total {
  padding-top: 18px;
  border-bottom: 0;
  font-weight: 700;
}

.order-summary dl .total dd,
.compact-dl .total dd {
  font-family: var(--sans);
  font-size: 1.35rem;
}

.checkout-form fieldset {
  padding: 0 0 36px;
  margin: 0 0 38px;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.checkout-form legend {
  width: 100%;
  margin-bottom: 24px;
  font-family: var(--sans);
  font-size: 1.55rem;
}

.checkout-form .field + .field {
  margin-top: 18px;
}

.company-invoice {
  margin-top: 24px;
}

.company-invoice__toggle.check {
  margin-bottom: 0;
  cursor: pointer;
}

.company-invoice__fields {
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 0;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.company-invoice__fields > .form-grid,
.company-invoice__fields > .field + .field,
.company-invoice__fields > .form-grid + .field {
  margin-top: 18px;
}

.company-invoice__fields label span {
  color: var(--muted);
  font-weight: 400;
}

.company-invoice__fields > small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.radio-list {
  display: grid;
  gap: 10px;
}

.radio-list label,
.check {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.radio-list input,
.check input {
  width: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--accent);
}

.payment-method-label {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.wallet-marks {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.wallet-mark {
  display: block;
  width: auto;
  flex: none;
}

.wallet-mark--apple {
  height: 21px;
}

.wallet-mark--google {
  height: 38px;
}

.check {
  margin-bottom: 22px;
}

.privacy-note {
  margin: 14px 0 22px;
  color: var(--muted);
  font-size: 0.84rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-block: 13px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.summary-item small {
  display: block;
  color: var(--muted);
}

.confirmation,
.mock-payment {
  max-width: 900px;
  padding-block: clamp(86px, 11vw, 160px);
  text-align: center;
}

.confirmation__mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin: 0 auto 24px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 1.7rem;
}

.confirmation .lead {
  max-width: 680px;
  margin-inline: auto;
}

.payment-continuation {
  max-width: 680px;
  margin: 32px auto 0;
  padding: 24px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
}

.payment-continuation p {
  margin: 0 0 18px;
}

.payment-continuation form {
  margin: 0;
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.confirmation-grid {
  display: grid;
  margin-block: 48px;
  gap: 50px;
  grid-template-columns: 1fr 1fr;
  text-align: left;
}

.confirmation-grid h2 {
  font-size: 1.55rem;
}

.download-panel {
  margin-block: 42px;
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
  text-align: left;
}

.download-panel h2 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.download-panel > p:not(.kicker) {
  color: var(--muted);
}

.download-panel ul {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.download-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  border-top: 1px solid var(--line);
  gap: 22px;
}

.download-panel li span,
.download-panel li small {
  display: block;
}

.download-panel li small {
  margin-top: 3px;
  color: var(--muted);
}

.download-panel .button {
  flex: 0 0 auto;
}

.mock-payment {
  max-width: 720px;
}

.mock-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer {
  border-top: 1px solid rgb(255 255 255 / 7%);
  background: var(--footer);
  color: #f2ede4;
}

.footer-grid {
  display: grid;
  padding-block: clamp(68px, 8vw, 104px);
  gap: clamp(40px, 7vw, 120px);
  grid-template-columns: minmax(240px, 1.35fr) repeat(3, minmax(130px, 0.75fr));
}

.footer-brand img {
  width: 224px;
  height: 32px;
  margin-bottom: 18px;
  filter: grayscale(1) brightness(0) invert(1);
  object-fit: contain;
  object-position: left center;
}

.footer-brand p {
  max-width: 280px;
  margin-bottom: 20px;
  color: var(--footer-muted);
}

.footer-brand small {
  display: block;
  max-width: 260px;
  color: #9d958a;
  white-space: pre-line;
}

.footer-grid nav,
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.footer-grid strong {
  margin-bottom: 7px;
  color: #8f877c;
  font-size: 0.75rem;
}

.footer-grid a {
  color: var(--footer-muted);
  font-size: 0.88rem;
  text-decoration: none;
}

.footer-grid a:hover,
.footer-bottom a:hover {
  color: white;
}

.footer-bottom {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgb(255 255 255 / 8%);
  color: #9d958a;
  font-size: 0.82rem;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom > div {
  display: flex;
  gap: 24px;
}

.footer-bottom a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 1199px) {
  .book-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .catalog-toolbar {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-filters {
    width: 100%;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px);
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(calc(100% - 48px), var(--shell));
  }

  .site-header__inner {
    min-height: 116px;
    grid-template-rows: 68px 48px;
  }

  .brand img {
    width: 244px;
    height: 38px;
  }

  .intro-section {
    min-height: auto;
    gap: 36px;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 0.62fr);
  }

  .main-nav {
    gap: 27px;
  }

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

  .product {
    gap: 55px 42px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  }

  .product__details {
    padding: 24px;
  }

  .cart-layout,
  .checkout-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .footer-grid {
    gap: 48px 36px;
    grid-template-columns: 1.35fr repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  h1 {
    font-size: clamp(2.25rem, 12vw, 3.75rem);
  }

  .shell {
    width: min(calc(100% - 36px), var(--shell));
  }

  .site-header__inner {
    min-height: 74px;
    grid-template-areas: "brand toggle cart";
    grid-template-columns: 1fr auto auto;
    grid-template-rows: 74px;
    gap: 8px;
  }

  .brand {
    align-self: center;
  }

  .brand img {
    width: 160px;
    height: 34px;
  }

  .nav-toggle {
    display: inline-flex;
    min-width: 46px;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    grid-area: toggle;
  }

  .nav-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .nav-toggle i,
  .nav-toggle i::before,
  .nav-toggle i::after {
    display: block;
    width: 20px;
    height: 1px;
    background: var(--ink);
    content: "";
    transition: transform 160ms ease, opacity 160ms ease;
  }

  .nav-toggle i::before {
    transform: translateY(-6px);
  }

  .nav-toggle i::after {
    transform: translateY(5px);
  }

  .nav-toggle[aria-expanded="true"] i {
    background: transparent;
  }

  .nav-toggle[aria-expanded="true"] i::before {
    transform: translateY(1px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] i::after {
    transform: rotate(-45deg);
  }

  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    padding: 14px 18px 22px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    box-shadow: 0 16px 24px rgb(46 38 28 / 9%);
  }

  .main-nav.is-open {
    display: grid;
  }

  .main-nav a {
    min-height: 48px;
    padding-inline: 4px;
    border-bottom: 1px solid var(--line);
  }

  .main-nav a::after {
    display: none;
  }

  .cart-link {
    min-width: 46px;
    justify-content: flex-end;
  }

  .cart-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .cart-link svg {
    display: block;
    width: 20px;
    height: 20px;
  }

  .cart-link b {
    min-width: 19px;
    height: 19px;
    margin-left: -9px;
    transform: translateY(-10px);
    font-size: 0.75rem;
  }

  .intro-section {
    padding-top: 64px;
    padding-bottom: 90px;
    gap: 52px;
    grid-template-columns: 1fr;
  }

  .intro-section h1 {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .intro-section__art {
    width: min(76vw, 320px);
  }

  .section-heading,
  .page-heading > div {
    align-items: baseline;
  }

  .catalog-toolbar {
    margin-bottom: 28px;
  }

  .category-chips {
    flex-wrap: nowrap;
    width: calc(100vw - 18px);
    padding-right: 18px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }

  .category-chips a {
    flex: none;
  }

  .catalog-filters {
    grid-template-columns: 1fr;
  }

  .book-grid {
    gap: 48px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-card__cover {
    margin-bottom: 14px;
  }

  .book-card__info {
    min-height: 210px;
  }

  .product {
    display: block;
    padding-top: 38px;
  }

  .product__media {
    margin-bottom: 52px;
  }

  .product__buy {
    padding-top: 0;
  }

  .product__buy .back-link {
    margin-bottom: 36px;
  }

  .product__story {
    margin-top: 80px;
  }

  .product__details {
    margin-top: 48px;
  }

  .image-viewer {
    width: 100vw;
    height: 100dvh;
  }

  .image-viewer__inner {
    align-items: end;
    padding-bottom: 14px;
    grid-template-columns: 58px minmax(0, 1fr) 58px;
  }

  .image-viewer figure {
    grid-column: 1 / 4;
    grid-row: 1;
    padding: 54px 14px 88px;
  }

  .image-viewer__previous,
  .image-viewer__next {
    z-index: 1;
    grid-row: 1;
  }

  .image-viewer__previous {
    grid-column: 1;
  }

  .image-viewer__next {
    grid-column: 3;
  }

  .about-page,
  .contact-page {
    grid-template-columns: 1fr;
  }

  .about-page__story,
  .contact-page > div {
    padding-top: 0;
  }

  .about-page figure {
    order: -1;
  }

  .cart-layout,
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }

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

  .download-panel li {
    align-items: stretch;
    flex-direction: column;
  }

  .download-panel .button {
    width: 100%;
  }

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

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .book-card__info {
    min-height: 252px;
  }

  .book-card__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .book-card__actions form,
  .book-card__actions button {
    width: 100%;
  }

  .book-card__actions button {
    min-height: 44px;
  }
}

@media (max-width: 480px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .kicker,
  .availability {
    font-size: 0.76rem;
  }

  .section-heading h2 {
    font-size: 1.65rem;
  }

  .result-count {
    font-size: 0.78rem;
  }

  .catalog-filters {
    grid-template-columns: 1fr;
  }

  .book-grid {
    gap: 43px 14px;
  }

  .book-card h3 {
    font-size: 1.1rem;
  }

  .book-card__author {
    font-size: 0.84rem;
  }

  .book-card__actions strong {
    font-size: 0.82rem;
  }

  .book-card__actions button {
    min-height: 44px;
    padding-inline: 7px;
  }

  .page-heading.shell {
    padding-top: 58px;
  }

  .page-heading > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }

  .page-heading .result-count {
    margin-top: -10px;
  }

  .add-form {
    align-items: stretch;
    flex-direction: column;
  }

  .field--quantity {
    width: 100%;
  }

  .cart-item {
    align-items: start;
    gap: 16px;
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .cart-item > a img {
    width: 74px;
  }

  .cart-item__action {
    width: auto;
    align-items: center;
    justify-content: start;
    grid-column: 2;
    grid-template-columns: auto 68px 1fr auto;
  }

  .order-summary,
  .contact-page address,
  .product__details {
    padding: 22px;
  }

  .confirmation-grid {
    gap: 36px;
  }

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

  .footer-brand {
    grid-column: auto;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding-block: 22px;
  }

  .preview-banner .shell,
  .preview-banner p {
    align-items: center;
    flex-direction: column;
    gap: 2px;
  }

  .preview-banner .shell {
    gap: 4px;
    padding-block: 9px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
