:root {
  --bg: #241e17;
  --bg-2: #2e261c;
  --stone: #342b20;
  --stone-2: #423524;
  --parchment: #d8c394;
  --panel: #3b2f22;
  --panel-2: #493b29;
  --panel-3: #574730;
  --text: #f6ead2;
  --muted: #e2d1ad;
  --subtle: #bca984;
  --line: #735d3b;
  --line-strong: #96794d;
  --accent: #c89b45;
  --accent-soft: #e1bd69;
  --accent-2: #7fb0c8;
  --accent-2-soft: #b0d7e5;
  --acolyte: #9a6ea8;
  --necromancer: #8f9770;
  --lich: #a16a75;
  --warlock: #9b6e51;
  --mage: #73a7c8;
  --sorcerer: #8bb9df;
  --spellblade: #78a2a6;
  --runemaster: #9fb2d9;
  --primalist: #8eaa68;
  --beastmaster: #a48a51;
  --druid: #7fa66b;
  --shaman: #79a896;
  --rogue: #c39a58;
  --bladedancer: #b98267;
  --marksman: #bca65f;
  --falconer: #c2a25f;
  --sentinel: #c8b15d;
  --paladin: #d6c473;
  --void-knight: #8c7eb7;
  --forge-guard: #b87950;
  --danger: #ff7a7a;
  --ok: #7ad6a1;
  --shadow: 0 12px 20px rgba(13, 9, 4, 0.16);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  border-top: 3px solid rgba(200, 155, 69, 0.34);
  opacity: 0.9;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--accent);
  color: #16120a;
  border-radius: 6px;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(200, 155, 69, 0.36);
  background: rgba(44, 36, 26, 0.98);
}

.nav-shell,
.site-footer,
main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.brand,
.nav-links,
.footer-links,
.hero-actions,
.inline-actions,
.mini-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(225, 189, 105, 0.64);
  background: #4b3a24;
  color: var(--accent-soft);
  border-radius: 4px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.nav-links a,
.footer-links a {
  color: #ead9b8;
  font-size: 0.94rem;
}

.nav-links a:hover,
.footer-links a:hover,
.text-link:hover,
.mini-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line-strong);
  background: #4a3a29;
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0 4px;
  color: #c7b58f;
  font-size: 0.86rem;
}

.breadcrumbs a {
  color: #b9d9df;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.55fr);
  gap: 28px;
  align-items: stretch;
  padding: 58px 0 40px;
}

.hero-copy {
  padding: 34px 0;
}

body[class*="page-theme-"] .hero-copy {
  box-shadow: inset 3px 0 0 var(--accent);
  padding-left: 22px;
}

.page-theme-acolyte .hero-copy { box-shadow: inset 3px 0 0 var(--acolyte); }
.page-theme-mage .hero-copy { box-shadow: inset 3px 0 0 var(--mage); }
.page-theme-primalist .hero-copy { box-shadow: inset 3px 0 0 var(--primalist); }
.page-theme-rogue .hero-copy { box-shadow: inset 3px 0 0 var(--rogue); }
.page-theme-sentinel .hero-copy { box-shadow: inset 3px 0 0 var(--sentinel); }

.page-mastery-necromancer .hero-copy { box-shadow: inset 4px 0 0 var(--necromancer); }
.page-mastery-falconer .hero-copy { box-shadow: inset 4px 0 0 var(--falconer); }
.page-mastery-void-knight .hero-copy { box-shadow: inset 4px 0 0 var(--void-knight); }

.section-label,
.eyeline {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-theme-acolyte .section-label,
.page-theme-acolyte .eyeline { color: #d9bedb; }
.page-theme-mage .section-label,
.page-theme-mage .eyeline { color: #b9d9e4; }
.page-theme-primalist .section-label,
.page-theme-primalist .eyeline { color: #d3dfad; }
.page-theme-rogue .section-label,
.page-theme-rogue .eyeline { color: #e4c586; }
.page-theme-sentinel .section-label,
.page-theme-sentinel .eyeline { color: #e7d885; }
.page-mastery-necromancer .section-label,
.page-mastery-necromancer .eyeline { color: #c8d29a; }
.page-mastery-falconer .section-label,
.page-mastery-falconer .eyeline { color: #e4c47a; }
.page-mastery-void-knight .section-label,
.page-mastery-void-knight .eyeline { color: #c8b7e6; }

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
}

h1 {
  max-width: 860px;
  font-size: clamp(2.35rem, 5vw, 4.9rem);
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.12rem;
}

.hero-copy > p:not(.section-label) {
  max-width: 740px;
  margin-top: 18px;
  color: #ead9b8;
  font-size: 1.12rem;
}

.hero-actions {
  margin-top: 26px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 10px 15px;
  border-radius: 4px;
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.92rem;
}

.button-primary {
  background: #d6aa52;
  border-color: #e6c174;
  color: #21170c;
}

.page-theme-acolyte .button-primary { background: #b68abd; border-color: #d4acd9; color: #211522; }
.page-theme-mage .button-primary { background: #86b8cc; border-color: #b3d7e4; color: #102027; }
.page-theme-primalist .button-primary { background: #a3b96e; border-color: #cfdda0; color: #17200e; }
.page-theme-rogue .button-primary { background: #d0a254; border-color: #e5c276; color: #21170c; }
.page-theme-sentinel .button-primary { background: #d4c15f; border-color: #eadc85; color: #211d0c; }
.page-mastery-necromancer .button-primary { background: #a8b376; border-color: #cdd69b; color: #171d0f; }
.page-mastery-falconer .button-primary { background: #d0a861; border-color: #e6c785; color: #21170c; }
.page-mastery-void-knight .button-primary { background: #9b8bc4; border-color: #c6b8e2; color: #181426; }

body.page-mastery-necromancer .hero .hero-copy { box-shadow: inset 5px 0 0 #b8c186; }
body.page-mastery-falconer .hero .hero-copy { box-shadow: inset 5px 0 0 #d7ad5f; }
body.page-mastery-void-knight .hero .hero-copy { box-shadow: inset 5px 0 0 #b8a1e3; }

.button-secondary {
  background: #3a3025;
  color: var(--text);
  border-color: rgba(176, 215, 229, 0.42);
}

.decision-panel,
.card,
.class-row,
.stat-grid > div,
details {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 5px;
  box-shadow: none;
}

.decision-panel {
  padding: 22px;
  align-self: center;
  background: #4f3f2c;
  border-color: #a18453;
  box-shadow: var(--shadow);
}

.decision-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 14px;
  color: #f7f2e4;
}

.decision-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 14px 0;
  border-top: 1px solid rgba(225, 189, 105, 0.28);
}

.decision-row span {
  color: #e5d3ae;
  font-size: 0.9rem;
}

.decision-row strong {
  color: #f5e3b1;
}

.section {
  padding: 34px 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(260px, 0.4fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.section-head p {
  color: var(--muted);
}

.card-grid {
  display: grid;
  gap: 14px;
}

.card-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.card {
  padding: 18px;
  min-height: 178px;
  position: relative;
  overflow: hidden;
  background: #3f3224;
  border-color: #765f3d;
}

.card::before,
.class-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
  opacity: 0.82;
}

.card h3 {
  margin-top: 8px;
}

.card p:not(.eyeline) {
  margin-top: 10px;
  color: #e3d0aa;
  font-size: 0.95rem;
}

.text-link,
.mini-links a {
  display: inline-flex;
  margin-top: 14px;
  color: #b8dae4;
  font-weight: 800;
  font-size: 0.9rem;
}

.mini-links {
  align-items: flex-start;
  margin-top: 10px;
}

.mini-links a {
  margin-top: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  background: #3c3023;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--text);
  background: #4d3d29;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  color: #e4d2af;
}

td a {
  color: var(--accent);
  font-weight: 800;
}

.class-list {
  display: grid;
  gap: 12px;
}

.class-row {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  gap: 18px;
  align-items: center;
  padding: 18px;
  background: #3f3224;
  border-color: #765f3d;
}

.class-row p,
.row-meta span {
  color: #e3d0aa;
}

.row-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.row-meta a {
  color: var(--accent);
  font-weight: 800;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-grid a {
  border: 1px solid var(--line);
  background: #443625;
  color: #ead9b8;
  padding: 8px 11px;
  border-radius: 4px;
  font-weight: 700;
}

.theme-acolyte,
.card:has(a[href*="/classes/acolyte"]),
.class-row.theme-acolyte { background: #3d2f3b; border-color: #7f5e87; }
.theme-mage,
.card:has(a[href*="/classes/mage"]),
.class-row.theme-mage { background: #293b43; border-color: #6090a8; }
.theme-primalist,
.card:has(a[href*="/classes/primalist"]),
.class-row.theme-primalist { background: #343c28; border-color: #70884f; }
.theme-rogue,
.card:has(a[href*="/classes/rogue"]),
.class-row.theme-rogue { background: #443622; border-color: #a57b3e; }
.theme-sentinel,
.card:has(a[href*="/classes/sentinel"]),
.class-row.theme-sentinel { background: #464027; border-color: #aa9550; }

.mastery-necromancer,
.card:has(a[href*="/necromancer"]) { background: #3a3d2b; border-color: #84905f; }
.mastery-falconer,
.card:has(a[href*="/falconer"]) { background: #4b3922; border-color: #b99352; }
.mastery-void-knight,
.card:has(a[href*="/void-knight"]) { background: #342f46; border-color: #8274a9; }

.tag-grid a[href*="/acolyte"], .card:has(a[href*="/classes/acolyte"]) h3, .class-row.theme-acolyte h3 { color: #d9bedb; }
.tag-grid a[href*="/mage"], .card:has(a[href*="/classes/mage"]) h3, .class-row.theme-mage h3 { color: #b9d9e4; }
.tag-grid a[href*="/primalist"], .card:has(a[href*="/classes/primalist"]) h3, .class-row.theme-primalist h3 { color: #d3dfad; }
.tag-grid a[href*="/rogue"], .card:has(a[href*="/classes/rogue"]) h3, .class-row.theme-rogue h3 { color: #e4c586; }
.tag-grid a[href*="/sentinel"], .card:has(a[href*="/classes/sentinel"]) h3, .class-row.theme-sentinel h3 { color: #e7d885; }

.tag-grid a[href*="/necromancer"], .mastery-necromancer h3, .card:has(a[href*="/necromancer"]) h3 { color: #c8d29a; }
.tag-grid a[href*="/falconer"], .mastery-falconer h3, .card:has(a[href*="/falconer"]) h3 { color: #e4c47a; }
.tag-grid a[href*="/void-knight"], .mastery-void-knight h3, .card:has(a[href*="/void-knight"]) h3 { color: #c8b7e6; }

.tag-grid a[href*="/acolyte"] { background: #49364a; border-color: #8b6692; }
.tag-grid a[href*="/mage"] { background: #314d59; border-color: #6d9cb1; }
.tag-grid a[href*="/primalist"] { background: #3d482f; border-color: #7f9658; }
.tag-grid a[href*="/rogue"] { background: #514027; border-color: #ad8648; }
.tag-grid a[href*="/sentinel"] { background: #504b2d; border-color: #ad9b57; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-grid > div {
  padding: 16px;
  min-height: 112px;
  background: #413423;
}

.stat-grid span {
  display: block;
  color: var(--accent-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stat-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding: 14px 14px 14px 34px;
  border: 1px solid var(--line);
  background: #3f3224;
  border-radius: 8px;
  color: #e3d0aa;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 21px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  padding: 15px 16px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin-top: 10px;
  color: #e3d0aa;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 0 48px;
  margin-top: 38px;
  border-top: 1px solid var(--line);
  color: #dfcda8;
}

.site-footer strong {
  color: var(--text);
}

.site-footer p {
  max-width: 620px;
  margin-top: 6px;
}

@media (max-width: 940px) {
  .hero,
  .section-head,
  .class-row {
    grid-template-columns: 1fr;
  }

  .card-grid.three,
  .card-grid.five,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row-meta {
    justify-items: start;
  }
}

@media (max-width: 700px) {
  .nav-shell,
  .site-footer,
  main {
    width: calc(100% - 32px);
    max-width: calc(100% - 32px);
  }

  .nav-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-links {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 64px;
    padding: 14px;
    border: 1px solid var(--line);
    background: #3a3025;
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: grid;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.05rem, 10vw, 2.35rem);
  }

  .hero {
    padding-top: 34px;
  }

  .hero-copy {
    padding: 12px 0;
    min-width: 0;
  }

  body[class*="page-theme-"] .hero-copy {
    padding: 12px 0 12px 16px;
  }

  .hero-copy > p:not(.section-label) {
    max-width: 100%;
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
  }

  .hero-actions .button {
    flex: 1 1 150px;
  }

  .decision-panel {
    min-width: 0;
  }

  .card-grid.two,
  .card-grid.three,
  .card-grid.five,
  .stat-grid,
  .check-list {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: grid;
  }
}