:root {
  --paper: #f6f0e4;
  --ink: #1c1814;
  --muted: #5c5348;
  --rule: #c4b8a8;
  --cta: #8b1e2d;
  --cta-ink: #f6f0e4;
  --folio: #efe6d4;
  --header-h: 4.25rem;
  --edge: clamp(1.75rem, 20vw, 18rem);
  --serif-d: "Fraunces", "Times New Roman", serif;
  --serif-b: "Source Serif 4", Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 3.2rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-b);
  font-size: 1.125rem;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; }

a { color: var(--cta); }
a:hover { color: var(--ink); }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: var(--edge);
  top: 0.5rem;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  padding: 0.4rem 0.7rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: var(--header-h);
  padding: 0.6rem var(--edge);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-logo { width: 9.5rem; height: auto; }

.brand-mark {
  font-family: var(--serif-d);
  font-weight: 600;
  font-size: clamp(1.05rem, 2.1vw, 1.7rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.mobile-header-cta { display: none; }

.nav-toggle {
  margin-left: auto;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--serif-d);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.nav {
  display: none;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.nav.is-open {
  display: flex;
  flex: 1 0 100%;
  flex-wrap: wrap;
  padding: 0.75rem 0 0.4rem;
  border-top: 1px solid var(--rule);
}

.nav a,
.nav summary {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
}

.nav a.is-active { border-bottom: 2px solid var(--cta); }

.nav-dropdown { position: relative; }
.nav-dropdown ul {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0;
  list-style: none;
}

.badge-18 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  border: 1px solid var(--ink);
  padding: 0.15rem 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.4rem 1rem;
  text-decoration: none;
  font-family: var(--serif-d);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
}

.btn-primary {
  background: var(--cta);
  color: var(--cta-ink);
  border-color: var(--cta);
}

.btn-primary:hover { filter: brightness(1.08); }

.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.mobile-header-cta.btn { display: none; }

.page-toc--top {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  display: none;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
  margin-left: calc(-1 * var(--edge));
  margin-right: calc(-1 * var(--edge));
  padding: 0.55rem var(--edge);
  background: var(--folio);
  border-bottom: 1px solid var(--rule);
}

.page-toc__head {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-toc__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.page-toc__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.82rem;
}

.page-toc__link:hover { transform: translateY(-1px); border-color: var(--cta); }

.page-toc__link.is-active {
  border-color: var(--cta);
  color: var(--cta);
}

.page-toc__num {
  font-family: var(--serif-d);
  font-variant-numeric: oldstyle-nums;
  color: var(--cta);
}

.anchor-nav:empty { display: none; }

#main { padding: 0 var(--edge) 3rem; }

.hero {
  padding: 2.2rem 0 1.4rem;
  border-bottom: 1px solid var(--ink);
}

.kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--serif-d);
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lede {
  margin: 0;
  max-width: none;
  font-size: 1.2rem;
}

.article-figure {
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  border-left: 4px solid var(--cta);
}

.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--ink);
}

.article-figure figcaption {
  margin: 0.45rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.section { padding: 1.75rem 0; }

.section h2 {
  margin: 0 0 0.85rem;
  font-family: var(--serif-d);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 600;
}

.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-left: 1.2rem; }

.folio-stack { display: grid; gap: 0.75rem; }

.folio-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1.5fr) minmax(0, 0.85fr) minmax(7.5rem, 0.75fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--ink);
  border-left: 6px solid var(--cta);
}

.folio-num {
  font-family: var(--serif-d);
  font-variant-numeric: oldstyle-nums;
  font-size: 1.35rem;
  color: var(--cta);
}

.folio-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.folio-logo,
.folio-logo.is-disabled {
  display: flex;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.folio-logo-img {
  width: 7.5rem;
  height: 2.75rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 0.2rem;
}

.folio-meta { min-width: 0; }

.folio-brand h3 {
  margin: 0;
  font-family: var(--serif-d);
  font-size: 1.2rem;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.25rem; }

.tag {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  padding: 0.1rem 0.35rem;
}

.folio-pay { margin: 0; font-size: 0.92rem; color: var(--muted); }

.folio-stars {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--cta);
}

.folio-bonus {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.25;
}

.folio-bonus-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.folio-pays {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.folio-pays img {
  width: 3.25rem;
  height: 2rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 0.1rem;
}

.folio-score {
  font-family: var(--serif-d);
  font-size: 1.5rem;
}

.pay-logos {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.pay-logos[data-grid-count="8"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pay-logo {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.65rem 0.5rem 0.45rem;
  text-align: center;
}

.pay-logo img {
  width: 5.5rem;
  height: 2.4rem;
  object-fit: contain;
  background: #fff;
}

.pay-logo figcaption {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.pay-method {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pay-method img {
  width: 3.2rem;
  height: 2rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--rule);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.slot-grid[data-grid-count="10"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.slot-card {
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  overflow: hidden;
}

.slot-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.slot-card figcaption {
  padding: 0.4rem 0.5rem 0.55rem;
  font-size: 0.82rem;
}

.criteria-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 1rem;
}

.criteria-grid span {
  border-top: 1px solid var(--ink);
  padding-top: 0.45rem;
  font-size: 0.92rem;
}

.note { color: var(--muted); font-size: 0.95rem; }

.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.25rem;
}

.content-table,
.pay-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.content-table th,
.content-table td,
.pay-table th,
.pay-table td {
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0.6rem;
  text-align: left;
}

.pay-table thead th {
  border-bottom: 2px solid var(--ink);
  font-family: var(--serif-d);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pay-table tr.is-current { background: var(--folio); }
.yes { color: var(--cta); }

.faq { counter-reset: folio-faq; }

.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 0.55rem 0;
  counter-increment: folio-faq;
}

.faq summary {
  cursor: pointer;
  font-family: var(--serif-d);
  font-size: 1.05rem;
}

.faq summary::before {
  content: counter(folio-faq, upper-roman) ".";
  margin-right: 0.55rem;
  color: var(--cta);
  font-variant-numeric: oldstyle-nums;
}

.author-portrait {
  margin: 0;
  max-width: 16rem;
}

.author-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--ink);
  background: var(--folio);
}

.author-portrait figcaption {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.author-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 1.1rem 0 0;
  border: 1px solid var(--ink);
}

.author-facts div {
  padding: 0.75rem 0.9rem;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.author-facts div:nth-child(2n) { border-right: 0; }
.author-facts div:nth-child(n+3) { border-bottom: 0; }

.author-facts b {
  display: block;
  font-family: var(--serif-d);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cta);
  margin-bottom: 0.25rem;
}

.writes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.writes-list li { border-bottom: 1px solid var(--rule); }

.writes-list a {
  display: block;
  padding: 0.55rem 0;
  color: var(--ink);
  text-decoration: none;
}

.writes-list a:hover { color: var(--cta); }

.author-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 2rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--ink);
}

.author-card img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.site-footer {
  padding: 2rem var(--edge) 1.5rem;
  border-top: 2px solid var(--ink);
  background: var(--folio);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.footer-logo { width: 11rem; }

.legal-line {
  margin: 1.4rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--ink);
  background: var(--paper);
  cursor: pointer;
}

.to-top.is-visible { display: block; }

@media (min-width: 861px) {
  .nav-toggle { display: none; }
  .nav { display: flex; margin-left: auto; }
  .nav-dropdown ul {
    position: absolute;
    right: 0;
    min-width: 14rem;
    background: var(--paper);
    border: 1px solid var(--ink);
    padding: 0.55rem 0.8rem;
  }
  .page-toc--top { display: flex; }
}

@media (max-width: 860px) {
  :root { --edge: clamp(0.875rem, 10vw, 9rem); }
  .mobile-header-cta { display: none; }
  .brand { flex: 1; min-width: 0; }
  .brand-mark { white-space: normal; }
  .nav-toggle { order: 2; margin-left: auto; }
  .brand { order: 0; }
  .folio-row {
    grid-template-columns: 2.2rem minmax(0, 1fr);
  }
  .folio-num { align-self: start; }
  .folio-brand {
    grid-column: 2;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .folio-meta { text-align: center; }
  .tags { display: none; }
  .folio-pays {
    grid-column: 1;
    grid-row: 2;
    justify-content: flex-start;
  }
  .folio-bonus {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }
  .folio-row .btn { grid-column: 1 / -1; }
  .folio-logo-img { width: 8.5rem; height: 3rem; }
  .pay-logos,
  .pay-logos[data-grid-count="8"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .slot-grid,
  .slot-grid[data-grid-count="10"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .criteria-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .author-facts { grid-template-columns: 1fr; }
  .author-facts div { border-right: 0; }
  .author-facts div:nth-child(n+3) { border-bottom: 1px solid var(--rule); }
  .author-facts div:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
