/* Encyclopédie — editorial atlas, scoped to the live application page. */
#appRoot .lh-encyclopedia-page { gap: clamp(22px, 3vw, 42px); font-family: 'Manrope', ui-rounded, system-ui, sans-serif; }
#appRoot .lh-encyclopedia-page h2,
#appRoot .lh-encyclopedia-page h3,
#appRoot .lh-encyclopedia-page h4 { font-family: var(--font-display); font-weight: 500; }
#appRoot .lh-encyclopedia-page > .lh-panel { min-width: 0; padding: clamp(24px, 3.4vw, 48px); border-radius: 3px; }
#appRoot .lh-encyclopedia-page .lh-kicker { margin: 0; color: var(--lh-gold); font-size: .72rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }

#appRoot .lh-encyclopedia-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .48fr); align-items: end; gap: clamp(24px, 4vw, 70px); background: radial-gradient(circle at 82% 30%, color-mix(in srgb, var(--lh-gold) 11%, transparent), transparent 40%), var(--lh-surface); }
#appRoot .lh-encyclopedia-hero-copy h2 { max-width: 12ch; margin: 18px 0; font-size: clamp(3.2rem, 5vw, 6rem); line-height: .96; letter-spacing: -.035em; }
#appRoot .lh-encyclopedia-hero-copy > p:last-child { max-width: 54ch; color: var(--lh-muted); line-height: 1.65; }
#appRoot .lh-encyclopedia-hero-progress { display: flex; align-items: end; gap: 18px; padding: 22px 0 4px; border-top: 1px solid var(--lh-border); }
#appRoot .lh-encyclopedia-progress-number { color: var(--lh-gold); font-family: var(--font-display); font-size: clamp(3.8rem, 5vw, 6rem); line-height: .75; }
#appRoot .lh-encyclopedia-progress-number small { font-family: 'Manrope', sans-serif; font-size: .8rem; }
#appRoot .lh-encyclopedia-hero-progress > div { flex: 1; min-width: 0; }
#appRoot .lh-encyclopedia-hero-progress strong { display: block; font-size: .8rem; }
#appRoot .lh-encyclopedia-hero-progress p { margin: 5px 0 10px; color: var(--lh-muted); font-size: .75rem; line-height: 1.5; }
#appRoot .lh-encyclopedia-hero-progress .lh-encyclopedia-progress { height: 4px; margin: 0; }

#appRoot .lh-encyclopedia-section-intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; margin-bottom: 28px; }
#appRoot .lh-encyclopedia-section-intro .lh-kicker { flex-basis: 100%; }
#appRoot .lh-encyclopedia-section-intro h3 { margin: 8px 0 0; font-size: clamp(2.7rem, 3.5vw, 4rem); line-height: 1; }
#appRoot .lh-encyclopedia-section-intro > p:last-child { margin: 0; color: var(--lh-muted); font-size: .9rem; }
#appRoot .lh-encyclopedia-family-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#appRoot .lh-encyclopedia-family-card { position: relative; min-width: 0; min-height: 170px; overflow: hidden; display: flex; flex-direction: column; justify-content: end; padding: 18px; border: 1px solid var(--lh-border); border-radius: 3px; background: var(--lh-surface-2); isolation: isolate; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
#appRoot .lh-encyclopedia-family-card:hover { transform: translateY(-3px); }
#appRoot .lh-encyclopedia-family-card:focus-visible { outline: 2px solid var(--lh-gold); outline-offset: 3px; }
#appRoot .lh-encyclopedia-family-card.is-active { border-color: var(--lh-gold); background: color-mix(in srgb, var(--lh-gold) 13%, var(--lh-surface-2)); }
#appRoot .lh-encyclopedia-family-card.has-art { min-height: 215px; color: #f8f2e7; }
#appRoot .lh-encyclopedia-family-card.has-art::after { position: absolute; z-index: -1; inset: 0; background: linear-gradient(0deg, #0b0c0cef 0%, #0b0c0c8c 35%, #0b0c0c00 100%); content: ''; }
#appRoot .lh-encyclopedia-family-card img { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(1.45) saturate(1.12); }
#appRoot .lh-encyclopedia-family-symbol { position: absolute; top: 15px; right: 20px; color: var(--lh-gold); font-family: var(--font-display); font-size: 3rem; font-weight: 400; opacity: .68; }
#appRoot .lh-encyclopedia-family-copy { display: grid; gap: 7px; width: 100%; }
#appRoot .lh-encyclopedia-family-copy small { margin: 0; color: inherit; font-size: .69rem; font-weight: 700; letter-spacing: .1em; opacity: .72; text-transform: uppercase; }
#appRoot .lh-encyclopedia-family-copy strong { font-family: var(--font-display); font-size: clamp(1.75rem, 2.2vw, 2.5rem); font-weight: 500; line-height: 1; }
#appRoot .lh-encyclopedia-family-copy em { display: flex; justify-content: space-between; gap: 12px; width: 100%; color: inherit; font-size: .75rem; font-style: normal; opacity: .8; }
#appRoot .lh-encyclopedia-family-copy em span { margin: 0; font-size: 1.2rem; line-height: .8; }

#appRoot .lh-encyclopedia-browser-heading { margin-bottom: 30px; }
#appRoot .lh-encyclopedia-browser-heading h3 { margin: 10px 0; font-size: clamp(2.8rem, 4vw, 4.8rem); line-height: 1; }
#appRoot .lh-encyclopedia-browser-heading p:last-child { color: var(--lh-muted); font-size: .91rem; }
#appRoot .lh-encyclopedia-mobile-jump { display: none; }
#appRoot .lh-encyclopedia-workspace { display: grid; grid-template-columns: minmax(285px, .42fr) minmax(0, 1fr); align-items: start; gap: clamp(20px, 2.5vw, 38px); }
#appRoot .lh-encyclopedia-index { min-width: 0; position: sticky; top: 24px; }
#appRoot .lh-encyclopedia-toolbar { min-width: 0; gap: 12px; margin-bottom: 18px; }
#appRoot .lh-encyclopedia-toolbar .lh-input { width: 100%; min-height: 45px; border-radius: 3px; font-size: .82rem; }
#appRoot .lh-encyclopedia-filters { justify-content: start; gap: 5px; }
#appRoot .lh-encyclopedia-filters button { min-height: 34px; padding: 6px 10px; font-size: .74rem; }
#appRoot .lh-encyclopedia-index .lh-data-list { gap: 0; border-top: 1px solid var(--lh-border); }
#appRoot .lh-encyclopedia-index .lh-entry-block { display: block; min-width: 0; border-bottom: 1px solid var(--lh-border); }
#appRoot .lh-encyclopedia-index .lh-entry-block.is-open { margin: 0; }
#appRoot .lh-encyclopedia-index .lh-entry-button { display: grid; grid-template-columns: 23px 46px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; min-height: 75px; padding: 10px 5px; border: 0; border-left: 2px solid transparent; border-radius: 0; background: transparent; }
#appRoot .lh-encyclopedia-index .lh-entry-button:hover,
#appRoot .lh-encyclopedia-index .lh-entry-button.is-active { border-left-color: var(--lh-gold); background: var(--lh-gold-soft); }
#appRoot .lh-entry-index { color: var(--lh-gold); font-size: .67rem; font-weight: 700; }
#appRoot .lh-encyclopedia-index .lh-entry-list-img,
#appRoot .lh-encyclopedia-index .lh-hermetism-symbol.is-compact,
#appRoot .lh-entry-monogram { width: 46px; height: 54px; aspect-ratio: auto; border: 1px solid var(--lh-border); border-radius: 2px; object-fit: cover; background: var(--lh-surface-2); }
#appRoot .lh-entry-monogram { display: grid; place-items: center; color: var(--lh-gold); font-family: var(--font-display); font-size: 1.8rem; }
#appRoot .lh-encyclopedia-index .lh-entry-label { display: grid; gap: 3px; min-width: 0; }
#appRoot .lh-encyclopedia-index .lh-entry-label strong { color: var(--lh-text); font-family: var(--font-display); font-size: 1.18rem; font-weight: 600; line-height: 1.05; }
#appRoot .lh-encyclopedia-index .lh-entry-label small { grid-column: auto; display: -webkit-box; margin: 0; overflow: hidden; color: var(--lh-muted); font-size: .69rem; font-weight: 400; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

#appRoot .lh-encyclopedia-inline { min-width: 0; border-radius: 3px; background: var(--lh-surface); }
#appRoot .lh-encyclopedia-detail-layout { padding: clamp(22px, 3vw, 42px); }
#appRoot .lh-encyclopedia-detail-layout.has-media { grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); align-items: center; }
#appRoot .lh-encyclopedia-detail-intro h3 { margin: 10px 0; font-size: clamp(2.7rem, 3.5vw, 4.5rem); line-height: 1; }
#appRoot .lh-encyclopedia-detail-intro > p:last-child { color: var(--lh-muted); font-size: 1rem; }
#appRoot .lh-encyclopedia-category-img { aspect-ratio: 1.32; max-height: 230px; object-fit: cover; }
#appRoot .lh-encyclopedia-detail-layout .lh-encyclopedia-portrait-img { aspect-ratio: 4 / 5; max-height: 370px; object-fit: cover; background: #111618; }
#appRoot .lh-encyclopedia-stone-art { position: relative; width: 100%; max-width: 296px; aspect-ratio: 4 / 5; }
#appRoot .lh-encyclopedia-stone-art .lh-encyclopedia-hero-img { display: block; height: 100%; max-height: none; }
#appRoot .lh-encyclopedia-stone-seal { position: absolute; right: 9px; bottom: 9px; width: clamp(48px, 24%, 72px); aspect-ratio: 1; border: 1px solid rgba(231, 199, 131, .55); border-radius: 3px; box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
#appRoot .lh-encyclopedia-detail-copy { padding: 0 clamp(22px, 3vw, 42px) clamp(24px, 3vw, 42px); }
#appRoot .lh-encyclopedia-entry { display: block; margin: 0; }
#appRoot .lh-encyclopedia-entry section { display: grid; grid-template-columns: minmax(0, 145px) minmax(0, 1fr); gap: clamp(18px, 2.5vw, 34px); padding: clamp(22px, 2.6vw, 34px) 0; border: 0; border-top: 1px solid var(--lh-border); border-radius: 0; background: transparent; }
#appRoot .lh-encyclopedia-section-heading { display: flex; flex-direction: column; gap: 14px; }
#appRoot .lh-encyclopedia-section-heading > span { color: var(--lh-gold); font-family: var(--font-display); font-size: 2rem; line-height: 1; }
#appRoot .lh-encyclopedia-entry h4 { margin: 0; color: var(--lh-text); font-size: 1.35rem; line-height: 1.1; }
#appRoot .lh-encyclopedia-section-body { min-width: 0; }
#appRoot .lh-encyclopedia-entry p { max-width: 67ch; margin: 0 0 1em; color: var(--lh-muted); font-size: .88rem; line-height: 1.75; overflow-wrap: anywhere; }
#appRoot .lh-encyclopedia-entry p:last-child { margin-bottom: 0; }
#appRoot .lh-encyclopedia-related-card .lh-entry-monogram { width: 50px; height: 58px; }
#appRoot .lh-encyclopedia-sources { margin-top: 30px; }
#appRoot .lh-encyclopedia-sources ul { padding-left: 17px; list-style: disc; }
#appRoot .lh-encyclopedia-source { font-size: .76rem; }
#appRoot .lh-encyclopedia-detail-copy .lh-button-row { margin-top: 24px; }

@media (max-width: 1100px) {
  #appRoot .lh-encyclopedia-hero { grid-template-columns: 1fr; }
  #appRoot .lh-encyclopedia-hero-progress { max-width: 420px; }
  #appRoot .lh-encyclopedia-family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #appRoot .lh-encyclopedia-workspace { grid-template-columns: 1fr; }
  #appRoot .lh-encyclopedia-mobile-jump { display: inline-flex; justify-content: space-between; gap: 20px; width: 100%; margin: 0 0 18px; padding: 12px 0; border: 0; border-block: 1px solid var(--lh-border); background: transparent; color: var(--lh-gold); font: 600 .82rem 'Manrope', sans-serif; text-align: left; cursor: pointer; }
  #appRoot .lh-encyclopedia-mobile-jump:focus-visible { outline: 2px solid var(--lh-gold); outline-offset: 3px; }
  #appRoot .lh-encyclopedia-index { position: static; }
  #appRoot .lh-encyclopedia-workspace > .lh-encyclopedia-inline { order: -1; }
  #appRoot .lh-encyclopedia-index .lh-data-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
}

@media (max-width: 650px) {
  #appRoot .lh-encyclopedia-page > .lh-panel { padding: 20px 16px; }
  #appRoot .lh-encyclopedia-hero-copy h2 { font-size: clamp(2.7rem, 11vw, 4rem); }
  #appRoot .lh-encyclopedia-family-grid { grid-template-columns: 1fr; }
  #appRoot .lh-encyclopedia-family-card { min-height: 135px; }
  #appRoot .lh-encyclopedia-family-card.has-art { min-height: 180px; }
  #appRoot .lh-encyclopedia-index .lh-data-list { grid-template-columns: 1fr; }
  #appRoot .lh-encyclopedia-detail-layout.has-media { grid-template-columns: 1fr; }
  #appRoot .lh-encyclopedia-detail-layout .lh-encyclopedia-hero-img,
  #appRoot .lh-encyclopedia-detail-layout .lh-hermetism-symbol:not(.is-compact) { width: min(100%, 340px); max-height: 260px; aspect-ratio: 1.3; object-fit: contain; justify-self: center; }
  #appRoot .lh-encyclopedia-detail-layout .lh-encyclopedia-category-img { object-fit: cover; }
  #appRoot .lh-encyclopedia-detail-layout .lh-encyclopedia-portrait-img { aspect-ratio: 4 / 5; object-fit: cover; }
  #appRoot .lh-encyclopedia-stone-art { width: min(100%, 208px); justify-self: center; }
  #appRoot .lh-encyclopedia-entry section { grid-template-columns: 1fr; gap: 15px; }
  #appRoot .lh-encyclopedia-section-heading { flex-direction: row; align-items: baseline; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  #appRoot .lh-encyclopedia-family-card,
  #appRoot .lh-encyclopedia-inline { animation: none; transition: none; }
}
