/* ==========================================================================
   Glossary (/glossary; owner, Nov 22, 2026). Hero: the Blogs featured card
   (home.css .bl-hero, .bl-feat) on the glossary's own background, ruled
   lines like a dictionary page with a soft Signal glow (owner: "keep the
   background different"), the H1 in the card and the term read
   (term-read.js) where a cover would be. Body: one page scroll, no tabs.
   Each group is a head row and a grid of term cards; cards come in as they
   enter view ([data-draw] → .is-in); reduced motion shows everything.
   ========================================================================== */

/* The glossary's own background: ruled lines and a margin rule, fading out
   at the edges, with a glow behind the card. */
.gl-band {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 70% at 72% 50%, rgba(34, 211, 238, .10), transparent 70%),
    linear-gradient(90deg, transparent calc(var(--inset) + 28px), rgba(249, 138, 132, .22) calc(var(--inset) + 28px), rgba(249, 138, 132, .22) calc(var(--inset) + 29px), transparent calc(var(--inset) + 29px)),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(232, 239, 243, .07) 31px 32px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}

/* Hero picture: the term read, in the cover's frame and shape. */
.gl-feat .gl-feat-art { position: relative; aspect-ratio: 16 / 10; background: var(--canvas); }
.gl-feat .gl-feat-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gl-feat .bl-title { color: var(--ink); }
.gl-body { padding-top: clamp(48px, 6vw, 80px); }

/* Groups: a head row (name, line, count), then the cards. */
.gl-groups { display: flex; flex-direction: column; gap: clamp(56px, 7vw, 88px); }
.gl-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 6px 18px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.gl-head h2 { scroll-margin-top: 160px; font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.gl-head p { color: var(--muted); font-size: var(--t-s); }
.gl-count { color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gl-intro { max-width: 64ch; margin-top: 16px; color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.gl-intro a { color: var(--signal); text-decoration: none; }

.gl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.gl-card {
  scroll-margin-top: 160px; display: flex; flex-direction: column;
  padding: 22px 22px 24px; border: 1px solid var(--rule); border-radius: var(--radius-lg);
  background: var(--surface); transition: border-color var(--d-2) var(--ease), transform var(--d-2) var(--ease);
}
.gl-card:hover { border-color: rgba(255, 255, 255, .2); }
.gl-card:target { border-color: rgba(34, 211, 238, .55); }
.gl-card:target h3 dfn { color: var(--signal); }
.gl-card h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.gl-card dfn { font-style: normal; }
.gl-card h3 small { color: var(--muted); font-size: .8125rem; font-weight: 400; letter-spacing: 0; }
.gl-card p { margin-top: 12px; color: rgba(232, 239, 243, .86); font-size: .9375rem; line-height: 1.6; }
.gl-card p.gl-why { margin-top: auto; padding-top: 14px; color: var(--muted); font-size: .875rem; }
.gl-card p + p.gl-why { border-top: 1px solid var(--rule); margin-top: 16px; }
.gl-card a { color: var(--signal); text-decoration: none; }
.gl-card a:hover { color: var(--signal-hover); }

[data-draw].gl-card { opacity: 0; transform: translateY(8px); transition: opacity 420ms var(--ease), transform 420ms var(--ease), border-color var(--d-2) var(--ease); transition-delay: calc(var(--i, 0) * 60ms), calc(var(--i, 0) * 60ms), 0ms; }
[data-draw].gl-card.is-in { opacity: 1; transform: none; }

@media (max-width: 1080px) { .gl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 740px) {
  .gl-head { grid-template-columns: minmax(0, 1fr) auto; }
  .gl-head p { grid-column: 1 / -1; grid-row: 2; }
  .gl-grid { grid-template-columns: minmax(0, 1fr); }
  .gl-card { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-draw].gl-card { opacity: 1; transform: none; transition: none; }
}
