:root {
  --ink: #1d1a16;
  --olive: #3c4634;
  --rust: #b85a32;
  --muted: #5c564c;
  --line: #cfc6b6;
  --paper: #f3eee4;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e7e1d6;
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.35;
}

a { color: var(--olive); }

.sheet {
  width: min(8.5in, calc(100vw - 2rem));
  min-height: 11in;
  margin: 1rem auto;
  padding: 0.55in 0.6in 0.5in;
  background: #fff;
  box-shadow: 0 8px 28px rgba(29, 26, 22, 0.12);
}

header.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  border-bottom: 3px solid var(--olive);
  padding-bottom: 0.4rem;
}

.brand {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.35rem;
  font-weight: 620;
  margin: 0;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: right;
}

h1 {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.7rem;
  font-weight: 620;
  line-height: 1.15;
  margin: 0.7rem 0 0.3rem;
}

.lead { margin: 0 0 0.7rem; max-width: 42rem; }

h2 {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0.85rem 0 0.35rem;
}

.rule {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 0.35rem 0.6rem;
  align-items: end;
  margin: 0.28rem 0;
}

.rule span { font-weight: 600; }

.line {
  border-bottom: 1px solid var(--ink);
  min-height: 1.25rem;
}

.line.tall { min-height: 2.2rem; }

.math {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.5rem;
  margin: 0.4rem 0 0.2rem;
}

.math div, .pass {
  border: 1px solid var(--line);
  padding: 0.4rem 0.5rem 0.55rem;
}

.math strong, .pass strong { display: block; font-size: 0.82rem; }

.fiction {
  margin-top: 0.7rem;
  border: 1px solid var(--rust);
  padding: 0.45rem 0.6rem 0.55rem;
}

.fiction h2 { color: var(--rust); margin-top: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.55rem;
}

.card {
  border: 2px solid var(--olive);
  padding: 0.45rem 0.55rem 0.55rem;
}

.card h2 { margin-top: 0; }

.wallet { border-style: dashed; }

.facts { margin: 0.45rem 0 0; padding-left: 1.1rem; }

.facts li { margin: 0.2rem 0; }

.fine {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.margin-note {
  margin: 0.2rem 0 0.8rem;
  padding: 0.5rem 0.65rem;
  background: var(--paper);
  font-size: 0.9rem;
}

.stack {
  margin: 0.35rem 0 0.7rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}

.back { margin: 0.6rem 6vw 0; }

@media screen and (max-width: 700px) {
  .sheet { padding: 1.1rem 1rem 1.4rem; }
  .rule { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; }
  .back { display: none; }
  .sheet {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .math { grid-template-columns: repeat(4, 1fr); }
  .cards { grid-template-columns: 1.35fr 0.85fr; }
}
