/* Glossary (/glossary, /ordbog). Layout follows a split view: the list stays on the left, a term opens on the right.
   Flat colours, ink lines, no shadows. Everything sits inside .wrap or the split columns, never 100vw. */

/* breadcrumbs */
.gl-crumbs { margin: 0 0 22px; font-size: 14.5px; }
.gl-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; color: var(--ink-muted); }
.gl-crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--ink-faint); }
.gl-crumbs a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gl-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* index hero */
.gl-ihero { padding-bottom: 40px; }
.gl-ihero h1 { max-width: 14ch; }
.gl-search { display: block; margin-top: 28px; }
.gl-search input { max-width: 380px; }

/* sticky letters: plain mono letters, the current one in a filled circle */
.gl-azbar { position: sticky; top: 74px; z-index: 5; background: var(--ground); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gl-az { display: flex; gap: 2px; padding: 12px 0; overflow-x: auto; scrollbar-width: none; }
.gl-az::-webkit-scrollbar { display: none; }
.gl-l { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font: 500 15px var(--font-data); color: var(--ink); text-decoration: none; }
a.gl-l:hover { background: var(--sunken); }
a.gl-l[aria-current="true"] { background: var(--ink); color: var(--ground); }
.gl-l.gl-off { color: var(--ink-faint); opacity: .55; pointer-events: none; }
a.gl-l:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the list: names only, hairline rows, a small letter heading with room above */
.gl-list { list-style: none; margin: 0 0 72px; padding: 0; }
.gl-group { padding-top: 44px; scroll-margin-top: 140px; }
.gl-group[hidden], .gl-card[hidden] { display: none; }
.gl-gh { margin: 0 0 14px; font: 500 14px var(--font-data); color: var(--ink-faint); }
.gl-rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.gl-card a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; font-size: 19px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.gl-card a:hover { color: var(--accent); }
.gl-card a[aria-current="true"] { color: var(--accent); font-weight: 600; }
.gl-card a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* split view: closed = one column; open = list left, term right, both inside the page above the footer */
.gl-panel[hidden] { display: none; }
body.gl-open .gl-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
body.gl-open .gl-main .wrap { max-width: none; padding-left: 32px; padding-right: 32px; }
body.gl-open .gl-ihero h1 { font-size: clamp(34px, 3.6vw, 52px); }
body.gl-open .pg-cta-box { flex-direction: column; align-items: flex-start; }
.gl-panel { position: sticky; top: 74px; height: calc(100vh - 74px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-left: var(--stroke) solid var(--outline); }
.gl-ptop { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.gl-close { width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink); background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
.gl-close:hover { background: var(--sunken); }
.gl-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gl-panel-in { padding: 36px 44px 64px; }
.gl-ptitle { margin: 0; font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.024em; line-height: 1.08; }
.gl-panel .wrap { max-width: none; padding: 0; margin: 0; }
.gl-panel .gl-body { padding: 0; margin: 32px 0 0; }

/* term content (page and panel): definition as a lead paragraph, then plain sections */
.gl-narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.gl-hero h1 { max-width: none; }
.gl-def { margin: 22px 0 0; font-size: clamp(19px, 2vw, 22px); line-height: 1.55; color: var(--ink); max-width: 62ch; }
.gl-body { padding-top: 40px; padding-bottom: 24px; }
.gl-body h2 { margin: 44px 0 14px; font-size: clamp(22px, 2.4vw, 27px); letter-spacing: -0.02em; line-height: 1.2; }
.gl-body h2:first-child { margin-top: 0; }
.gl-body p { color: var(--ink-body); line-height: 1.7; max-width: 68ch; }
.gl-body p a, .gl-fx a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.gl-fx { margin: 14px 0 0; }
.gl-see { list-style: none; margin: 0 0 24px; padding: 0; border-top: 1px solid var(--line); }
.gl-see a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; font-size: 17px; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.gl-see a:hover { color: var(--accent); }
.gl-see a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* rows that lead somewhere carry the same arrow as the comparison cards */
.gl-go { flex: none; font-size: 20px; line-height: 1; color: var(--accent); transition: transform 160ms cubic-bezier(.23, 1, .32, 1); }
.gl-card a:hover .gl-go, .gl-see a:hover .gl-go { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .gl-go { transition: none; } }

/* phones and narrow windows: the term covers the screen, with the close button on top */
@media (max-width: 860px) {
  body.gl-open .gl-split { display: block; }
  body.gl-open .gl-main .wrap { padding-left: 24px; padding-right: 24px; }
  .gl-panel { position: fixed; inset: 0; z-index: 60; height: auto; border-left: 0; }
  body.gl-open { overflow: hidden; }
  .gl-panel-in { padding: 24px 20px 56px; }
}
@media (max-width: 560px) { .gl-l { width: 36px; height: 36px; } .gl-card a { font-size: 18px; padding: 15px 0; } }

/* The site gives the first block room below the floating bar via `.nav ~ main`; main sits inside the split here. */
.nav ~ .gl-split { padding-top: 84px; }
/* All 29 letters fit on one line on desktop; narrower columns scroll sideways. */
.gl-l { width: 36px; height: 36px; font-size: 14.5px; }
.gl-panel:focus { outline: none; }
/* Phones and tablets: every letter is a 44 px tap target; the visible circle stays 36 px inside it. */
@media (max-width: 860px) {
  .gl-az { gap: 0; }
  .gl-l { width: 44px; height: 44px; padding: 4px; background-clip: content-box; }
  .gl-close { width: 44px; height: 44px; }
}
