:root {
  --sand: #F5F0E6;
  --paper: #E8D8B0;
  --soil: #6B5344;
  --gold: #C9A227;
  --grass: #4A7C59;
  --muted: #9B8B7A;
  --bronze: #3D2E24;
  --spine: 13.5rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background: var(--sand);
  color: var(--bronze);
  min-height: 100vh;
}

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

.ledger {
  display: grid;
  grid-template-columns: var(--spine) minmax(0, 1fr);
  min-height: 100vh;
}

.ledger-spine {
  background: var(--soil);
  color: var(--sand);
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100vh;
  border-right: 4px solid var(--gold);
}

.spine-mark {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.spine-sub {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
}

.spine-index {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
}

.spine-index a {
  color: var(--sand);
  text-decoration: none;
  font-family: system-ui, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.2rem;
}

.spine-index a:hover,
.spine-index a.is-here {
  border-bottom-color: var(--gold);
  color: var(--gold);
}

.ledger-sheet {
  padding: 2.5rem 8vw 4rem;
  background:
    linear-gradient(180deg, var(--sand) 0%, var(--paper) 100%);
}

.kicker {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.kicker-right { text-align: right; }

.type-mast {
  padding: 3rem 0 4.5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--soil) 25%, transparent);
}

.type-mast h1 {
  font-size: clamp(3.4rem, 9vw, 7.2rem);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--bronze);
}

.deck {
  margin-top: 1.4rem;
  max-width: 36rem;
  margin-left: auto;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--soil);
}

.steps-band { padding: 3.5rem 0 2rem; }

.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.step-list li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed color-mix(in srgb, var(--soil) 35%, transparent);
}

.step-num {
  font-family: system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 650;
  color: var(--gold);
}

.step-list h2 {
  font-size: 1.45rem;
  margin-bottom: 0.4rem;
}

.step-list p {
  font-family: system-ui, sans-serif;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--soil);
}

.finds-band { padding: 2.5rem 0 3rem; }

.band-title {
  text-align: right;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.polaroid-scatter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 1.1rem;
  padding: 1.5rem 0.5rem 2rem;
}

.polaroid {
  background: #faf6ec;
  padding: 0.55rem 0.55rem 1.6rem;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--bronze) 18%, transparent);
}

.polaroid img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.polaroid figcaption {
  font-family: system-ui, sans-serif;
  font-size: 0.72rem;
  text-align: center;
  margin-top: 0.7rem;
  color: var(--muted);
}

.rot-a { transform: rotate(-4deg); }
.rot-b { transform: rotate(3deg); margin-top: 1.4rem; }
.rot-c { transform: rotate(-2deg); }
.rot-d { transform: rotate(5deg); margin-top: 0.6rem; }
.rot-e { transform: rotate(-3deg); }
.rot-f { transform: rotate(2deg); margin-top: 1.1rem; }

.plates-band { padding: 1rem 0 3rem; }

.plates {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 0.75rem;
  margin-top: 1rem;
}

.plates img:first-child {
  grid-row: 1 / 3;
  height: 100%;
  object-fit: cover;
  min-height: 280px;
}

.plates img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  filter: saturate(0.9);
}

.legal-sheet {
  margin-top: 1rem;
  background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--soil) 30%, transparent);
  box-shadow: 0 -12px 40px color-mix(in srgb, var(--bronze) 12%, transparent);
  padding: 2.4rem 1.6rem 2.8rem;
  display: grid;
  gap: 2.2rem;
}

.legal-sheet h2 {
  font-size: 1.35rem;
  margin-bottom: 0.7rem;
}

.legal-sheet p {
  font-family: system-ui, sans-serif;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--soil);
}

.legal-sheet a { color: var(--grass); }

@media (max-width: 860px) {
  .ledger { grid-template-columns: 1fr; }
  .ledger-spine {
    position: static;
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.2rem;
    padding: 1rem 1.1rem;
  }
  .spine-index {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 0;
    gap: 0.75rem 1rem;
  }
  .ledger-sheet { padding: 1.6rem 1.15rem 3rem; }
  .polaroid-scatter { grid-template-columns: 1fr 1fr; }
  .plates { grid-template-columns: 1fr; }
  .plates img:first-child { grid-row: auto; min-height: 180px; }
  .type-mast h1 { font-size: 3.1rem; }
  .deck { margin-left: 0; }
}

@media (max-width: 520px) {
  .polaroid-scatter { grid-template-columns: 1fr; }
  .step-list li { grid-template-columns: 3rem 1fr; }
}
