/* Estilos del módulo encyclopedia. */
.wiki-tools { margin-bottom: 1.2rem; }
.wiki-filter-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; align-items: end; gap: .8rem; }
.wiki-filter-grid label { display: grid; gap: .35rem; font-weight: 700; }
.wiki-filter-grid input, .wiki-filter-grid select { width: 100%; min-height: 2.8rem; }
.wiki-results { margin: .9rem 0 0; color: var(--accent-2); font-weight: 800; }
.wiki-toc { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.wiki-toc h3 { margin-bottom: .45rem; }
.wiki-toc ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem 1.5rem; margin: 0; padding-left: 1.25rem; }
.wiki-catalog { display: grid; gap: 2rem; }
.wiki-category { scroll-margin-top: 7rem; }
.wiki-category-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }
.wiki-category-heading h2 { margin: .15rem 0; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.wiki-category-heading p:last-child { max-width: 760px; margin: 0; color: var(--muted); }
.wiki-category-heading .badge { flex: none; margin-top: .4rem; }
.wiki-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: .8rem; }
.wiki-entry { scroll-margin-top: 7rem; box-shadow: none; }
.wiki-entry h3 { margin: .15rem 0 .45rem; font-size: 1.18rem; }
.wiki-entry > p:not(.eyebrow):not(.wiki-action) { color: var(--muted); }
.wiki-entry > [data-wiki-open] { width: 100%; margin-top: .75rem; }
.wiki-entry-dialog { width: min(900px, calc(100% - 2rem)); padding: 0; overflow: hidden; }
.wiki-dialog-content { max-height: calc(100vh - 2rem); padding: 1.4rem; overflow: auto; }
.wiki-dialog-content > h2 { padding-right: 2rem; }
.wiki-dialog-help {
  padding: .75rem; border-left: 4px solid var(--accent); border-radius: 6px;
  background: var(--surface-2); color: var(--text);
}
.wiki-dialog-close {
  position: sticky; bottom: -1.4rem; margin: 1.4rem -1.4rem -1.4rem;
  padding: 1rem 1.4rem; border-top: 1px solid var(--line); background: var(--surface);
}
.wiki-core-facts { margin: 1rem 0; }
.wiki-core-facts > div { padding: .65rem 0; border-top: 1px solid var(--line); }
.wiki-core-facts dt, .wiki-specs dt { color: var(--accent-2); font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.wiki-core-facts dd, .wiki-specs dd { margin: .2rem 0 0; }
.wiki-entry details { margin-top: .8rem; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.wiki-entry summary { color: var(--accent); font-weight: 800; cursor: pointer; }
.wiki-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.wiki-specs > div { min-width: 0; }
.wiki-requirements h4 { margin: .8rem 0 .25rem; }
.wiki-requirements ul { margin: 0; padding-left: 1.25rem; }
.wiki-action { margin: .8rem 0 0; }
.wiki-empty { margin: 1rem 0; border-style: dashed; }
.level-calculator {
  margin-top: 1rem; padding: 1rem; border: 1px solid var(--line-strong);
  border-radius: 8px; background: var(--surface-2);
}
.level-calculator h3, .level-calculator h4 { margin: 0 0 .35rem; }
.level-calculator > p { margin: .35rem 0 .8rem; }
.level-calculator .inline-form label { width: min(100%, 13rem); }
.level-calculator-result {
  min-height: 3rem; margin: .9rem 0 0 !important; color: var(--text) !important;
  font-variant-numeric: tabular-nums;
}
body.tabbed-navigation [data-tab-scope="encyclopedia"] .wiki-catalog { display: block; }

@media (max-width: 900px) {
  .wiki-filter-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .wiki-filter-grid { grid-template-columns: 1fr; }
  .wiki-entry-dialog { width: calc(100% - 1rem); max-height: calc(100vh - 1rem); }
  .wiki-dialog-content { max-height: calc(100vh - 1rem); padding: 1rem; }
  .wiki-dialog-close { bottom: -1rem; margin: 1rem -1rem -1rem; padding: .8rem 1rem; }
}
