:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --ink: #181715;
  --muted: #6f6b62;
  --line: #d9d2c3;
  --paper: #fffdf7;
  --accent: #8b2f24;
  --accent-dark: #5d1f19;
  --shadow: 0 24px 70px rgba(49, 39, 26, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at 20% 10%, rgba(139, 47, 36, 0.12), transparent 28rem),
    linear-gradient(135deg, #fbfaf6 0%, var(--bg) 48%, #efe8dc 100%);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 72px 0;
  display: grid;
  align-content: center;
  gap: 40px;
}

.intro {
  max-width: 680px;
}

.eyebrow,
.status {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 8vw, 6.8rem);
  font-weight: 500;
  line-height: 0.92;
}

.lead {
  max-width: 600px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.6;
}

.library {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
}

.book {
  min-height: 260px;
  padding: 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.86);
  box-shadow: var(--shadow);
}

.book.is-active {
  position: relative;
  overflow: hidden;
}

.book.is-active::after {
  content: "";
  position: absolute;
  inset: auto 24px 24px auto;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(139, 47, 36, 0.26);
  border-radius: 50%;
  opacity: 0.38;
}

.book.is-muted {
  color: var(--muted);
  background: rgba(255, 253, 247, 0.48);
  box-shadow: none;
}

.book-mark {
  width: 76px;
  aspect-ratio: 0.72;
  padding-top: 16px;
  display: grid;
  place-items: start center;
  color: #fff7ec;
  border-radius: 4px 4px 10px 10px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-dark) 100%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  box-shadow: inset 8px 0 0 rgba(255, 255, 255, 0.1);
}

.book.is-muted .book-mark {
  color: #887d71;
  background: #e3dccf;
}

.book-copy {
  position: relative;
  z-index: 1;
}

.book-copy h2 {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 500;
  line-height: 1;
}

.book-copy p:last-child {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.start-link {
  position: relative;
  z-index: 1;
  grid-column: 2;
  width: fit-content;
  align-self: end;
  padding: 13px 18px;
  color: #fffaf1;
  border-radius: 6px;
  background: var(--ink);
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.start-link:hover,
.start-link:focus-visible {
  background: var(--accent);
  transform: translateY(-1px);
}

.start-link:focus-visible {
  outline: 3px solid rgba(139, 47, 36, 0.28);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  .shell {
    padding: 44px 0;
  }

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

@media (max-width: 560px) {
  .book {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .book-mark {
    width: 58px;
  }

  .start-link {
    grid-column: 1;
  }
}
