/* Home page: the book's cover and contents (atlas.html, es.html, ru.html, generated
   by site-home.js). Layout only; components come from system.css.
   Round 3: the hero is set like the printed cover. Heavy poster capitals, the drawing
   sheet in a double frame, the red wedge across it, and two-digit chapter numerals. */
main > section {
  margin-block: var(--space-8);
}
main > section:first-child {
  margin-top: var(--space-6);
}

/* ---------- Cover ---------- */
.book-hero {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
@media (min-width: 900px) {
  .book-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}
.book-hero .eyebrow,
.one-sheet .eyebrow {
  color: var(--color-poster);
  font-family: var(--font-poster);
  letter-spacing: var(--tracking-signage);
}
.book-hero h1 {
  width: min-content;
  max-width: 100%;
  margin: var(--space-3) 0 0;
  font-family: var(--font-poster);
  font-size: var(--text-hero);
  font-weight: var(--weight-ultra);
  letter-spacing: var(--tracking-poster);
  line-height: var(--leading-poster);
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.book-hero .lede {
  margin-block: var(--space-4) var(--space-5);
  color: var(--color-text);
}
.book-hero .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
}
.book-hero .hint {
  margin-top: var(--space-4);
}
/* The cover card is a drawing sheet: a heavy frame, a hairline inside it, the red wedge. */
.book-cover {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-3);
  min-height: 22rem;
  margin: 0;
  padding: var(--space-6) var(--space-5) var(--space-5);
  border: var(--line-strong) solid var(--color-text);
  outline: var(--line-hair) solid var(--color-text);
  outline-offset: calc(-1 * var(--space-2));
  box-shadow: var(--shadow-sheet);
}
.book-cover::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-poster);
  clip-path: polygon(0 78%, 0 96%, 100% 34%, 100% 16%);
}
.book-cover-title {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-poster);
  font-size: var(--text-lg);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-signage);
  text-transform: uppercase;
}
.book-cover-art {
  display: grid;
  place-items: center;
}
.book-cover-art img {
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
}
.book-cover figcaption {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  border-top: var(--line-strong) solid var(--color-text);
  background: var(--color-surface);
}
.book-cover figcaption > span:first-child {
  display: grid;
}
.book-cover small {
  color: var(--color-poster);
  font-family: var(--font-poster);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-signage);
  text-transform: uppercase;
}
.book-cover strong {
  font-family: var(--font-poster);
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-poster);
}
.book-cover i {
  color: var(--color-text-muted);
  font-family: var(--font-text);
}
.book-cover .turn {
  display: flex;
  gap: var(--space-2);
}
.book-cover .turn button {
  min-width: var(--size-target);
  min-height: var(--size-target);
  border: var(--line-control) solid var(--color-border);
  border-radius: var(--radius-round);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  cursor: pointer;
}

/* ---------- Contents ---------- */
.contents h2,
.one-sheet h2,
.home-notes h2 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-poster);
  font-size: var(--text-2xl);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-poster);
  line-height: var(--leading-tight);
}
.contents h2 {
  font-size: var(--text-poster);
}
.contents-list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--space-1) solid var(--color-text);
}
.contents-chapter {
  display: grid;
  grid-template-columns: calc(var(--space-9) + var(--space-6)) minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-5);
  border-bottom: var(--line-hair) solid var(--color-text);
}
.contents-number {
  white-space: nowrap;
  color: var(--color-poster);
  font-family: var(--font-poster);
  font-size: var(--text-3xl);
  font-weight: var(--weight-heavy);
  letter-spacing: var(--tracking-poster);
  line-height: var(--leading-poster);
}
.contents-chapter h3 {
  margin: 0;
  font-family: var(--font-poster);
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-poster);
}
@media (max-width: 36rem) {
  .contents-chapter {
    grid-template-columns: var(--space-8) minmax(0, 1fr);
    gap: var(--space-3);
  }
  .contents-number {
    font-size: var(--text-2xl);
  }
  .contents-chapter h3 {
    font-size: var(--text-lg);
  }
}
.contents-chapter h3 a {
  color: var(--color-text);
  text-decoration-thickness: var(--line-hair);
  text-underline-offset: 0.2em;
}
.contents-chapter h3 a:hover {
  color: var(--color-text-link);
}
.contents-chapter p {
  margin: var(--space-2) 0 0;
  color: var(--color-text-muted);
  max-width: var(--measure);
}
.contents-plates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
}
.contents-plate {
  display: grid;
  gap: var(--space-2);
  min-height: var(--size-target);
  padding: var(--space-3);
  border: var(--line-hair) solid var(--color-rule);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
}
.contents-plate:hover {
  border-color: var(--color-selected);
}
.contents-plate img {
  width: 100%;
  height: 5.5rem;
  object-fit: contain;
}
.contents-plate span {
  font-family: var(--font-poster);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}
.contents-plate small {
  color: var(--color-poster);
  font-family: var(--font-poster);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

/* ---------- Chapter 1 and notes ---------- */
.one-sheet,
.home-notes {
  display: grid;
  gap: var(--space-7);
}
@media (min-width: 900px) {
  .one-sheet,
  .home-notes {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.one-sheet p,
.home-notes p {
  max-width: var(--measure);
  line-height: var(--leading-body);
}
.reading-together {
  display: grid;
  margin: 0;
}
.reading-together div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-top: var(--line-hair) solid var(--color-text);
}
.reading-together div:first-child {
  border-top: var(--space-1) solid var(--color-poster);
}
.reading-together dt {
  font-family: var(--font-poster);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-poster);
}
.reading-together dd {
  margin: 0;
}
.home-notes > div {
  padding: var(--space-5);
  border: var(--line-hair) solid var(--color-rule);
  border-top: var(--space-1) solid var(--color-text);
  background: var(--color-surface);
}
