/* Índice compacto: los conceptos se leen al abrir cada nombre. */
.glossary-page { gap: 18px; }
.glossary-tools { display: grid; gap: 12px; min-width: 0; }
.glossary-search-row { position: relative; display: flex; align-items: center; gap: 10px; max-width: 554px; }
.glossary-search { display: flex; align-items: center; gap: 10px; width: min(100%, 500px); min-height: 46px; padding: 0 12px; border: 1px solid #465265; border-radius: 6px; background: #0d111780; }
.glossary-search-row .glossary-search { flex: 1; min-width: 0; }
.glossary-legend { min-width: 0; }
.glossary-info { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; border: 0; background: transparent; color: #bda7d6; }
.glossary-info svg { width: 21px; height: 21px; }
.glossary-info:hover, .glossary-info[aria-expanded="true"] { color: #e3cbff; }
.glossary-legend-panel { box-sizing: border-box; width: 100%; margin-top: 12px; padding: 20px; border: 1px solid #586073; border-radius: 8px; background: #161d28; color: var(--text); font-size: .75rem; line-height: 1.6; }
.glossary-legend-panel[hidden] { display: none; }
.glossary-legend-panel > strong { color: var(--text-bright); font-size: .8rem; }
.glossary-legend-panel ul { display: grid; gap: 10px; padding: 0; margin: 12px 0 0; list-style: none; }
.glossary-legend-panel li { display: flex; align-items: center; gap: 10px; }
.glossary-swatch { flex-shrink: 0; width: 16px; height: 16px; border-radius: 3px; background: var(--entry-color); }
.glossary-search:focus-within { border-color: #d2a8ff; outline: 1px solid #d2a8ff; }
.glossary-search svg { width: 18px; height: 18px; flex-shrink: 0; color: #b7a2d0; }
.glossary-search input { width: 100%; min-width: 0; height: 44px; border: 0; outline: none; background: transparent; color: var(--text-bright); font: inherit; font-size: 16px; }
.glossary-search input::placeholder { color: var(--muted); }
.glossary-results { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 16px; align-items: start; }
.glossary-alphabet { display: flex; flex-direction: column; gap: 2px; border-left: 1px solid #bc8cff18; }
.glossary-alphabet button { width: 44px; min-height: 44px; padding: 3px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); font: inherit; font-size: .78rem; }
.glossary-alphabet button[aria-pressed="true"] { color: #e3cbff; background: #bc8cff20; border-color: #bc8cff65; }
.glossary-alphabet button:hover:not(:disabled) { background: #bc8cff16; color: #e3cbff; }
.glossary-alphabet button:disabled { opacity: .35; cursor: default; }
.glossary-page :is(button, summary):focus-visible { outline: 2px solid #d2a8ff; outline-offset: 2px; border-radius: 3px; }
.glossary-index-heading { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; color: var(--muted); font-size: .72rem; line-height: 1.7; }
.glossary-index-heading p { margin: 0; color: #bda7d6; }
.glossary-index-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.glossary-index-actions button { min-height: 44px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 5px; color: #d2a8ff; font: inherit; }
.glossary-index-actions button:disabled { opacity: .45; cursor: default; }
.glossary-index-actions button:hover:not(:disabled) { background: #bc8cff15; }
.glossary-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.glossary-item-column { display: grid; align-content: start; gap: 8px; min-width: 0; margin: 0; padding: 0; list-style: none; }
.glossary-item-column li { min-width: 0; }
.glossary-color--violet { --entry-color: #d2a8ff; --entry-border: #bc8cff38; --entry-edge: #bc8cff80; --entry-bg: #211b3080; }
.glossary-color--blue { --entry-color: #a5d6ff; --entry-border: #79c0ff38; --entry-edge: #79c0ff80; --entry-bg: #172b4080; }
.glossary-color--green { --entry-color: #a2e6bd; --entry-border: #7ee7aa38; --entry-edge: #7ee7aa80; --entry-bg: #162e2780; }
.glossary-color--amber { --entry-color: #e8c77c; --entry-border: #e3b34138; --entry-edge: #e3b34180; --entry-bg: #332a1780; }
.glossary-color--cyan { --entry-color: #8cdae0; --entry-border: #56cbd638; --entry-edge: #56cbd680; --entry-bg: #15303580; }
.glossary-color--rose { --entry-color: #f2a6bf; --entry-border: #f28eae38; --entry-edge: #f28eae80; --entry-bg: #351d2980; }
.glossary-color--orange { --entry-color: #ffbc8a; --entry-border: #ffa65738; --entry-edge: #ffa65780; --entry-bg: #38271c80; }
.glossary-color--indigo { --entry-color: #b5bfff; --entry-border: #9daaff38; --entry-edge: #9daaff80; --entry-bg: #20274180; }
.glossary-color--pink { --entry-color: #eeb8ee; --entry-border: #dc9ee238; --entry-edge: #dc9ee280; --entry-bg: #38213980; }
.glossary-color--lime { --entry-color: #c7db8a; --entry-border: #b5cf7138; --entry-edge: #b5cf7180; --entry-bg: #2c321c80; }
.glossary-subtheme { display: block; margin-top: 3px; font-size: .65rem; line-height: 1.5; color: var(--muted); font-weight: normal; }
.glossary-pending { color: var(--muted); font-style: italic; }
.glossary-themes { min-width: 0; margin: 0; padding: 0; border: 0; }
.glossary-themes legend { padding: 0; margin-bottom: 8px; color: var(--muted); font-size: .72rem; }
.glossary-theme-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 14px; }
.glossary-theme-option { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; padding: 6px 8px; border: 1px solid transparent; border-radius: 5px; color: var(--entry-color); font-size: .72rem; line-height: 1.5; cursor: pointer; }
.glossary-theme-option:has(:checked) { border-color: var(--entry-edge); background: var(--entry-bg); }
.glossary-theme-option:hover { background: #ffffff06; }
.glossary-theme-option input { appearance: none; flex: 0 0 16px; width: 16px; height: 16px; margin: 0; border: 1px solid var(--entry-color); border-radius: 50%; background: transparent; }
.glossary-theme-option input:checked { background: var(--entry-color); box-shadow: inset 0 0 0 3px #0d1117; }
.glossary-theme-option input:focus-visible { outline: 2px solid var(--entry-color); outline-offset: 4px; }
.glossary-theme-option span { overflow-wrap: anywhere; }
.glossary-theme-option small { margin-left: auto; color: var(--muted); font-size: .65rem; }
.glossary-theme-all { --entry-color: #c9d1d9; --entry-edge: #8b949e60; --entry-bg: #8b949e12; }
.glossary-theme-filters { display: grid; max-width: 540px; gap: 12px; }
.glossary-theme-filters select:disabled { opacity: .6; }
.glossary-theme-filters label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: .72rem; }
.glossary-theme-filters select { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: 5px; background: #161b22; color: var(--text-bright); font: inherit; text-overflow: ellipsis; }
.glossary-theme-filters select:focus-visible { outline: 2px solid #d2a8ff; outline-offset: 2px; }
.glossary-legend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; align-items: start; }
.glossary-legend-panel > p { margin: 8px 0 12px; color: var(--muted); }
.glossary-legend-group { min-width: 0; padding: 7px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.glossary-legend-group summary { display: flex; gap: 10px; align-items: center; cursor: pointer; min-height: 32px; }
.glossary-legend-group summary::after { content: '+'; margin-left: auto; }
.glossary-legend-group[open] summary::after { content: '−'; }
.glossary-legend-group ul { margin: 8px 0 0 26px; gap: 7px; }
.glossary-entry { border: 1px solid var(--entry-border); border-left: 3px solid var(--entry-edge); border-radius: 6px; background: var(--entry-bg); overflow: hidden; }
.glossary-entry summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 12px; color: var(--entry-color); font-size: .85rem; line-height: 1.5; cursor: pointer; list-style: none; overflow-wrap: anywhere; }
.glossary-entry summary::-webkit-details-marker { display: none; }
.glossary-entry summary:focus-visible { outline-offset: -3px; }
.glossary-entry summary:hover, .glossary-entry[open] summary { color: var(--text-bright); background: #ffffff08; }
.glossary-entry-icon { color: var(--entry-color); opacity: .7; flex-shrink: 0; font-size: 1rem; }
.glossary-entry[open] .glossary-entry-icon { transform: rotate(45deg); }
.glossary-definition { padding: 8px 12px 16px; font-size: .78rem; line-height: 1.8; overflow-wrap: anywhere; }
.glossary-definition p { margin: 0; white-space: pre-wrap; }
.glossary-definition > div { margin-top: 12px; padding-left: 10px; border-left: 2px solid #7ee78760; }
.glossary-definition > div > span { color: #7ee7aa; font-size: .68rem; }
.glossary-definition > div > p { color: var(--muted); }
.glossary-empty { grid-column: 1 / -1; padding: 28px 0; color: var(--muted); font-size: .85rem; }
.glossary-empty button { min-height: 44px; color: #d2a8ff; text-decoration: underline; text-underline-offset: 4px; font: inherit; }
.glossary-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.glossary-pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; font-size: .72rem; color: var(--muted); }
.glossary-pagination[hidden] { display: none; }
.glossary-pagination button { min-height: 36px; padding: 5px 9px; border: 1px solid var(--border); border-radius: 5px; color: #d2a8ff; font: inherit; }
.glossary-pagination button:hover:not(:disabled) { background: #bc8cff15; }
.glossary-pagination :disabled { opacity: .45; cursor: default; }
.glossary-pagination label { display: inline-flex; align-items: center; gap: 6px; padding-inline: 4px; }
.glossary-pagination select { min-width: 48px; min-height: 36px; padding: 4px; border: 1px solid var(--border); border-radius: 5px; background: #161b22; color: var(--text-bright); font: inherit; }
.glossary-pagination select:focus-visible { outline: 2px solid #d2a8ff; outline-offset: 2px; }
@media (max-width: 760px) {
  .glossary-index { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .glossary-theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary-legend-grid { grid-template-columns: minmax(0, 1fr); }
  .glossary-legend-panel { padding: 16px; }
}
@media (max-width: 600px) {
  .glossary-theme-filters { grid-template-columns: minmax(0, 1fr); }
  .glossary-theme-filters select { font-size: 16px; }
  .glossary-page { gap: 18px; }
  .glossary-results { gap: 8px; }
  .glossary-theme-options { grid-template-columns: minmax(0, 1fr); }
  .glossary-pagination { justify-content: space-between; width: 100%; }
  .glossary-pagination button { min-width: 40px; min-height: 44px; }
  .glossary-pagination button > span { display: none; }
  .glossary-pagination select { min-height: 44px; font-size: 16px; }
}
