/* ==============================================================
   Eryndor Lore — Final Dark Archive Design
   Matches the approved simplified mockup.
   All page-specific classes are prefixed with lf-.
   ============================================================== */

.lf-page {
  --lf-bg: #031011;
  --lf-panel: #071b1b;
  --lf-panel-deep: #020909;
  --lf-panel-soft: #0b2422;
  --lf-line: rgba(183, 136, 57, .40);
  --lf-line-soft: rgba(183, 136, 57, .17);
  --lf-gold: #b7883c;
  --lf-gold-light: #dfbf78;
  --lf-text: #d0c2a7;
  --lf-muted: #9c907c;
  --lf-link: #9dbf7a;

  min-height: 100vh;
  color: var(--lf-text);
  background:
    radial-gradient(circle at 52% 0, rgba(183,136,57,.04), transparent 24%),
    linear-gradient(90deg, #02090a, #061415 48%, #02090a);
}

.lf-hero {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-bottom: 1px solid var(--lf-line);
  background: linear-gradient(110deg, #061416, #112421 55%, #030a0b);
}

.lf-hero--image {
  background-image:
    linear-gradient(90deg, rgba(3,10,11,.95) 0%, rgba(3,10,11,.78) 29%, rgba(3,10,11,.24) 62%, rgba(3,10,11,.56) 100%),
    var(--lf-hero-image);
  background-size: cover, cover;
  background-position: center, center;
}

.lf-hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.01), transparent 48%, rgba(0,0,0,.43)),
    radial-gradient(circle at 88% 50%, transparent 0 20%, rgba(183,136,57,.08) 20.3% 20.7%, transparent 21% 30%, rgba(183,136,57,.06) 30.3% 30.7%, transparent 31%);
}

.lf-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 40px;
  padding-bottom: 42px;
}

.lf-hero__breadcrumbs {
  display: flex;
  gap: 9px;
  margin-bottom: 17px;
  color: #a79472;
  font-size: 11px;
}

.lf-hero__breadcrumbs a {
  color: #b8a47c;
}

.lf-hero h1 {
  margin: 0;
  color: #f0e3c9;
  font-size: clamp(60px, 8vw, 96px);
  font-weight: 400;
  line-height: .95;
  text-shadow: 0 6px 24px rgba(0,0,0,.82);
}

.lf-hero blockquote {
  max-width: 400px;
  margin: 15px 0 0;
  color: #d1ac66;
  font-size: 16px;
  font-style: italic;
  line-height: 1.55;
}

.lf-hero__ornament {
  display: inline-block;
  margin-top: 8px;
  color: var(--lf-gold);
}

.lf-mobile-toggle {
  display: none;
}

.lf-layout {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr) 205px;
  gap: 22px;
  align-items: start;
  padding-top: 19px;
  padding-bottom: 70px;
}

.lf-sidebar,
.lf-right-rail,
.lf-entry-sidebar,
.lf-entry-rail {
  position: sticky;
  top: 108px;
}

.lf-sidebar {
  display: grid;
  gap: 18px;
}

.lf-sidebar__nav {
  border-right: 1px solid var(--lf-line-soft);
}

.lf-sidebar__nav h2 {
  margin: 0;
  padding: 8px 7px 16px;
  color: var(--lf-gold-light);
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.lf-sidebar__nav nav {
  display: grid;
}

.lf-sidebar__nav a {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  padding: 13px 8px;
  border-top: 1px solid var(--lf-line-soft);
  color: #b5a88e;
  font-size: 11px;
}

.lf-sidebar__nav a:last-child {
  border-bottom: 1px solid var(--lf-line-soft);
}

.lf-sidebar__nav a > span {
  color: var(--lf-gold);
  text-align: center;
}

.lf-sidebar__nav a b {
  font-weight: 400;
}

.lf-sidebar__nav a:hover,
.lf-sidebar__nav a.is-active {
  color: var(--lf-gold-light);
  background: linear-gradient(90deg, rgba(183,136,57,.15), transparent);
}

.lf-sidebar__nav a.is-active::before {
  content: "";
  position: absolute;
  inset: 4px -4px;
  border: 1px solid rgba(221,185,111,.54);
  clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%);
}

.lf-archivist-note {
  position: relative;
  padding: 18px 13px;
  border: 1px solid var(--lf-line);
  background:
    radial-gradient(circle at 50% 100%, rgba(183,136,57,.08), transparent 34%),
    rgba(3,13,14,.88);
  text-align: center;
}

.lf-archivist-note::after,
.lf-panel::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(183,136,57,.10);
  pointer-events: none;
}

.lf-archivist-note > * {
  position: relative;
  z-index: 1;
}

.lf-archivist-note__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 0 auto;
  overflow: hidden;
}

.lf-archivist-note__icon img {
  display: block;
  width: 80%;
  height: 80%;
  object-fit: contain;
}

.lf-archivist-note h2 {
  margin: 7px 0 10px;
  color: var(--lf-gold-light);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.lf-archivist-note p {
  margin: 0;
  color: #a4967e;
  font-size: 11px;
  line-height: 1.65;
}

.lf-archivist-note > span:last-child {
  display: block;
  margin-top: 12px;
  color: var(--lf-gold);
}

.lf-main {
  min-width: 0;
}

.lf-section {
  scroll-margin-top: 120px;
  padding: 0 0 18px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--lf-line-soft);
}

.lf-section:last-child {
  margin-bottom: 0;
}

.lf-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 22px;
}

.lf-section-heading {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 9px;
}

.lf-section-heading__sigil {
  color: var(--lf-gold);
  font-size: 16px;
}

.lf-section-heading__number {
  color: #dbbf81;
  font-size: 20px;
}

.lf-section-heading h2 {
  margin: 0;
  color: #dfc68d;
  font-size: clamp(21px, 2.7vw, 29px);
  font-weight: 400;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.lf-copy {
  color: #a99e8b;
  font-size: 12px;
  line-height: 1.65;
}

.lf-copy p {
  margin: 0 0 8px;
}

.lf-copy strong {
  color: #d6bf89;
}

.lf-copy a {
  color: var(--lf-link);
}

.lf-read-more {
  display: inline-block;
  margin-top: 4px;
  color: var(--lf-link);
  font-size: 10px;
}

.lf-map-card {
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(183,136,57,.45);
  background: rgba(9,24,24,.86);
  box-shadow: 0 12px 26px rgba(0,0,0,.35);
}

.lf-map-card img {
  display: block;
  width: 100%;
  border: 1px solid rgba(183,136,57,.25);
}

.lf-map-card figcaption {
  padding-top: 9px;
  text-align: center;
}

.lf-map-card figcaption a {
  color: #c3a360;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.lf-language-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.lf-language-card {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  align-items: center;
  padding: 10px 7px;
  border: 1px solid rgba(183,136,57,.29);
  color: var(--lf-text);
  background: linear-gradient(180deg, rgba(10,29,29,.90), rgba(3,12,13,.90));
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.lf-language-card:hover {
  transform: translateY(-3px);
  border-color: var(--lf-gold-light);
  background: linear-gradient(180deg, rgba(15,38,36,.94), rgba(4,14,15,.94));
}

.lf-language-card__emblem {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 9px;
  overflow: hidden;
  border: 1px solid var(--lf-gold);
  border-radius: 50%;
  color: var(--lf-gold-light);
  background: #0c342d;
  box-shadow: 0 0 0 3px rgba(183,136,57,.12);
}

.lf-language-card__emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lf-language-card strong {
  color: #dfc78f;
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.1;
}

.lf-language-card p {
  margin: 7px 0 0;
  color: #8f8573;
  font-size: 9px;
  line-height: 1.42;
}

.lf-section--weave {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 155px;
  gap: 18px;
  align-items: center;
}

.lf-weave-image {
  display: block;
  width: 100%;
  max-width: 155px;
  margin-left: auto;
}

.lf-glossary {
  overflow: hidden;
  border: 1px solid rgba(183,136,57,.25);
}

.lf-glossary details {
  border-top: 1px solid var(--lf-line-soft);
  background: rgba(8,24,24,.72);
}

.lf-glossary details:first-child {
  border-top: 0;
}

.lf-glossary summary {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  cursor: pointer;
  list-style: none;
}

.lf-glossary summary::-webkit-details-marker {
  display: none;
}

.lf-glossary summary strong {
  color: #c8b27f;
  font-size: 10px;
  font-weight: 400;
}

.lf-glossary summary span {
  color: #89806f;
  font-size: 9px;
}

.lf-glossary summary b {
  color: var(--lf-gold-light);
  font-size: 17px;
  font-weight: 400;
}

.lf-glossary details > div {
  padding: 0 10px 11px 120px;
  color: #a09583;
  font-size: 10px;
  line-height: 1.55;
}

.lf-glossary details > div p {
  margin: 0 0 5px;
}

.lf-glossary details > div a {
  color: var(--lf-link);
}

.lf-right-rail {
  display: grid;
  gap: 12px;
}

.lf-panel {
  position: relative;
  overflow: hidden;
  padding: 11px;
  border: 1px solid var(--lf-line);
  background:
    radial-gradient(circle at 50% 0, rgba(183,136,57,.06), transparent 32%),
    linear-gradient(180deg, rgba(10,28,28,.95), rgba(3,12,13,.98));
}

.lf-panel > * {
  position: relative;
  z-index: 1;
}

.lf-panel h2 {
  margin: 0;
  padding: 4px 0 9px;
  border-bottom: 1px solid var(--lf-line-soft);
  color: #d8be84;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.lf-fact-list article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px 1px;
  border-top: 1px solid var(--lf-line-soft);
}

.lf-fact-list article:first-child {
  border-top: 0;
}

.lf-fact-list article > span {
  display: grid;
  place-items: center;
  color: var(--lf-gold);
  font-size: 20px;
}

.lf-fact-list small {
  display: block;
  color: #a17f43;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.lf-fact-list p {
  margin: 3px 0 0;
  color: #b8aa90;
  font-size: 10px;
  line-height: 1.35;
}

.lf-quick-list article {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 8px;
  align-items: center;
  padding: 9px 1px;
  border-top: 1px solid var(--lf-line-soft);
}

.lf-quick-list article:first-child {
  border-top: 0;
}

.lf-quick-list article span {
  color: var(--lf-gold);
  text-align: center;
}

.lf-quick-list p {
  margin: 0;
  color: #9f947f;
  font-size: 9px;
  line-height: 1.4;
}

.lf-explore {
  display: grid;
}

.lf-explore a {
  display: grid;
  grid-template-columns: 24px 1fr 13px;
  gap: 6px;
  align-items: center;
  padding: 8px 2px;
  border-top: 1px solid var(--lf-line-soft);
  color: #b3a58c;
  font-size: 10px;
}

.lf-explore a:first-child {
  border-top: 0;
}

.lf-explore a > span {
  color: var(--lf-gold);
}

.lf-explore a b {
  font-weight: 400;
}

.lf-explore a i {
  font-style: normal;
}

.lf-compass {
  display: block;
  margin-top: 8px;
  color: rgba(183,136,57,.30);
  font-size: 52px;
  text-align: center;
}

/* Entry pages */

.lf-entry-hero {
  position: relative;
  min-height: 275px;
  overflow: hidden;
  border-bottom: 1px solid var(--lf-line);
  background-image:
    linear-gradient(90deg, rgba(3,10,11,.95), rgba(3,10,11,.68), rgba(3,10,11,.78)),
    var(--lf-entry-hero);
  background-size: cover, cover;
  background-position: center, center;
}

.lf-entry-hero__inner {
  position: relative;
  z-index: 2;
  padding-top: 42px;
  padding-bottom: 38px;
}

.lf-entry-back {
  display: inline-block;
  margin-bottom: 29px;
  color: #a99470;
  font-size: 11px;
}

.lf-entry-kicker {
  margin: 0 0 9px;
  color: var(--lf-gold-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .17em;
}

.lf-entry-hero h1 {
  max-width: 850px;
  margin: 0;
  color: #f0e4ce;
  font-size: clamp(43px, 6vw, 70px);
  font-weight: 400;
  line-height: 1;
}

.lf-entry-hero p:not(.lf-entry-kicker) {
  max-width: 680px;
  margin: 15px 0 0;
  color: #c5b8a1;
  font-size: 16px;
  line-height: 1.55;
}

.lf-entry-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 210px;
  gap: 26px;
  align-items: start;
  padding-top: 31px;
  padding-bottom: 74px;
}

.lf-entry-nav {
  display: grid;
}

.lf-entry-nav a {
  padding: 8px 3px;
  border-top: 1px solid var(--lf-line-soft);
  color: #908573;
  font-size: 10px;
  line-height: 1.35;
}

.lf-entry-nav a:first-child {
  border-top: 0;
}

.lf-entry-nav a:hover,
.lf-entry-nav a.is-active {
  color: var(--lf-gold-light);
}

.lf-archivist-note--entry {
  margin-top: 13px;
}

.lf-entry-content {
  min-width: 0;
  padding: 26px 30px 34px;
  border: 1px solid rgba(183,136,57,.23);
  background:
    radial-gradient(circle at 50% 0, rgba(183,136,57,.045), transparent 27%),
    rgba(6,18,19,.78);
  box-shadow: 0 14px 35px rgba(0,0,0,.30);
}

.lf-entry-content > :first-child {
  margin-top: 0;
}

.lf-entry-content h2 {
  margin: 1.9em 0 .55em;
  padding-bottom: .28em;
  border-bottom: 1px solid var(--lf-line-soft);
  color: #d9bd80;
  font-size: 28px;
  font-weight: 400;
}

.lf-entry-content h3 {
  color: #c8ad73;
  font-size: 20px;
  font-weight: 400;
}

.lf-entry-content p,
.lf-entry-content li {
  color: #b8ac99;
  font-size: 15px;
  line-height: 1.75;
}

.lf-entry-content strong {
  color: #dfc995;
}

.lf-entry-content blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 2px solid var(--lf-gold);
  background: rgba(183,136,57,.06);
  color: #cdb47e;
  font-style: italic;
}

.lf-entry-content table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
}

.lf-entry-content th,
.lf-entry-content td {
  padding: 10px 11px;
  border: 1px solid var(--lf-line-soft);
  text-align: left;
}

.lf-entry-content th {
  color: #d6bb80;
  background: rgba(183,136,57,.07);
}

.lf-entry-facts {
  margin: 0;
}

.lf-entry-facts > div {
  padding: 9px 2px;
  border-top: 1px solid var(--lf-line-soft);
}

.lf-entry-facts > div:first-child {
  border-top: 0;
}

.lf-entry-facts dt {
  color: #a98444;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.lf-entry-facts dd {
  margin: 4px 0 0;
  color: #b9ab91;
  font-size: 10px;
  line-height: 1.4;
}

.lf-related {
  display: grid;
}

.lf-related a {
  display: flex;
  justify-content: space-between;
  gap: 9px;
  padding: 8px 2px;
  border-top: 1px solid var(--lf-line-soft);
  color: #9e9482;
  font-size: 10px;
}

.lf-related a:first-child {
  border-top: 0;
}

.lf-related a:hover {
  color: var(--lf-gold-light);
}

.lf-child-pages {
  margin-top: 38px;
}

.lf-child-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lf-child-grid a {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 7px 10px;
  padding: 13px;
  border: 1px solid rgba(183,136,57,.22);
  color: #afa18a;
  background: rgba(7,22,22,.78);
}

.lf-child-grid a > span {
  grid-row: 1 / 4;
  color: var(--lf-gold);
  font-size: 23px;
}

.lf-child-grid a strong {
  color: #d7bf88;
  font-size: 12px;
  font-weight: 400;
}

.lf-child-grid a p {
  margin: 0;
  font-size: 9px;
  line-height: 1.4;
}

.lf-child-grid a em {
  color: var(--lf-link);
  font-size: 9px;
  font-style: normal;
}

.lf-language-hero__inner {
  padding-left: 125px;
}

.lf-language-hero__emblem {
  position: absolute;
  top: 69px;
  left: 0;
  width: 95px;
  height: 95px;
  border: 2px solid var(--lf-gold);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(183,136,57,.10);
}

.lf-phrasebook > div {
  display: grid;
  gap: 8px;
}

.lf-phrasebook article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 15px;
  padding: 10px 12px;
  border: 1px solid var(--lf-line-soft);
  background: rgba(183,136,57,.035);
}

.lf-phrasebook article strong {
  font-weight: 400;
}

.lf-phrasebook article span {
  color: var(--lf-link);
}

.lf-phrasebook article small {
  grid-column: 1 / -1;
  color: #817766;
}

/* Responsive */

@media (max-width: 1160px) {
  .lf-layout {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  .lf-right-rail {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lf-entry-layout {
    grid-template-columns: 175px minmax(0, 1fr);
  }

  .lf-entry-rail {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

@media (max-width: 900px) {
  .lf-mobile-toggle {
    position: sticky;
    top: 88px;
    z-index: 25;
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 10px 4vw;
    border: 0;
    border-bottom: 1px solid var(--lf-line);
    color: #dbc28a;
    background: rgba(3,12,13,.97);
    font: inherit;
  }

  .lf-layout,
  .lf-entry-layout {
    grid-template-columns: 1fr;
  }

  .lf-sidebar {
    display: none;
    position: sticky;
    top: 138px;
    z-index: 20;
    padding: 12px;
    border: 1px solid var(--lf-line);
    background: #061617;
  }

  .lf-sidebar.is-open {
    display: grid;
  }

  .lf-entry-sidebar {
    display: none;
  }

  .lf-right-rail,
  .lf-entry-rail {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lf-overview-grid {
    grid-template-columns: 1fr;
  }

  .lf-map-card {
    width: min(380px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  .lf-hero {
    min-height: 305px;
  }

  .lf-language-grid,
  .lf-right-rail,
  .lf-entry-rail,
  .lf-child-grid {
    grid-template-columns: 1fr;
  }

  .lf-language-card {
    min-height: 0;
  }

  .lf-section--weave {
    grid-template-columns: 1fr;
  }

  .lf-weave-image {
    margin: 0 auto;
  }

  .lf-glossary summary {
    grid-template-columns: 1fr 18px;
  }

  .lf-glossary summary span {
    grid-column: 1 / -1;
  }

  .lf-glossary details > div {
    padding-left: 10px;
  }

  .lf-entry-content {
    padding: 22px 18px 29px;
  }

  .lf-language-hero__inner {
    padding-left: 0;
    padding-top: 100px;
  }

  .lf-language-hero__emblem {
    top: 20px;
    width: 75px;
    height: 75px;
  }

  .lf-phrasebook article {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================
   Lore image icons
   ========================================================== */

.lf-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  color: var(--lf-gold);
  line-height: 1;
}

.lf-icon img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
}

/* Icons inside the left navigation */

.lf-sidebar-icon {
  width: 18px;
  height: 18px;
  font-size: 15px;
}

.lf-sidebar__nav a {
  grid-template-columns: 22px minmax(0, 1fr);
}

/* Icons before numbered section headings */

.lf-section-icon {
  width: 20px;
  height: 20px;
  font-size: 16px;
}

/* Right-rail icons */

.lf-rail-icon {
  width: 28px;
  height: 28px;
  font-size: 18px;
}

.lf-fact-list article,
.lf-access-list article {
  grid-template-columns: 34px minmax(0, 1fr);
}

.lf-quick-list article {
  grid-template-columns: 34px minmax(0, 1fr);
}

/* Explore More icons */

.lf-explore-icon {
  width: 20px;
  height: 20px;
  font-size: 15px;
}

.lf-explore a {
  grid-template-columns: 24px minmax(0, 1fr) 13px;
}

/* ==========================================================
   World Overview map sizing
   ========================================================== */

.lf-overview-grid {
  align-items: start;
}

.lf-map-card {
  align-self: start;
  width: 100%;
  height: fit-content;
  min-height: 0;
  margin: 0;
}

.lf-map-card img {
  display: block;
  width: 100%;
  height: auto !important;
  max-height: 220px;
  object-fit: contain;
}

.lf-map-card figcaption {
  margin: 0;
  padding: 9px 0 2px;
}