/* =============================================
   CLASS LORE PAGE
   Layout primitives (.toc-layout, .chapter, .callout) come from global.css —
   this file only adds the realm grid and the per-class entry treatment.
   ============================================= */

.page-hero .btn { margin-top: 22px; }
.page-hero .btn i { font-size: 11px; }

/* ── Homeworld cards ── */
.realm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.realm-card {
  background: linear-gradient(160deg, rgba(38, 38, 68, 0.9), rgba(16, 16, 32, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 3px solid var(--rc, var(--gold));
  border-radius: var(--radius-md);
  padding: 20px 22px 22px;
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.realm-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.16);
  border-top-color: var(--rc, var(--gold));
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}
.realm-card h3 {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-hd); font-size: 15px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--rc, var(--gold));
  margin-bottom: 10px;
}
.realm-card h3 i { font-size: 15px; }
.realm-card p { color: var(--text-sec); font-size: 14.5px; line-height: 1.65; margin: 0; }

/* ── Per-class entry ──
   Each one is an anchor target for the "Read the full lore" links on the
   Classes page, so it carries its own scroll offset. */
.lore-class {
  position: relative;
  margin: 30px 0;
  padding: 22px 26px 6px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 3px solid var(--cc, var(--gold));
  border-radius: var(--radius-md);
  scroll-margin-top: calc(var(--nav-h) + 28px);
  max-width: 820px;
}
.lore-class h3 {
  font-family: var(--font-hd); font-size: 18px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cc, var(--gold));
  text-shadow: 0 0 22px color-mix(in srgb, var(--cc, #ffd700) 30%, transparent);
  margin-bottom: 14px;
}
.lore-class p { color: var(--text-sec); font-size: 15px; line-height: 1.7; margin-bottom: 14px; max-width: none; }
.lore-class p strong { color: var(--text-pri); }
.lore-class p em { color: var(--text-pri); font-style: italic; }
.lore-class a { color: var(--cc, var(--gold)); border-bottom: 1px solid currentColor; }
.lore-class a:hover { text-shadow: 0 0 10px currentColor; }

/* Briefly flash an entry when it is jumped to from the Classes page */
.lore-class:target { border-color: var(--cc, var(--gold)); background: rgba(255, 255, 255, 0.04); }

/* Aside line at the foot of an entry — quieter than the body copy */
.lore-class .lore-note {
  font-size: 14px;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 13px;
  margin-top: 4px;
}

/* Model / bullet lists inside an entry */
.lore-class .lore-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 12px;
  margin: 4px 0 18px;
}
.lore-class .lore-list li {
  position: relative; padding-left: 26px;
  color: var(--text-sec); font-size: 14.5px; line-height: 1.65;
}
.lore-class .lore-list li::before {
  content: '\f0da'; /* fa caret-right */
  font-family: 'Font Awesome 6 Free'; font-weight: 900;
  position: absolute; left: 5px; top: 2px;
  font-size: 11px; color: var(--cc, var(--gold));
}
.lore-class .lore-list li strong { color: var(--cc, var(--text-pri)); }

/* Sub-heading inside the cross-cutting chapters */
.lore-subhead {
  font-family: var(--font-hd); font-size: 15px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold);
  margin: 38px 0 10px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.chapter .btn { margin-top: 10px; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .toc-layout { grid-template-columns: 1fr; gap: 20px; }
  .toc-sidebar {
    position: static; max-height: none;
    flex-direction: row; flex-wrap: wrap; gap: 6px;
  }
  .toc-sidebar a { border-left: none; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 20px; padding: 7px 13px; }
  .toc-sidebar a.active { border-color: var(--gold); }
  .lore-class { padding: 18px 18px 4px; }
}
