/* ============================================================
   BOONSMITH — D&D Homebrew Subclass Blog
   ============================================================ */

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4/source-serif-4-variable-roman.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: 'Source Serif 4';
  src: url('/fonts/source-serif-4/source-serif-4-variable-italic.ttf') format('truetype');
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: 'Cinzel';
  src: url('/fonts/cinzel/cinzel-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: 'Cinzel Decorative';
  src: url('/fonts/cinzel-decorative/cinzel-decorative-bold.ttf') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --parchment:       #f2e8d0;
  --parchment-mid:   #e8d9b6;
  --parchment-dark:  #d4c49a;
  --ink:             #1e110a;
  --ink-mid:         #3d2b1f;
  --ink-light:       #5c4033;
  --red:             #7a1a1a;
  --red-bright:      #9b2020;
  --gold:            #b8860b;
  --gold-bright:     #d4a017;
  --rule-color:      #c4a882;
  --note-bg:         #ede0c4;
  --note-border:     #b09060;
  --shadow:          rgba(30, 17, 10, 0.18);
}

/* ── Reset & Base ─────────────────────────────────────────── */

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

html { font-size: 17px; }

body {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: #2a1f14;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.03) 2px,
      rgba(0,0,0,0.03) 4px
    ),
    radial-gradient(ellipse at 20% 50%, rgba(60,35,15,0.4) 0%, transparent 70%),
    radial-gradient(ellipse at 80% 20%, rgba(40,25,10,0.3) 0%, transparent 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Site header ──────────────────────────────────────────── */

.site-header {
  background-color: #1a0d06;
  background-image: linear-gradient(to bottom, #2c1810 0%, #1a0d06 100%);
  border-bottom: 3px solid var(--gold);
  padding: 1.4rem 2rem 1.2rem;
  text-align: center;
  position: relative;
}

.site-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-bright);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-shadow:
    0 0 30px rgba(212, 160, 23, 0.4),
    0 1px 3px rgba(0,0,0,0.8);
  transition: color 0.2s;
}

.site-title:hover { color: #e8b820; }

/* ── Site nav ─────────────────────────────────────────────── */

.site-nav {
  background-color: #1a0d06;
  border-bottom: 1px solid rgba(184, 134, 11, 0.35);
}

.nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-item {
  position: relative;
}

.nav-item-right {
  margin-left: auto;
}

@media (min-width: 701px) {
  .nav-item-search {
    margin-left: auto;
  }

  .nav-item-search + .nav-item-right {
    margin-left: 0;
  }
}

.nav-link {
  display: block;
  padding: 0.6rem 1rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0dca0;
  background: none;
  border: none;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition: color 0.15s;
}

.nav-item:hover .nav-link,
.nav-item:focus-within .nav-link {
  color: #fff8e0;
}

.nav-patreon {
  display: inline-flex !important;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--gold);
  color: #1a0d06 !important;
  padding: 0.25rem 0.85rem;
  margin: 0 0.25rem;
  border-radius: 2px;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.15s;
}

.nav-item:hover .nav-patreon,
.nav-item:focus-within .nav-patreon {
  background-color: var(--gold-bright);
  color: #1a0d06 !important;
}

.nav-patreon-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* (dropdown removed — themes now appear as sidebar + flat nav links) */

/* ── Page wrapper ─────────────────────────────────────────── */

.page-wrapper {
  max-width: 1240px;
  margin: 0 auto;
}

/* ── Subclass two-column layout ───────────────────────────── */

.subclass-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 3rem;
  align-items: start;
}

/* ── Sidebar ──────────────────────────────────────────────── */

.subclass-sidebar {
  position: sticky;
  top: 1.5rem;
}

.sidebar-section {
  margin-bottom: 1.5rem;
}

.sidebar-heading {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--ink-mid);
  border-bottom: 1px solid var(--parchment-dark);
  padding-bottom: 0.35rem;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.sidebar-heading a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

.sidebar-heading a:hover {
  color: var(--red);
}

.sidebar-heading--other {
  color: var(--ink-light);
  margin-top: 0.5rem;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-item {
  border-bottom: 1px solid rgba(196, 168, 130, 0.3);
}

.sidebar-item:last-child {
  border-bottom: none;
}

.sidebar-item a {
  display: block;
  padding: 0.4rem 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.02rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.55;
  transition: color 0.12s;
}

.sidebar-item a:hover {
  color: var(--red);
  text-decoration: none;
}

.sidebar-item--active a {
  color: var(--red);
  font-weight: 600;
}

/* ── Main content parchment ───────────────────────────────── */

main {
  flex-grow: 1;
  width: 100%;
  max-width: 1240px;
  margin: 2rem auto;
  background-color: var(--parchment);
  background-image: linear-gradient(160deg, #f8f0da 0%, #f2e8d0 40%, #ede0c4 100%);
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 1px rgba(180,140,80,0.3),
    0 0 24px rgba(184, 134, 11, 0.18),
    0 4px 40px var(--shadow),
    inset 0 0 80px rgba(180,140,80,0.08);
  padding: 3rem 3.5rem 4rem;
  min-height: 60vh;
}

/* ── Typography ───────────────────────────────────────────── */

h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

h2 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--parchment-dark);
}

p { margin-bottom: 0.75rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--red);
  text-decoration: underline;
  text-decoration-color: rgba(122, 26, 26, 0.35);
  text-underline-offset: 2px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a:hover {
  color: var(--red-bright);
  text-decoration-color: var(--red-bright);
}

/* ── Subclass page ────────────────────────────────────────── */

.subclass-header {
  margin-bottom: 0.5rem;
}

.subclass-header h1 {
  margin-bottom: 0.4rem;
}

.subclass-meta {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  align-items: center;
  line-height: 1.5;
}

.subclass-meta a {
  color: var(--ink-mid);
  text-decoration: none;
  border-bottom: 1px solid var(--parchment-dark);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.subclass-meta a:hover {
  color: var(--red);
  border-color: var(--red);
}

.tax-label { color: var(--ink-mid); }

.subclass-divider {
  margin: 1.4rem 0 2rem;
  border: none;
  height: 2px;
  background: linear-gradient(to right, var(--red) 0%, var(--gold) 40%, var(--parchment-dark) 100%);
  border-radius: 1px;
}

/* ── Intro and flavor text ───────────────────────────────── */

.subclass-commentary-intro,
.subclass-flavor {
  font-size: 1.12rem;
  color: var(--ink-mid);
  max-width: 68ch;
  line-height: 1.74;
}

.subclass-commentary-intro {
  margin-bottom: 0;
}

.subclass-commentary-intro p:last-child,
.subclass-flavor p:last-child { margin-bottom: 0; }

.subclass-flavor {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding: 0 0 1.5rem;
  border-bottom: 1px solid var(--parchment-dark);
}

.subclass-flavor em { font-style: italic; }

/* ── Intro block with art ─────────────────────────────────── */

.subclass-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

.subclass-intro-text > *:first-child { margin-top: 0; }
.subclass-intro-text .subclass-commentary-intro { margin-bottom: 0; }

.subclass-intro-art {
  position: sticky;
  top: 1.5rem;
}

.subclass-art {
  margin: 0;
}

.subclass-art img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border: 1px solid var(--parchment-dark);
  border-radius: 2px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.subclass-art-credit {
  margin-top: 0.5rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.88rem;
  color: var(--ink-mid);
  font-style: italic;
  text-align: right;
  line-height: 1.45;
}

.subclass-art-cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  aspect-ratio: 9 / 16;
  width: 100%;
  border: 1px dashed var(--parchment-dark);
  border-radius: 2px;
  background: var(--parchment);
  color: var(--ink-mid);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.subclass-art-cta:hover {
  border-color: var(--gold);
  color: var(--ink);
  background: var(--parchment-dark);
}

.subclass-art-cta-label {
  font-family: var(--font-display, serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.subclass-art-cta-sub {
  font-size: 0.9rem;
  color: var(--ink-light);
  max-width: 20ch;
  line-height: 1.35;
}

/* ── Feature rows (2-column) ──────────────────────────────── */

.subclass-body {
  display: flex;
  flex-direction: column;
}

.feature-row {
  display: block;
  padding: 2rem 0;
  position: relative;
}

.feature-row + .feature-row::before {
  content: '✦';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.65rem;
  color: var(--gold);
  background: var(--parchment);
  padding: 0 0.5rem;
  z-index: 1;
}

.feature-row + .feature-row::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    var(--rule-color) 20%,
    var(--rule-color) 80%,
    transparent 100%
  );
}

/* Rules column */

.feature-rules {
  padding-right: 0;
}

.feature-rules h2 {
  margin-top: 0;
}

/* Reasoning — collapsible designer note */

.feature-reasoning {
  margin-top: 1.2rem;
  padding: 0 1.2rem 0 1.4rem;
  background-color: var(--note-bg);
  background-image: linear-gradient(160deg, #f0e4c8 0%, #ead8b2 100%);
  border: 1px solid var(--note-border);
  border-left: 3px solid var(--gold);
  border-radius: 0 2px 2px 0;
  box-shadow:
    inset 0 1px 3px rgba(180,140,80,0.15),
    0 1px 4px rgba(30,17,10,0.08);
}

.feature-reasoning > summary {
  display: block;
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: var(--ink-mid);
  user-select: none;
}

.feature-reasoning > summary::-webkit-details-marker {
  display: none;
}

.feature-reasoning > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 0.5em;
  font-size: 0.75rem;
  transition: transform 0.15s ease;
}

.feature-reasoning[open] > summary::before {
  transform: rotate(90deg);
}

.feature-reasoning[open] > summary {
  border-bottom: 1px solid var(--parchment-dark);
  margin-bottom: 0.5rem;
}

.feature-reasoning-body {
  padding-bottom: 1rem;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.72;
  font-weight: 400;
  max-width: 68ch;
}

.feature-reasoning-body p {
  color: var(--ink);
}

.feature-reasoning-body p + p {
  margin-top: 0.8rem;
}

/* ── Stat blocks ──────────────────────────────────────────── */

.feature-rules blockquote {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem 1.08rem;
  background-color: #fbf3da;
  background-image: linear-gradient(180deg, #fbf3da 0%, #f5e8c2 100%);
  border: 1px solid var(--note-border);
  border-left: 3px solid var(--red);
  box-shadow:
    inset 0 1px 2px rgba(180,140,80,0.15),
    0 1px 3px rgba(30,17,10,0.1);
  font-size: 1rem;
  line-height: 1.58;
  color: var(--ink);
  column-count: 1;
}

.feature-rules blockquote > h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.025em;
  text-transform: none;
  border: none;
  padding: 0;
  margin: 0 0 0.15rem;
}

.feature-rules blockquote > h3 {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: var(--red);
  border-bottom: 1px solid var(--red);
  padding-bottom: 0.2rem;
  margin: 1.6rem 0 0.55rem;
}

.feature-rules blockquote > p {
  margin-bottom: 0.45rem;
}

.feature-rules blockquote > p:first-of-type em {
  color: var(--ink-mid);
  font-size: 0.96rem;
}

.feature-rules blockquote > hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, var(--red) 0%, var(--gold) 50%, transparent 100%);
  margin: 0.55rem 0;
}

.feature-rules blockquote > ul {
  list-style: none;
  padding: 0;
  margin: 0.34rem 0;
}

.feature-rules blockquote > ul > li {
  padding: 0.1rem 0;
  line-height: 1.58;
}

.feature-rules blockquote > ul > li > strong:first-child {
  color: var(--red);
}

.feature-rules blockquote > table {
  width: 100%;
  margin: 0.42rem 0 0.55rem;
  font-size: 0.96rem;
  text-align: center;
}

.feature-rules blockquote > table thead tr {
  background: none;
  color: var(--red);
}

.feature-rules blockquote > table thead th {
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  border: none;
  border-bottom: 1px solid var(--note-border);
  padding: 0.2rem 0.3rem;
  text-align: center;
}

.feature-rules blockquote > table tbody tr {
  background: none !important;
}

.feature-rules blockquote > table tbody td {
  border: none;
  padding: 0.2rem 0.3rem;
  font-variant-numeric: tabular-nums;
}

/* Inline traits/actions: `***Name.***` renders as <strong><em>Name.</em></strong> */
.feature-rules blockquote strong em,
.feature-rules blockquote em strong {
  font-style: italic;
  font-weight: 700;
  color: var(--ink);
}

/* ── Tables (spell lists) ─────────────────────────────────── */

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  margin: 0.75rem 0;
}

thead tr {
  background-color: var(--red);
  color: var(--parchment);
}

thead th {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
  text-align: left;
  border: 1px solid rgba(180,140,80,0.3);
}

tbody tr:nth-child(even) {
  background-color: rgba(180,140,80,0.08);
}

tbody td {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--parchment-dark);
  vertical-align: top;
}

tbody td em { font-style: normal; }

/* ── Landing page ─────────────────────────────────────────── */

.lp-hero {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  border-bottom: 1px solid var(--parchment-dark);
  margin-bottom: 3rem;
}

.lp-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 3.2rem;
  color: var(--red);
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.lp-tagline {
  font-size: 1.12rem;
  color: var(--ink-light);
  max-width: 56ch;
  margin: 0 auto 2rem;
  font-style: italic;
  line-height: 1.6;
}

.lp-cta-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lp-cta-primary,
.lp-cta-patreon {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border-radius: 1px;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.lp-cta-primary {
  background-color: var(--red);
  color: var(--parchment);
  border: 1px solid var(--red);
}

.lp-cta-primary:hover {
  background-color: var(--red-bright);
  border-color: var(--red-bright);
  color: var(--parchment);
}

.lp-cta-patreon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--gold);
  color: #1a0d06;
  border: 1px solid var(--gold);
}

.lp-cta-patreon:hover {
  background-color: var(--gold-bright);
  border-color: var(--gold-bright);
  color: #1a0d06;
}

.lp-patreon-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.lp-section-heading {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1rem;
}

/* ── Current theme panel ──────────────────────────────────── */

.lp-theme {
  margin-bottom: 3.5rem;
}

.lp-theme-head {
  text-align: center;
  margin-bottom: 1.25rem;
}

.lp-theme-kicker {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.lp-theme-kicker::before,
.lp-theme-kicker::after {
  content: '\2022';
  margin: 0 0.7em;
  color: var(--rule-color);
}

.lp-theme-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 0;
  border: none;
  padding: 0;
}

.lp-theme-title a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.15s;
}

.lp-theme-title a:hover { color: var(--red-bright); }

.lp-theme-desc {
  max-width: 62ch;
  margin: 0 auto 2.25rem;
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ink-mid);
}

.lp-card-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.lp-card {
  background: var(--note-bg);
  border: 1px solid var(--parchment-dark);
  border-left: 3px solid var(--gold);
  border-radius: 2px;
  box-shadow: 0 1px 3px var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.lp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px var(--shadow);
}

.lp-card-link {
  display: block;
  padding: 1.15rem 1.3rem 1.25rem;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.lp-card-class {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.5rem;
}

.lp-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--red);
  margin: 0 0 0.55rem;
  line-height: 1.2;
  border: none;
  padding: 0;
}

.lp-card:hover .lp-card-title { color: var(--red-bright); }

.lp-card-flavor {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--ink-mid);
  margin: 0 0 0.85rem;
}

.lp-card-more {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.lp-card:hover .lp-card-more,
.lp-card:hover .lp-card-more--patreon { color: var(--ink); }

/* Per-class muted accent colors on the left border.
   Muted to sit against the parchment card without shouting. */
.lp-card[data-class="artificer"]  { border-left-color: #8a5a2b; }  /* bronze */
.lp-card[data-class="barbarian"]  { border-left-color: #8b3a1f; }  /* rust */
.lp-card[data-class="bard"]       { border-left-color: #7a4b8a; }  /* muted violet */
.lp-card[data-class="cleric"]     { border-left-color: #b8922f; }  /* temple gold */
.lp-card[data-class="druid"]      { border-left-color: #5a7a3a; }  /* moss */
.lp-card[data-class="fighter"]    { border-left-color: #6b6b6b; }  /* steel */
.lp-card[data-class="monk"]       { border-left-color: #b86a2a; }  /* saffron */
.lp-card[data-class="paladin"]    { border-left-color: #a89055; }  /* pale gold */
.lp-card[data-class="ranger"]     { border-left-color: #3e6b3e; }  /* forest */
.lp-card[data-class="rogue"]      { border-left-color: #3e3e3e; }  /* shadow */
.lp-card[data-class="sorcerer"]   { border-left-color: #a84030; }  /* ember */
.lp-card[data-class="warlock"]    { border-left-color: #4a2d5a; }  /* dusk violet */
.lp-card[data-class="wizard"]     { border-left-color: #3a5a8a; }  /* sapphire */

/* Upcoming cards keep the class hue but dimmed via opacity (set in .lp-card--upcoming). */
/* Early-access cards keep the class hue; the gold accent is carried by .lp-card-more--patreon. */

/* Upcoming (non-clickable) card variant */
.lp-card--upcoming { opacity: 0.7; }
.lp-card--upcoming:hover {
  transform: none;
  box-shadow: 0 1px 3px var(--shadow);
}
.lp-card-link--static {
  display: block;
  padding: 1.15rem 1.3rem 1.25rem;
  color: var(--ink-mid);
  cursor: default;
  height: 100%;
}
.lp-card--upcoming .lp-card-title,
.lp-card--upcoming:hover .lp-card-title { color: var(--ink-mid); }
.lp-card-more--upcoming,
.lp-card--upcoming:hover .lp-card-more--upcoming { color: var(--ink-light); }

/* Early-access (Patreon) card variant — keeps class hue; Patreon cue sits in the footer. */
.lp-card-more--patreon {
  color: var(--ink-light);
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
}
.lp-card-more-icon {
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
}

/* ── Past themes ──────────────────────────────────────────── */

.lp-past {
  text-align: center;
  border-top: 1px solid var(--parchment-dark);
  padding-top: 1.5rem;
}

.lp-past-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.lp-past-list a {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--parchment-dark);
  border-radius: 2px;
  color: var(--ink-mid);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}

.lp-past-list a:hover {
  border-color: var(--gold);
  color: var(--red);
}

/* ── Index empty ───────────────────────────────────────────── */

.index-empty {
  font-style: italic;
  color: var(--ink-light);
}

/* ── Taxonomy pages ───────────────────────────────────────── */

.tax-list {
  list-style: none;
  padding: 0;
  columns: 2;
  gap: 2rem;
  margin-top: 1.5rem;
}

.tax-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--parchment-dark);
  break-inside: avoid;
}

.tax-list a {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: var(--red);
  text-decoration: none;
}

.tax-list a:hover { color: var(--red-bright); }

.count {
  font-size: 0.8rem;
  color: var(--ink-light);
}

.tax-breadcrumb {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.tax-breadcrumb a {
  color: var(--ink-light);
  text-decoration: none;
}

.tax-breadcrumb a:hover { color: var(--red); }

/* ── Taxonomy single page ─────────────────────────────────── */

.tax-description {
  font-size: 1.05rem;
  color: var(--ink-mid);
  max-width: 68ch;
  margin: 1.2rem 0 0;
  line-height: 1.65;
  white-space: pre-line;
}

.tax-entry-list {
  list-style: none;
  padding: 0;
}

.tax-entry-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--parchment-dark);
}

.tax-entry-item:first-child {
  border-top: 1px solid var(--parchment-dark);
}

.tax-entry-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
  white-space: nowrap;
}

.tax-entry-item a {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--red);
  text-decoration: none;
  transition: color 0.15s;
}

.tax-entry-item a:hover { color: var(--red-bright); }

/* ── About page ───────────────────────────────────────────── */

.about-content {
  max-width: 68ch;
}

.about-content h2 {
  margin-top: 2rem;
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-content p {
  color: var(--ink-mid);
}

/* ── Search trigger icon ──────────────────────────────────── */

.nav-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
}

.nav-search-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ── Search overlay ───────────────────────────────────────── */

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 7, 3, 0.88);
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1.5rem 2rem;
  backdrop-filter: blur(2px);
}

.search-overlay[hidden] { display: none; }

.search-panel {
  width: 100%;
  max-width: 580px;
  background-color: var(--parchment);
  background-image: linear-gradient(160deg, #f8f0da 0%, #f2e8d0 100%);
  border: 1px solid var(--gold);
  box-shadow:
    0 0 0 1px rgba(180,140,80,0.3),
    0 8px 40px rgba(0,0,0,0.7);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--parchment-dark);
}

.search-bar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-light);
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.1rem;
  color: var(--ink);
  caret-color: var(--gold);
}

.search-input::placeholder { color: var(--ink-light); opacity: 0.6; }

.search-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--ink-light);
  padding: 0.2rem 0.4rem;
  transition: color 0.15s;
  flex-shrink: 0;
}

.search-close:hover { color: var(--ink); }

.search-results {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 360px;
  overflow-y: auto;
}

.search-result a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--parchment-dark);
  transition: background-color 0.12s, box-shadow 0.12s;
}

.search-result:last-child a { border-bottom: none; }

.search-result a:hover {
  background-color: rgba(184, 134, 11, 0.08);
}

.search-result a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
  box-shadow: inset 0 0 0 999px rgba(184, 134, 11, 0.14);
}

.search-result-title {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--red);
}

.search-result-meta {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.search-empty,
.search-loading {
  padding: 1rem;
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  color: var(--ink-light);
  font-size: 0.97rem;
}

/* ── Hamburger button (hidden on desktop) ─────────────────── */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.9rem 1.2rem;
  margin-left: auto;
  color: var(--gold-bright);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Keep arrow inline with button text */
.nav-arrow {
  display: inline;
  font-size: 0.75em;
  line-height: 1;
  vertical-align: middle;
}

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 800px) {
  main { padding: 2rem 1.5rem 3rem; }

  h1 { font-size: 1.7rem; }

  .subclass-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .subclass-sidebar {
    position: static;
    border-top: 2px solid var(--parchment-dark);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
  }

  .feature-row {
    padding: 1.5rem 0;
  }

  .subclass-intro {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .subclass-intro-art {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }

  .feature-rules {
    padding-right: 0;
    border-right: none;
  }

  .tax-list { columns: 1; }

  .site-title { font-size: 1.5rem; }
  .lp-title { font-size: 2.2rem; }
  .lp-theme-title { font-size: 1.8rem; }
  .lp-card-grid { grid-template-columns: 1fr; gap: 0.9rem; }
}

@media (max-width: 700px) {
  /* Nav becomes a stacked hamburger menu */
  .site-nav {
    display: flex;
    flex-direction: column;
  }

  .nav-hamburger {
    display: flex;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    padding: 0 0 0.75rem;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    max-width: none;
    margin: 0;
    padding-left: 0;
  }

  .nav-list.nav-open {
    display: flex;
  }

  .nav-item {
    width: 100%;
  }

  .nav-item-right {
    margin-left: 0;
  }

  .nav-link {
    padding: 0.65rem 1.2rem;
    font-size: 1rem;
    width: 100%;
    text-align: left;
  }

  .nav-patreon {
    margin: 0.4rem 1rem;
    padding: 0.4rem 1rem;
    justify-content: flex-start;
    width: calc(100% - 2rem);
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  main { padding: 1.5rem 1rem 2rem; }
  .site-footer { padding: 1.2rem 1rem 1.5rem; }
  .footer-attribution { font-size: 0.82rem; }
}

/* ── No-JS fallbacks ──────────────────────────────────────── */

/* Search requires JS — hide the trigger entirely */
.no-js .nav-item-search { display: none; }

/* On mobile the nav-list is hidden by default and revealed by JS.
   Without JS: hide the hamburger and always show the nav links,
   wrapping onto multiple lines if needed.                        */
.no-js .nav-hamburger { display: none !important; }

@media (max-width: 700px) {
  .no-js .nav-list {
    display: flex !important;
    flex-wrap: wrap;
    padding: 0.25rem 0.5rem 0.5rem;
    border-top: none;
  }

  .no-js .nav-item {
    width: auto;
  }

  .no-js .nav-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
    width: auto;
  }

  .no-js .nav-item-right {
    margin-left: auto;
  }

  .no-js .nav-patreon {
    margin: 0.25rem 0.5rem;
    width: auto;
    justify-content: center;
  }
}

/* ── Site footer ──────────────────────────────────────────── */

.site-footer {
  background-color: #1a0d06;
  background-image: linear-gradient(to top, #2c1810 0%, #1a0d06 100%);
  border-top: 3px solid var(--gold);
  padding: 1.5rem 2rem 1.8rem;
  text-align: center;
}

.site-footer::before {
  content: '';
  display: block;
  height: 1px;
  background: var(--gold-bright);
  opacity: 0.2;
  margin-bottom: 1.4rem;
}

.footer-attribution {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.88rem;
  color: rgba(242, 232, 208, 0.55);
  line-height: 1.65;
  max-width: 72ch;
  margin: 0 auto 0.9rem;
}

.footer-attribution a {
  color: rgba(212, 160, 23, 0.75);
  text-decoration: underline;
  text-decoration-color: rgba(212, 160, 23, 0.3);
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.footer-attribution a:hover {
  color: var(--gold-bright);
}

.footer-copyright {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #c4a882;
}

/* ── Themes showcase ──────────────────────────────────────── */

.themes-hero {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 62ch;
}

.themes-hero-title {
  font-family: 'Cinzel Decorative', 'Cinzel', serif;
  font-size: 2.4rem;
  color: var(--red);
  margin: 0 0 0.6rem;
  border-bottom: none;
}

.themes-hero-tagline {
  font-size: 1.05rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin: 0;
}

.theme-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem;
}

.theme-card {
  display: flex;
}

.theme-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.4rem 1.3rem 1.2rem;
  background-image: linear-gradient(160deg, #f0e4c8 0%, #ead8b2 100%);
  border: 1px solid var(--note-border);
  border-top: 3px solid var(--gold);
  color: inherit;
  text-decoration: none;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.theme-card-link:hover,
.theme-card-link:focus-visible {
  transform: translateY(-2px);
  border-top-color: var(--red);
  box-shadow: 0 6px 18px -8px rgba(30, 17, 10, 0.35);
  outline: none;
}

.theme-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--red);
  margin: 0 0 0.25rem;
  border-bottom: none;
  padding-bottom: 0;
}

.theme-card-count {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: 0 0 0.8rem;
}

.theme-card-desc {
  font-size: 0.95rem;
  color: var(--ink-mid);
  line-height: 1.55;
  margin: 0 0 1rem;
  flex: 1;
}

.theme-card-cta {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: auto;
}

.theme-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin: 2rem 0 1rem;
}

.theme-pager[hidden] {
  display: none;
}

.theme-pager-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  background: transparent;
  border: 1px solid var(--rule-color);
  color: var(--red);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.theme-pager-btn:hover:not(:disabled) {
  background-color: var(--red);
  color: var(--parchment);
}

.theme-pager-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.theme-pager-status {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
}
