/* The nutrition glossary (landing/tools/glossary.mjs): inside src/learn.html, after learn.css, with the landing's system
   (docs/landing-sistema.md): Yema with the title, the search box of the design system (.ym-search) and the topics as
   chips with their count beside the terms on a desktop (above them on a phone), like the FAQ page; each term with its
   anchor, its definition, the related terms, where Yema explains it as soft raspberry pills and its sources with the
   green «fuente oficial» mark. DS tokens, light only; contrast AA (muted text is --ink-muted, never opacity). */

.gl-layout{display:grid;grid-template-columns:272px minmax(0,1fr);gap:clamp(28px,4vw,56px);align-items:start;margin-top:8px}
.gl-side{position:sticky;top:calc(var(--head) + 20px);display:flex;flex-direction:column;gap:14px}
.gl-search{width:100%}
.gl-search svg{flex:none;color:var(--berry)}
.gl-chips{flex-direction:column;align-items:stretch;margin:0}
.gl-chips a{justify-content:flex-start;gap:10px;padding:0 12px 0 14px}
.gl-chips a:hover{box-shadow:inset 0 0 0 1.5px var(--berry-mark)}
.gl-chips a[hidden]{display:none}
.gl-n{margin-left:auto;min-width:24px;height:24px;padding:0 7px;box-sizing:border-box;border-radius:9999px;display:inline-grid;place-items:center;background:var(--berry-soft);color:var(--berry);font-size:13px;line-height:1}

/* ===== The topics and their terms ===== */
.gl-topics{max-width:780px}
.gl-topic + .gl-topic{margin-top:40px}
.gl-topic[hidden],.gl-term[hidden],.gl-none[hidden]{display:none}
.gl-topic-h{display:flex;align-items:center;gap:12px;margin:0 0 4px;font-family:var(--font-display);font-weight:400;font-size:clamp(28px,3.2vw,36px);line-height:1.15;letter-spacing:-.01em;scroll-margin-top:calc(var(--head) + 16px)}
.gl-topic-ic{flex:none;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:var(--berry-soft);color:var(--berry)}
.gl-list{margin:0}
.gl-term{padding:18px 0;border-bottom:1px solid var(--line);scroll-margin-top:calc(var(--head) + 16px)}
.gl-term dt{display:flex;align-items:baseline;gap:8px;margin:0 0 6px;font-size:19px;line-height:26px;font-weight:700;text-wrap:balance}
.gl-term dfn{font-style:normal}
.gl-anchor{color:var(--ink-muted);font-weight:600;text-decoration:none;opacity:0;transition:opacity .2s}
.gl-term:hover .gl-anchor,.gl-term:focus-within .gl-anchor,.gl-term:target .gl-anchor{opacity:1}
.gl-anchor:hover,.gl-anchor:focus-visible{color:var(--berry)}
.gl-term dd{margin:0}
.gl-def{margin:0;color:var(--ink);font-size:17px;line-height:27px;text-wrap:pretty}
.gl-see{margin:10px 0 0;font-size:15px;line-height:22px;color:var(--ink-muted)}
.gl-see span{font-weight:600}
.gl-see a{color:var(--link);font-weight:600;text-decoration-thickness:1px;text-underline-offset:3px}
.gl-see a:hover{color:var(--berry)}
.gl-rels{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 0;padding:0;list-style:none}
.gl-rel{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 14px 6px 12px;box-sizing:border-box;border-radius:9999px;background:var(--berry-soft);color:var(--berry);font:700 14px/18px var(--font-sans);text-decoration:none;transition:box-shadow .2s}
.gl-rel:hover{box-shadow:inset 0 0 0 1.5px var(--berry-mark)}
.gl-rel svg{flex:none;width:16px;height:16px}
.gl-src{display:flex;align-items:flex-start;gap:6px;margin:12px 0 0;font-size:14px;line-height:20px;color:var(--ink-muted)}
.gl-src svg{flex:none;width:16px;height:16px;margin-top:2px;color:var(--leaf)}
.gl-src a{color:var(--link);font-weight:700;text-decoration-thickness:1px;text-underline-offset:2px;overflow-wrap:anywhere}
/* The term someone came to by its link: its card lights up, once (the FAQ's). */
.gl-term:target{margin:0 -18px;padding:18px;border-radius:20px;border-bottom-color:transparent;background:var(--yolk-soft)}
@media (prefers-reduced-motion:no-preference){.gl-term:target{animation:gl-found 1.6s var(--ease) both}}
@keyframes gl-found{from{box-shadow:0 0 0 3px var(--berry-mark)}to{box-shadow:0 0 0 3px transparent}}
.gl-none{margin:8px 0 0;padding:16px 18px;border-radius:var(--radius-lg);background:var(--surface-sunken);color:var(--ink-muted);font-size:16px;line-height:24px}
.gl .ln-note{margin-top:48px}

@media (max-width:959px){
.gl-layout{grid-template-columns:minmax(0,1fr)}
.gl-side{position:static}
.gl-chips{flex-direction:row;flex-wrap:wrap}
.gl-n{margin-left:2px}
.gl-anchor{opacity:1}
}
@media (max-width:599px){
.gl-chips{gap:6px}
.gl-chips a{min-height:38px;padding:0 8px 0 12px;gap:6px;font-size:14px}
.gl-chips a svg{width:16px;height:16px}
.gl-term:target{margin:0 -12px;padding:18px 12px}
}
