/* Template: glossary term (brand v3). Order of reading: the definition (cut-corner card in the hero),
   the full text with "On this page" for long terms, then related terms, guides and the service beside it. Classes "gl-". */

/* hero: the term, then the definition card straight under it */
.term-hero h1 { font-size: clamp(2.5rem, 1.3rem + 5vw, 5.4rem); font-weight: 800; letter-spacing: -0.05em; line-height: 0.95; margin: 0.9rem 0 1.8rem; max-width: 20ch; text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
.gl-def { max-width: 48rem; --cut: 52px; --dotd: 32px; }
.gl-def .definition { max-width: none; border-radius: 18px; box-shadow: none; background: #fff; padding: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); }
.gl-def .definition__q { padding-right: 2.6rem; margin-bottom: 0.7rem; }
.definition p:first-child { font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; padding-right: 2.6rem; }
.definition a.term { color: inherit; text-decoration: underline dotted 2px; text-decoration-color: var(--lamp); text-underline-offset: 0.22em; }
.definition a.term:hover { text-decoration-style: solid; }
.definition .aka { margin-top: 1rem; color: var(--slate); }
/* the card is white inside the black hero: links and focus rings go dark again */
.page-hero .gl-def .definition a:not(.term):not(.btn):not(.more) { color: var(--ink); }
.page-hero .gl-def :focus-visible { outline-color: var(--lamp); }

/* body + aside */
.gl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: clamp(2rem, 1rem + 4vw, 5rem); padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem) clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.gl-body { max-width: 42rem; }
.gl-body > h2 { padding-top: 1.5rem; border-top: 1px solid #d4d4d9; }
.gl-body table { display: block; overflow-x: auto; }
.gl-body img { max-width: 100%; height: auto; }

/* "On this page" for long terms: a white panel at the top of the text, not sticky */
.gl-body .gl-toc { position: static; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.3rem; }
.gl-body .gl-toc summary { min-height: 44px; font-weight: 700; color: var(--ink); }
.gl-body .gl-toc ol { padding-left: 0; gap: 0; margin-top: 0.4rem; }
.gl-body .gl-toc li { margin: 0; }
.gl-body .gl-toc a { padding-block: 0.55rem; text-decoration: none; }
.gl-body .gl-toc + * { margin-top: 2rem; }
@media (min-width: 700px) { .gl-body .gl-toc ol { display: block; columns: 2; column-gap: 1.5rem; } .gl-body .gl-toc li { break-inside: avoid; } }

/* aside: plain blocks under a black rule; only the service panel sticks while the text scrolls */
.gl-aside { display: flex; flex-direction: column; gap: 2rem; align-self: stretch; position: static; max-height: none; overflow: visible; }
.gl-aside__block { border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.gl-label { font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 0.8rem; }
.gl-chips { gap: 0.45rem; }
.gl-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0.4rem 0.95rem; background: #fff; font-size: 0.92rem; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.gl-chips a:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.gl-links { list-style: none; padding: 0; }
.gl-links li + li { border-top: 1px solid #d4d4d9; }
.gl-links a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 44px; padding: 0.7rem 0; font-weight: 600; line-height: 1.35; color: var(--ink); text-decoration: none; }
.gl-links a::after { content: "\2192"; flex: none; transition: transform 0.2s; }
.gl-links a:hover { text-decoration: underline; text-decoration-color: var(--lamp); }
.gl-links a:hover::after { transform: translateX(3px); }

.svc-mini.gl-svc { position: sticky; top: calc(var(--header-h) + 1.5rem); padding: 1.5rem; border-radius: 18px; background: var(--night); color: #fff; }
.gl-svc .promo-title { font-size: 1.35rem; margin: 0.5rem 0; color: #fff; }
.gl-svc p { color: var(--mist); font-size: 0.95rem; }
.gl-svc p a { color: #fff; font-weight: 600; text-decoration: underline; text-decoration-color: var(--lamp); text-underline-offset: 0.18em; }
.gl-svc .btn { margin-top: 1.1rem; min-height: 44px; }
.gl-svc .svc-mini__more { margin-top: 1rem; }

/* previous / next */
.gl-prevnext { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: 3rem; }
.gl-prevnext a { display: grid; gap: 0.25rem; padding: 1.1rem 1.3rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; line-height: 1.3; transition: border-color 0.2s; }
.gl-prevnext a:hover { border-color: var(--ink); }
.gl-prevnext a[rel="next"] { text-align: right; }
.gl-prevnext .meta { color: var(--slate); }
.gl-prevnext b { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.02em; }

/* core terms and the way back to the letter: editorial rows under a rule */
.gl-core { padding-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.gl-core__row { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1rem 2rem; align-items: start; padding-block: 1.5rem; border-top: 1px solid #d4d4d9; }
.gl-core__row .gl-label { margin: 0.6rem 0 0; }
.gl-letter-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

@media (max-width: 1000px) {
  .gl-layout { grid-template-columns: minmax(0, 1fr); }
  .svc-mini.gl-svc { position: static; }
}
@media (max-width: 640px) {
  .gl-core__row { grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
  .gl-prevnext { grid-template-columns: minmax(0, 1fr); }
  .gl-prevnext a[rel="next"] { text-align: left; }
  .gl-prevnext > span:empty { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-chips a, .gl-links a::after, .gl-prevnext a { transition: none; }
}

/* ---------- human touch (2026-11-20): a hand-drawn stroke under the term, softer headings in the text ---------- */
.term-hero h1 { margin-bottom: 0.5rem; }
.gl-hand { width: min(11rem, 60%); height: 0.9rem; margin: 0 0 1.6rem 0.15rem; }
.gl-body > h2 { font-weight: 700; letter-spacing: -0.025em; }
.gl-body > h3 { font-weight: 600; letter-spacing: -0.015em; }
.gl-svc .promo-title { font-weight: 600; }
.gl-prevnext b { font-weight: 700; }
.gl-body table { font-variant-numeric: tabular-nums lining-nums; }
