/*
 * Education layer: "Explain this" icons and popovers, the Simple / Detailed
 * toggle, Key takeaways, locked previews, the Learn hub, video, article and
 * glossary pages, and "Learn about" on asset pages. Theme tokens only
 * (styles.css); no panels or fills, just rules and the page ground.
 */

/* ---- Shared ---------------------------------------------------------------- */
.learn-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- "Explain this" icon -------------------------------------------------- */
/* 18px to look at, with an invisible 44px tap area that takes no space, so
   placing an icon (or a slot before it loads) never changes a line's height. */
.explain.explain,
.explain-slot {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  min-width: 0;
  min-height: 0;
  margin: 0 0 0 0.3em;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  vertical-align: -0.15em;
  line-height: 1;
  flex: none;
  cursor: pointer;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}
.explain-slot { cursor: default; }
.explain.explain::before { content: ""; position: absolute; inset: calc((1.125rem - 44px) / 2); border-radius: 50%; }
.explain.explain[aria-expanded="true"] { color: var(--ink); }
.explain.explain:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.explain svg { display: block; width: 1rem; height: 1rem; }
/* Inside headings set in the heading font, keep the icon the same size. */
h1 .explain, h2 .explain, h3 .explain, h4 .explain, dt .explain, th .explain { font-size: 1rem; }

/* ---- Popover / bottom sheet ----------------------------------------------- */
.explain-pop {
  position: absolute;
  z-index: 1000;
  box-sizing: border-box;
  width: min(22rem, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  overflow-y: auto;
  padding: 0.875rem 1.125rem 1rem;
  background: var(--ground);
  color: var(--ink);
  border: 1px solid var(--muted);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: left;
  letter-spacing: normal;
  text-transform: none;
  font-weight: 400;
}
.explain-pop[hidden] { display: none; }
.explain-pop:focus { outline: none; }
.explain-pop:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.explain-pop__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.explain-pop__title { margin: 0.375rem 0 0; font-family: var(--font-heading); font-weight: 700; font-size: 1.0625rem; line-height: 1.3; }
.explain-pop .explain-pop__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -0.5rem -0.75rem 0 0;
  padding: 0;
  flex: none;
  color: var(--muted);
}
.explain-pop__body { margin: 0.25rem 0 0; }
.explain-pop__body div + div { margin-top: 0.625rem; }
.explain-pop__body dt { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.explain-pop__body dd { margin: 0.125rem 0 0; }
.explain-pop__foot { margin-top: 0.875rem; padding-top: 0.75rem; border-top: 1px solid var(--rule); display: grid; gap: 0.25rem; }
.explain-pop__more { color: var(--ink); text-underline-offset: 0.15em; display: inline-flex; align-items: center; min-height: 44px; }
.explain-pop .learn-edu { margin: 0; }

/* Phones: a bottom sheet across the screen. */
.explain-pop.is-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: auto;
  max-height: 80vh;
  padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  border-width: 1px 0 0;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.16);
  animation: explain-sheet-in 0.2s ease-out;
}
.explain-pop.is-sheet::before {
  content: "";
  position: absolute;
  top: 0.5rem;
  left: 50%;
  width: 2.5rem;
  height: 4px;
  margin-left: -1.25rem;
  border-radius: 2px;
  background: var(--rule);
}
@keyframes explain-sheet-in { from { transform: translateY(1.5rem); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .explain-pop.is-sheet { animation: none; } }

/* ---- Simple / Detailed ----------------------------------------------------- */
.learn-mode { display: inline-flex; border: 1px solid var(--muted); border-radius: 4px; padding: 2px; gap: 2px; flex: none; }
.learn-mode .learn-mode__btn {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  min-width: 0;
  padding: 0 0.875rem;
  border: 0;
  border-radius: 3px;
  font-size: 0.9375rem;
  color: var(--muted);
  background: transparent;
}
.learn-mode .learn-mode__btn[aria-pressed="true"] { background: var(--selected-bg); color: var(--selected-ink); }
.learn-mode-field { display: flex; flex-direction: column; gap: 0.25rem; }
.learn-mode-field__label { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* Simple mode's one-line summaries, and Detailed-only content. */
.learn-summary {
  display: none;
  max-width: 46rem;
  margin: 0 0 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule);
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.5;
}
html[data-learn-mode="simple"] .learn-summary { display: block; }
html[data-learn-mode="simple"] .learn-detail-only { display: none !important; }

/* ---- Labels ------------------------------------------------------------------ */
.learn-tier {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.0625rem 0.5rem;
  border-radius: 999px;
  background: var(--selected-bg);
  color: var(--selected-ink);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}
.learn-level,
.learn-sample {
  display: inline-block;
  padding: 0 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5rem;
  white-space: nowrap;
}
.learn-level--beginner { border-color: var(--success); color: var(--ink); }
.learn-level--advanced { border-color: var(--ink); color: var(--ink); }
.learn-sample { border-style: dashed; }
.learn-edu { margin: 1.5rem 0 0; color: var(--muted); font-size: 0.8125rem; line-height: 1.5; }
.learn-edu a { color: var(--muted); text-underline-offset: 0.15em; }
.learn-edu a:hover { color: var(--ink); }

/* ---- Key takeaways -------------------------------------------------------- */
.learn-takeaways {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem 1.125rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink);
  border-radius: 6px;
  max-width: 52rem;
}
.learn-takeaways__title { margin: 0; font-size: 1rem; font-weight: 700; }
.learn-takeaways ul { margin: 0.5rem 0 0; padding-left: 1.25rem; line-height: 1.55; }
.learn-takeaways li + li { margin-top: 0.25rem; }

/* ---- Cards ------------------------------------------------------------------- */
.learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1.25rem; }
.learn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
}
.learn-card[hidden] { display: none; }
.learn-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; min-height: 1.5rem; color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.learn-card__len { margin-right: auto; }
.learn-card__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.learn-card__title a { color: var(--ink); text-decoration: none; }
.learn-card__title a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.learn-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.learn-card:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.learn-card__title a:focus-visible { outline: none; }
.learn-card:hover { border-color: var(--muted); }
.learn-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.learn-card__more { position: relative; z-index: 1; margin: auto 0 0; font-size: 0.9375rem; }
.learn-card__more a, .learn-locked__more a { color: var(--ink); text-underline-offset: 0.15em; display: inline-flex; align-items: center; min-height: 44px; }

/* Video thumbnail: a dotted field with the play mark; never an image file. */
.learn-vcard__thumb { display: block; color: var(--ink); text-decoration: none; }
.learn-thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background-image: radial-gradient(var(--rule) 1px, transparent 1.2px);
  background-size: 14px 14px;
  background-position: 7px 7px;
  color: var(--ink);
  overflow: hidden;
}
.learn-thumb__cat {
  position: absolute;
  top: 0.5rem;
  left: 0.625rem;
  padding: 0 0.375rem;
  background: var(--ground);
  color: var(--muted);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.learn-thumb__len {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  padding: 0 0.375rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--ground);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.learn-thumb__mid { display: flex; align-items: center; gap: 0.75rem; padding: 0.25rem; background: var(--ground); border-radius: 999px; }
.learn-thumb__logo { width: 2.5rem; height: 2.5rem; }
.learn-thumb__play svg { display: block; width: 2.5rem; height: 2.5rem; }
.learn-thumb--big .learn-thumb__play svg, .learn-thumb--big .learn-thumb__logo { width: 4rem; height: 4rem; }
.learn-vcard.is-locked .learn-thumb__mid { opacity: 0.55; }

/* Reading card */
.learn-rcard__source { margin: 0; color: var(--muted); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.learn-rcard .learn-card__title { -webkit-line-clamp: 3; min-height: 0; }
.button.button--ghost.learn-cta { width: auto; padding: 0 0.25rem 0 0; white-space: nowrap; }
.learn-rcard__link { position: relative; z-index: 1; margin-top: auto; align-self: flex-start; }

/* Locked preview: what it is, and how to get it. */
.learn-locked {
  display: grid;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.125rem;
  border: 1px dashed var(--muted);
  border-radius: 8px;
}
.learn-locked--thumb { grid-template-columns: minmax(0, 12rem) 1fr; }
.learn-locked__title { margin: 0; font-weight: 700; line-height: 1.4; }
.learn-locked__line { margin: 0.375rem 0 0; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.learn-locked__more { margin: 0.25rem 0 0; font-size: 0.9375rem; }
@media (max-width: 599px) { .learn-locked--thumb { grid-template-columns: 1fr; } }

/* ---- Asset pages: Learn about ----------------------------------------------- */
.learn-about__grid { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: start; }
.learn-about__grid--novideo { grid-template-columns: minmax(0, 1fr); }
.learn-about__reading-title { margin-top: 2rem; }
.learn-case { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 1.75rem; }
.learn-case__col { padding-top: 0.75rem; border-top: 2px solid var(--rule); }
.learn-case__col--for { border-top-color: var(--success); }
.learn-case__col--against { border-top-color: var(--danger); }
.learn-case__col--risks { border-top-color: var(--ink); }
.learn-case__title { margin: 0; font-size: 0.9375rem; font-weight: 700; }
.learn-case ul { margin: 0.5rem 0 0; padding-left: 1.125rem; font-size: 0.9375rem; line-height: 1.5; }
.learn-case li + li { margin-top: 0.375rem; }
@media (max-width: 1023px) { .learn-case { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .learn-about__grid { grid-template-columns: 1fr; } }

/* ---- Demo tier switcher (?tier=...) ---------------------------------------- */
.learn-tierbar {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0 0.375rem 0 0.75rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ground);
  color: var(--ink);
  font-size: 0.8125rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}
.learn-tierbar__label { margin-right: 0.25rem; color: var(--muted); }
.learn-tierbar a {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  color: var(--muted);
  text-decoration: none;
}
.learn-tierbar a[aria-current] { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 0.2em; }
@media (max-width: 419px) { .learn-tierbar__label { display: none; } }
/* Room below the footer so the preview bar never covers its last line. */
body.has-learn-tierbar { padding-bottom: 4.5rem; }

/* ---- Learn pages ---------------------------------------------------------- */
.learn-page {
  max-width: 76rem;
  margin: 0 auto;
  padding: calc(var(--site-header-h, 0px) + clamp(2rem, 5vw, 3.5rem)) 1rem clamp(3rem, 8vw, 6rem);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .learn-page { padding-left: 2.5rem; padding-right: 2.5rem; } }
.learn-page a:not(.button) { color: var(--ink); text-underline-offset: 0.15em; }
.learn-page--narrow { max-width: 50rem; }
.learn-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.learn-title {
  margin: 0;
  font-weight: 400;
  font-size: var(--section-title-size);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.learn-lead { margin: 0.75rem 0 0; max-width: 42rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.55; }
.learn-back { margin: 0 0 1.25rem; font-size: 0.9375rem; }
.learn-back a { display: inline-flex; align-items: center; min-height: 44px; }
.learn-section { padding: clamp(1.75rem, 4vw, 2.5rem) 0; border-top: 1px solid var(--rule); scroll-margin-top: calc(var(--site-header-h, 0px) + 1rem); }
.learn-head + .learn-section, .learn-head + .learn-edu + .learn-section { margin-top: 2rem; }
.learn-section__title {
  margin: 0 0 1rem;
  font-weight: 400;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
  line-height: 1.2;
}
.learn-section__intro { margin: -0.25rem 0 1.25rem; max-width: 42rem; color: var(--muted); }
.learn-label { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* Start here: progress and the five steps. */
.learn-progress { display: flex; align-items: center; gap: 1rem; max-width: 36rem; margin: 0 0 1.25rem; }
.learn-progress__text { margin: 0; flex: none; min-width: 7.5rem; font-variant-numeric: tabular-nums; }
.learn-progress__track { flex: 1; height: 6px; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.learn-progress__fill { display: block; height: 100%; width: 0; background: var(--ink); transition: width 0.3s ease; }
@media (prefers-reduced-motion: reduce) { .learn-progress__fill { transition: none; } }
.learn-path { list-style: none; margin: 0; padding: 0; counter-reset: step; max-width: 52rem; }
.learn-path__step { display: grid; grid-template-columns: 44px 2rem minmax(0, 1fr); align-items: start; gap: 0 0.5rem; padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.learn-path__step:last-child { border-bottom: 1px solid var(--rule); }
.learn-path__check { display: grid; place-items: center; width: 44px; height: 44px; margin: -0.375rem 0 0; cursor: pointer; }
.learn-path__check input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--ink); cursor: pointer; }
.learn-path__num { color: var(--muted); font-size: 0.9375rem; line-height: 2rem; }
.learn-path__title { margin: 0; font-size: 1.0625rem; font-weight: 700; line-height: 2rem; }
.learn-path__title a { text-decoration: none; }
.learn-path__title a:hover { text-decoration: underline; }
.learn-path__meta { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.learn-path__step.is-done .learn-path__title a { color: var(--muted); }

/* Filters */
.learn-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1rem; margin: 0 0 1.25rem; }
.learn-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.learn-chip.learn-chip {
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9375rem;
}
.learn-chip.learn-chip[aria-pressed="true"] { background: var(--selected-bg); border-color: var(--selected-bg); color: var(--selected-ink); }
.learn-field { display: flex; flex-direction: column; gap: 0.25rem; }
.learn-field__label { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.learn-select, .learn-input {
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 2rem 0 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 4px;
}
select.learn-select {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.learn-select option { color: #000; background: #fff; }
.learn-input { padding-right: 0.75rem; width: 100%; }
.learn-count { margin: 0 0 1rem; color: var(--muted); font-size: 0.9375rem; min-height: 1.5em; }
.learn-empty { margin: 0; color: var(--muted); }
.learn-empty[hidden] { display: none; }

/* Glossary teaser on the hub */
.learn-terms { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.learn-terms li { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- Video page ----------------------------------------------------------- */
.learn-player {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  margin: 1.5rem 0 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  background-image: radial-gradient(var(--rule) 1px, transparent 1.2px);
  background-size: 16px 16px;
}
.learn-player iframe, .learn-player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.learn-player__soon { display: grid; justify-items: center; gap: 0.5rem; padding: 1rem 1.5rem; background: var(--ground); border-radius: 12px; text-align: center; }
.learn-player__soon svg { width: 3.5rem; height: 3.5rem; color: var(--muted); }
.learn-player__soon p { margin: 0; }
.learn-player__soon-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; }
.learn-player__soon-note { color: var(--muted); font-size: 0.875rem; max-width: 26rem; }
.learn-player .learn-player__play {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
  padding: 0 1.5rem 0 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ground);
  color: var(--ink);
  font-size: 1.0625rem;
}
.learn-player .learn-player__play svg { width: 2.25rem; height: 2.25rem; }
.learn-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0.75rem 0 0; color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.learn-body { max-width: 46rem; font-size: 1.0625rem; line-height: 1.65; }
.learn-body p { margin: 0.75rem 0 0; }
.learn-body h2 { margin: 2rem 0 0; font-size: 1.375rem; font-weight: 700; line-height: 1.3; }
.learn-transcript { margin: 1.5rem 0 0; max-width: 46rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.learn-transcript summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.learn-transcript summary::-webkit-details-marker { display: none; }
.learn-transcript summary::after { content: "+"; font-weight: 400; font-size: 1.375rem; color: var(--muted); }
.learn-transcript[open] summary::after { content: "–"; }
.learn-transcript__body { padding: 0 0 1rem; line-height: 1.65; }
.learn-transcript__body p { margin: 0 0 0.75rem; }
.learn-related { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; padding: 0; list-style: none; }
.learn-related li { display: inline-flex; align-items: center; min-height: 44px; }
.learn-done { display: inline-flex; align-items: center; gap: 0.625rem; min-height: 44px; cursor: pointer; font-weight: 500; }
.learn-done input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--ink); }
.learn-steps-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.learn-steps-nav a { display: inline-flex; flex-direction: column; min-height: 44px; justify-content: center; text-decoration: none; }
.learn-steps-nav a span:first-child { color: var(--muted); font-size: 0.8125rem; }
.learn-steps-nav__next { margin-left: auto; text-align: right; align-items: flex-end; }

/* ---- Learn glossary ---------------------------------------------------------- */
.learn-gloss__controls { display: grid; gap: 1rem; max-width: 46rem; margin-top: 2rem; }
/* A-Z bar: sticks under the menu bar while the terms scroll and lets go at
   the end of .learn-gloss__body, so it never reaches the footer. Sticky
   keeps its place in the page, so nothing moves when it catches. Solid
   page ground: terms never show through. One row; where it is wider than
   the screen (phones) it swipes sideways, with no scrollbar drawn, and
   learn-pages.js keeps the current letter in view. --gloss-stop is just
   under the bar: headings land there (scroll-margin-top), and the group
   crossing it is the current letter. The body needs overflow-x: clip
   (.glossary-page, styles.css) or sticky does nothing. */
.learn-gloss__body {
  --gloss-az-h: calc(44px + 2px);
  --gloss-stop: calc(var(--site-header-h, 0px) + var(--gloss-az-h) + 1rem);
  max-width: 46rem;
  margin-top: 1rem;
}
.learn-gloss__az { position: sticky; top: var(--site-header-h, 0px); z-index: 5; margin-bottom: 1rem; background: var(--ground); border-block: 1px solid var(--rule); }
.learn-gloss__letters { display: flex; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.learn-gloss__letters::-webkit-scrollbar { display: none; }
.learn-gloss__letters li { flex: 1 0 auto; }
.learn-gloss__letters a { display: grid; place-items: center; min-width: 44px; min-height: 44px; text-decoration: none; transition: color 0.15s ease, text-shadow 0.15s ease; }
@media (min-width: 768px) { .learn-gloss__letters a { min-width: 1.5rem; } }
/* No terms (or none matching the search): dimmed text, not a link. */
.learn-gloss__letters a:not([href]) { color: var(--rule); cursor: default; }
/* The current letter, a hover and keyboard focus: the site's yellow, with
   the thin black outline in Light (--canary-halo is none in Dark). The
   focus ring sits inside the letter: the swiping row would clip it. */
.learn-gloss__letters a[aria-current="true"],
.learn-gloss__letters a[href]:focus-visible { color: var(--canary); text-shadow: var(--canary-halo); }
.learn-gloss__letters a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 4px; }
@media (hover: hover) {
  .learn-gloss__letters a[href]:hover { color: var(--canary); text-shadow: var(--canary-halo); }
}
@media (prefers-reduced-motion: no-preference) { html:has(.learn-gloss__body) { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .learn-gloss__letters a { transition: none; } }
.learn-gloss__group { max-width: 46rem; }
.learn-gloss__letter { margin: 2rem 0 0; font-size: 1.5rem; font-weight: 400; color: var(--muted); scroll-margin-top: var(--gloss-stop); }
.learn-gloss__term { padding: 1rem 0 1.25rem; border-bottom: 1px solid var(--rule); scroll-margin-top: var(--gloss-stop); }
.learn-gloss__term:target { border-bottom-color: var(--ink); }
.learn-gloss__name { display: flex; align-items: baseline; gap: 0.5rem; margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.learn-gloss__group-tag { color: var(--muted); font-family: var(--font-body); font-size: 0.8125rem; font-weight: 400; }
.learn-gloss__anchor { margin-left: auto; color: var(--muted) !important; font-family: var(--font-body); font-size: 0.875rem; font-weight: 400; text-decoration: none; display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
.learn-gloss__anchor:hover { color: var(--ink) !important; }
.learn-gloss__parts { margin: 0.25rem 0 0; display: grid; gap: 0.625rem; }
.learn-gloss__parts dt { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.learn-gloss__parts dd { margin: 0.125rem 0 0; line-height: 1.55; }
.learn-gloss__more { margin: 0.5rem 0 0; font-size: 0.9375rem; }
.learn-gloss__more a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- Homepage and dashboards ------------------------------------------------ */
/* Feature visuals keep their fixed rows: the icon sits inline after the label. */
.fv-check__label .explain, .fv-score__name .explain { margin-left: 0.25em; }
