@import url("https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Libre+Baskerville:wght@400;700&family=UnifrakturCook:wght@700&display=swap");

:root {
  --paper: #f3e8cf;
  --paper-deep: #e8d9b6;
  --ink: #211910;
  --muted: #5b4736;
  --line: #2f2215;
  --accent: #7e2f1f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(126, 47, 31, 0.08), transparent 40%),
    repeating-linear-gradient(
      0deg,
      rgba(33, 25, 16, 0.03) 0px,
      rgba(33, 25, 16, 0.03) 1px,
      transparent 1px,
      transparent 32px
    ),
    linear-gradient(180deg, #d4b786, #b8905f);
  font-family: "Libre Baskerville", Georgia, serif;
}

.paper-shell {
  width: min(1220px, 96vw);
  margin: 18px auto 22px;
  padding: 16px 18px 22px;
  border: 3px double var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent 18%),
    var(--paper);
  box-shadow:
    0 16px 36px rgba(24, 18, 11, 0.35),
    inset 0 0 0 1px rgba(33, 25, 16, 0.14),
    inset 0 0 45px rgba(126, 47, 31, 0.05);
}

.masthead {
  border-top: 5px double var(--line);
  border-bottom: 5px double var(--line);
  text-align: center;
  margin-bottom: 10px;
  padding: 8px 10px 10px;
}

.masthead-topline {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead h1 {
  margin: 2px 0 4px;
  font-family: "UnifrakturCook", "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: 0.06em;
}

.meta-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.banner {
  border: 2px solid var(--line);
  border-left-width: 6px;
  border-right-width: 6px;
  padding: 9px 12px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(126, 47, 31, 0.08), rgba(126, 47, 31, 0));
}

.banner p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.front-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.sheet {
  border: 1.8px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.015));
  padding: 11px 12px;
  min-height: 130px;
}

.lead {
  grid-column: span 8;
}

.statbox {
  grid-column: span 4;
}

.front-grid .sheet:nth-child(3),
.front-grid .sheet:nth-child(4),
.front-grid .sheet:nth-child(5),
.front-grid .sheet:nth-child(6),
.front-grid .sheet:nth-child(7),
.front-grid .sheet:nth-child(8) {
  grid-column: span 6;
}

h2 {
  margin: 0 0 9px;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

h3 {
  margin: 12px 0 6px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

p {
  margin: 0 0 9px;
  line-height: 1.5;
  font-size: 0.99rem;
}

.dropcap::first-letter {
  float: left;
  font-family: "IM Fell English", Georgia, serif;
  font-size: 3rem;
  line-height: 0.9;
  margin: 2px 6px 0 0;
  color: var(--accent);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border: 1px solid rgba(47, 34, 21, 0.5);
  padding: 6px 7px;
  vertical-align: top;
}

th {
  text-align: left;
  background: rgba(47, 34, 21, 0.08);
}

.compact th,
.compact td {
  font-size: 0.84rem;
  padding: 5px 6px;
}

.edition-footer {
  margin-top: 13px;
  border-top: 3px double var(--line);
  padding-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.edition-footer p {
  margin: 4px 0;
}

@keyframes riseIn {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.reveal-1 { animation: riseIn 320ms ease-out both; }
.reveal-2 { animation: riseIn 380ms ease-out both; }
.reveal-3 { animation: riseIn 440ms ease-out both; }
.reveal-4 { animation: riseIn 500ms ease-out both; }
.reveal-5 { animation: riseIn 560ms ease-out both; }
.reveal-6 { animation: riseIn 620ms ease-out both; }
.reveal-7 { animation: riseIn 680ms ease-out both; }
.reveal-8 { animation: riseIn 740ms ease-out both; }

@media (max-width: 980px) {
  .paper-shell {
    width: min(920px, 98vw);
    padding: 10px 10px 16px;
  }

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

  .lead,
  .statbox,
  .front-grid .sheet:nth-child(3),
  .front-grid .sheet:nth-child(4),
  .front-grid .sheet:nth-child(5),
  .front-grid .sheet:nth-child(6),
  .front-grid .sheet:nth-child(7),
  .front-grid .sheet:nth-child(8) {
    grid-column: span 1;
  }

  .masthead h1 {
    letter-spacing: 0.03em;
  }

  .meta-row {
    gap: 8px 12px;
    font-size: 0.75rem;
  }
}
