:root {
  color-scheme: light;
  --paper: #f7f1e6;
  --teal: #104b4e;
  --ink: #233534;
  --muted: #4b5f5b;
  --copper: #e3ad85;
  --copper-dark: #845334;
  --rule: #d5c3af;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 1.06rem/1.65 var(--serif);
  color: var(--ink);
  background: var(--paper);
}
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, input:focus-visible + span {
  outline: 3px solid #a16440;
  outline-offset: 4px;
}
.shell { width: min(70rem, calc(100% - 3rem)); margin-inline: auto; }
.skip {
  position: absolute;
  z-index: 2;
  top: .5rem;
  left: .5rem;
  transform: translateY(-150%);
  padding: .5rem .75rem;
  background: var(--paper);
}
.skip:focus { transform: none; }
.site-header { background: var(--teal); color: var(--paper); border-bottom: 1px solid #538080; }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.header-inner { min-height: 4.5rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-variant: small-caps;
  letter-spacing: .09em;
  font-size: 1.25rem;
  white-space: nowrap;
}
nav { display: flex; gap: clamp(.6rem, 3vw, 2rem); flex-wrap: wrap; }
nav a { font: .91rem/1.5 var(--sans); text-decoration: none; padding-block: .3rem; }
nav a:hover, nav a[aria-current="page"] { border-bottom: 1px solid var(--copper); }
.eyebrow {
  font: 650 .84rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--copper-dark);
  margin: 0 0 1rem;
}
h1, h2 { margin: 0; line-height: 1.1; font-weight: 400; color: var(--teal); }
h1 { font-size: clamp(2.5rem, 6vw, 4.9rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.028em; }
p { margin: 1rem 0; }
.lead { font-size: clamp(1.17rem, 2vw, 1.5rem); line-height: 1.5; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.8rem;
  padding: .65rem 1rem;
  background: var(--teal);
  color: var(--paper);
  border: 1px solid var(--teal);
  text-decoration: none;
  font: 650 .9rem/1.25 var(--sans);
}
.button:hover { background: #1a6264; }
.button-outline { color: var(--teal); background: transparent; }
.button-outline:hover { background: #e8ede3; }
.button-copper { color: #203738; background: var(--copper); border-color: var(--copper); }
.button-copper:hover { background: #f0c09f; }
.text-link { color: var(--teal); text-underline-offset: .2em; }
.hero { background: var(--teal); color: var(--paper); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, .85fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 7rem);
  min-height: 31rem;
  padding-block: clamp(2.5rem, 6vw, 5.5rem);
}
.hero h1 { color: var(--paper); font-size: clamp(3.5rem, 9vw, 7.5rem); }
.hero .eyebrow { color: var(--copper); }
.hero .lead { max-width: 26rem; margin: 1.1rem 0 1.9rem; color: #eee5d5; }
.feature-cover {
  display: block;
  justify-self: center;
  width: min(100%, 20.3rem);
  padding: .65rem;
  border: 1px solid #b3896a;
  transform: rotate(2deg);
  box-shadow: 1rem 1.1rem 0 #0b3c3e;
}
.introduction {
  display: grid;
  grid-template-columns: minmax(10rem, .8fr) minmax(0, 1.65fr);
  gap: 2rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.introduction p { max-width: 38rem; }
.introduction .eyebrow { margin-top: .35rem; }
.prose-page { max-width: 47rem; padding-block: clamp(3rem, 7vw, 6rem); }
.prose-page .lead { max-width: 38rem; }
.prose-page p { max-width: 39rem; }
.prose-page hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.prose-page h2:not(:first-child) { margin-top: 2rem; }
.prose-page [lang="ar"] { font-size: 1.28em; color: var(--teal); }
.book-grid {
  display: grid;
  grid-template-columns: minmax(12rem, .85fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 5.25rem);
}
.book-art { padding: clamp(.75rem, 2vw, 1.7rem); background: #e8dfcf; }
.book-art img { margin-inline: auto; max-height: 32rem; width: auto; }
.book-copy h1 { font-size: clamp(2.55rem, 5.4vw, 4.8rem); }
.book-copy > p { max-width: 33rem; }
.subtitle { font-size: 1.3rem; font-style: italic; color: var(--copper-dark); margin-top: .55rem; }
.edition-picker { padding: 0; border: 0; margin: 1.75rem 0 1.4rem; min-inline-size: 0; }
.edition-picker legend {
  padding: 0;
  margin-bottom: .55rem;
  color: var(--teal);
  font: 650 .88rem/1.3 var(--sans);
}
.choices, .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices label { position: relative; cursor: pointer; }
.choices input { position: absolute; opacity: 0; }
.choices label span {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem .6rem;
  border: 1px solid var(--rule);
  font: .88rem/1.3 var(--sans);
}
.choices input:checked + span { border-color: var(--teal); background: #e5ebe1; }
.swatch { border-radius: 50%; width: .78rem; height: .78rem; display: inline-block; }
.swatch.teal { background: #104b4e; }
.swatch.midnight { background: #182237; }
.swatch.mulberry { background: #532d40; }
.metadata { color: var(--muted); font-size: .93rem; }
.reader { padding-block: 2rem 3.5rem; }
.reader-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 1.1rem;
}
.reader h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
.reader-heading p { margin: .25rem 0 0; color: var(--muted); }
.reader-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.pdf-viewer { width: 100%; height: max(34rem, 75vh); border: 1px solid var(--rule); background: #ede5d6; display: block; }
.pdf-viewer p { margin: 2rem; }
.site-footer { border-top: 1px solid var(--rule); color: var(--teal); }
.footer-inner { padding-block: 1.15rem; }
.footer-inner a { text-underline-offset: .2em; }
@media (max-width: 650px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { gap: .45rem; min-height: 0; flex-wrap: wrap; padding-block: .85rem; }
  .header-inner nav { gap: .8rem; }
  .hero-grid, .book-grid, .introduction { grid-template-columns: 1fr; gap: 1.7rem; }
  .hero-grid { min-height: 0; }
  .feature-cover { width: min(68%, 16rem); margin-bottom: .75rem; }
  .book-art { max-width: 20rem; width: 78%; margin-inline: auto; }
  .introduction .eyebrow { margin-bottom: 0; }
  .pdf-viewer { height: 70vh; }
}
