/* ============================================================
   Jim McGee Coaching — Narcissistic Abuse Glossary
   Scoped styles for WordPress (Custom HTML block)

   INJECT via GeneratePress Elements → After Footer hook,
   assigned to all glossary pages.

   ALL rules scoped under .nag to prevent conflicts with
   the site's existing WordPress / GeneratePress CSS.

   CSS custom properties prefixed --nag- avoid collisions
   with WP's --white, --base, etc.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600&family=Lato:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@500;600;700&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700;8..60,800&display=swap');

/* ---------- Wrapper & tokens ---------- */
.nag {
  --nag-ink:      #1F1F1F;
  --nag-body:     #3C3C3C;
  --nag-muted:    #666666;
  --nag-hairline: #E4E0D6;
  --nag-paper:    #F8F6F1;
  --nag-mist:     #F3F4EE;
  --nag-cream:    #EEEAE2;
  --nag-sage:       #748572;
  --nag-sage-deep:  #5A6858;
  --nag-sage-tint:  #DFE5D7;
  --nag-navy:     #002A52;   /* legacy token — NOT used for links (zero blue in brand) */
  --nag-link:     #3D5245;   /* deep sage — the brand link color */
  --nag-slate:    #2D3946;
  --nag-serif: 'Lato', system-ui, sans-serif;
  --nag-sans:  'Lato', system-ui, -apple-system, sans-serif;
  --nag-head:  'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --nag-eyebrow: 'Montserrat', system-ui, -apple-system, sans-serif;
  --nag-display: 'Cinzel', Georgia, serif;
  --nag-shadow: 0 6px 24px rgba(31,31,31,.07);
  --nag-r: 14px;

  font-family: var(--nag-sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--nag-body);
  max-width: 780px;
  margin: 0 auto;
  padding: 16px 0 90px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Reset WP overrides inside .nag */
.nag p { margin-bottom: 16px !important; font-family: var(--nag-sans); }
.nag ul, .nag ol { margin-left: 0 !important; padding-left: 24px; margin-bottom: 18px; }
.nag li { margin-bottom: 8px; }
.nag li::marker { color: var(--nag-sage-deep); }
.nag h1, .nag h2, .nag h3, .nag h4, .nag h5, .nag h6 {
  font-family: var(--nag-head) !important;
  color: #1A1A1A !important;
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.006em;
}
.nag em { font-style: italic; color: var(--nag-ink); }
.nag strong { font-weight: 700; color: var(--nag-ink); }
.nag blockquote {
  margin: 22px 0;
  padding: 14px 20px;
  border-left: 3px solid var(--nag-sage);
  background: var(--nag-mist);
  border-radius: 0 10px 10px 0;
  color: var(--nag-body);
  font-style: italic;
}

/* Prevent WP's article link style from leaking into UI elements */
.nag .jump a,
.nag .related__row a,
.nag .btn,
.nag .cat-chip,
.nag .crumb a { border-bottom: none !important; }

/* ---------- Eyebrows / kickers / labels — Montserrat (echoes the logo tagline) ---------- */
.nag .hub-intro .eyebrow,
.nag .cat-header .eyebrow,
.nag .term__eyebrow,
.nag .related__label,
.nag .reframe .k,
.nag .author-box__eyebrow,
.nag .coach-cta .k,
.nag-s-cat {
  font-family: var(--nag-eyebrow) !important;
  font-weight: 600 !important;
}

/* ---------- Search trigger bar ---------- */
.nag .nag-search {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 1.5px solid var(--nag-hairline);
  border-radius: 999px;
  padding: 13px 18px;
  font-family: var(--nag-sans);
  font-size: 16px;
  color: var(--nag-muted);
  cursor: pointer;
  text-align: left;
  margin: 0 0 32px;
  box-shadow: 0 1px 6px rgba(31,31,31,.07);
  transition: border-color .15s, box-shadow .15s;
}
.nag .nag-search:hover { border-color: var(--nag-sage); box-shadow: 0 2px 12px rgba(116,133,114,.13); }
.nag .nag-search kbd {
  margin-left: auto;
  font-family: var(--nag-sans);
  font-size: 11px;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--nag-hairline);
  border-radius: 5px;
  padding: 2px 7px;
  color: var(--nag-muted);
}

/* ---------- Breadcrumb ---------- */
.nag .crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--nag-muted);
  margin-bottom: 22px;
  font-family: var(--nag-sans);
}
.nag .crumb a { color: var(--nag-link); font-weight: 600; text-decoration: none; }
.nag .crumb a:hover { color: var(--nag-sage-deep); }

/* ---------- Category header ---------- */
.nag .cat-header { border-bottom: 1px solid var(--nag-hairline); padding-bottom: 28px; margin-bottom: 6px; }
.nag .cat-header .eyebrow {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--nag-sage-deep); font-weight: 700; margin: 0 0 14px !important;
  font-family: var(--nag-sans);
}
.nag .cat-header h1 { font-size: clamp(30px, 4vw, 44px); margin: 0 0 18px !important; font-weight: 700; letter-spacing: -.018em; color: #1A1A1A !important; }
.nag .cat-header .intro { font-size: 18.5px; color: var(--nag-body); max-width: 64ch; margin: 0 !important; }

/* ---------- Jump chips (in-page nav) ---------- */
.nag .jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 6px; }
.nag .jump a {
  font-size: 13px; font-weight: 600; color: var(--nag-sage-deep);
  background: var(--nag-sage-tint); border-radius: 999px; padding: 7px 14px;
  text-decoration: none; transition: background .15s, color .15s;
  font-family: var(--nag-sans);
}
.nag .jump a:hover { background: var(--nag-sage); color: #fff; }

/* ---------- Hub — category cards ---------- */
.nag .cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 24px 0 0; }

.nag .cat-card {
  display: flex;
  flex-direction: column;
  background: var(--nag-white, #fff);
  border: 1px solid var(--nag-hairline);
  border-radius: 18px;
  padding: 26px 26px 22px;
  color: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(31,31,31,.05);
  transition: transform .24s cubic-bezier(.2,.8,.4,1),
              box-shadow .24s ease,
              border-color .24s ease,
              background .24s ease;
  outline: none;
}
/* Sage accent bar that sweeps in from the left on hover */
.nag .cat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--nag-sage-deep), var(--nag-sage));
  border-radius: 18px 18px 0 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .3s cubic-bezier(.2,.8,.4,1);
  pointer-events: none;
}
.nag .cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 56px rgba(116,133,114,.16), 0 4px 14px rgba(31,31,31,.06);
  border-color: var(--nag-sage);
  background: #fdfcf9;
}
.nag .cat-card:hover::before { transform: scaleX(1); }
.nag .cat-card:focus-visible {
  border-color: var(--nag-sage);
  box-shadow: 0 0 0 3px var(--nag-sage-tint);
}

.nag .cat-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.nag .cat-card__num {
  font-family: var(--nag-serif);
  font-size: 14px;
  color: var(--nag-sage-deep);
  font-weight: 600;
  transition: color .2s ease;
  letter-spacing: .04em;
}
.nag .cat-card:hover .cat-card__num { color: var(--nag-sage); }

.nag .cat-card__count {
  font-size: 12px;
  color: var(--nag-muted);
  background: var(--nag-mist);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
.nag .cat-card:hover .cat-card__count {
  background: var(--nag-sage-tint);
  color: var(--nag-sage-deep);
}

.nag .cat-card h3 { font-size: 20px; margin: 0 0 9px !important; }
.nag .cat-card p  { margin: 0 0 14px !important; font-size: 14.5px; color: var(--nag-body); line-height: 1.48; }
.nag .cat-card__terms { margin-top: auto; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }

/* Individual term chips — links */
.nag .cat-chip {
  display: inline-block;
  font-size: 12px;
  color: var(--nag-sage-deep);
  background: var(--nag-sage-tint);
  border-radius: 999px;
  padding: 3px 10px;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--nag-sans);
  border-bottom: none !important;
  transition: background .15s ease, color .15s ease, transform .14s ease;
}
.nag .cat-chip:hover {
  background: var(--nag-sage);
  color: #fff;
  transform: translateY(-1px);
}
.nag .cat-chip--hidden { display: none; }
.nag .cat-chip--appearing { animation: nag-chip-in .18s ease both; }
@keyframes nag-chip-in {
  from { opacity: 0; transform: scale(.8) translateY(3px); }
  to   { opacity: 1; transform: none; }
}

/* "+N more" expand button */
.nag .cat-chip-more {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--nag-muted);
  background: none;
  border: 1.5px dashed #CCC8BC;
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 600;
  font-family: var(--nag-sans);
  cursor: pointer;
  line-height: 1.7;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.nag .cat-chip-more:hover {
  border-color: var(--nag-sage);
  color: var(--nag-sage-deep);
  background: var(--nag-sage-tint);
}
.nag .cat-chip-more--hiding {
  animation: nag-chip-out .18s ease both;
  pointer-events: none;
}
@keyframes nag-chip-out {
  to { opacity: 0; transform: scale(.7); }
}

/* ---------- Hub intro ---------- */
.nag .hub-intro { margin-bottom: 36px; }
.nag .hub-intro .eyebrow { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--nag-sage-deep); font-weight: 700; margin: 0 0 14px !important; font-family: var(--nag-sans); }
.nag .hub-intro h1 { font-size: clamp(32px, 4.5vw, 50px); margin: 0 0 18px !important; font-weight: 700; letter-spacing: -.02em; color: #1A1A1A !important; }
.nag .hub-intro p { font-size: 18px; }
.nag .hub-intro p.fine { font-size: 15px; color: var(--nag-muted); }
.nag .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 56px 0 18px; }
.nag .section-head h2 { font-size: 26px; margin: 0 !important; }
.nag .section-head .count { font-size: 13px; color: var(--nag-muted); }

/* Hub nav wrapper — visually sets off the browse section on desktop */
.nag .hub-nav-wrap {
  background: var(--nag-sage-tint);
  border: 1px solid #C8D4BE;
  border-radius: 22px;
  padding: 24px 24px 30px;
  margin-top: 36px;
  margin-bottom: 28px;
  box-shadow: 0 3px 16px rgba(116,133,114,.12);
}
.nag .hub-nav-wrap .section-head { margin: 0 0 16px; }
.nag .hub-nav-wrap .cat-grid    { margin-top: 0; }

/* Collapse button — plain text, no border */
.nag .cat-chip-collapse {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--nag-muted);
  background: none;
  border: none;
  padding: 3px 8px;
  font-weight: 600;
  font-family: var(--nag-sans);
  cursor: pointer;
  line-height: 1.7;
  transition: color .15s;
}
.nag .cat-chip-collapse:hover { color: var(--nag-sage-deep); }

/* ---------- Callout box ---------- */
.nag .callout { background: var(--nag-cream); border: 1.5px solid var(--nag-hairline); border-radius: 16px; padding: 22px 26px; margin: 28px 0; }
.nag .callout h3 { font-size: 18px; margin: 0 0 8px !important; }
.nag .callout p { margin: 0 0 10px !important; font-size: 15.5px; }
.nag .callout p:last-child { margin-bottom: 0 !important; }

/* ---------- Term articles ---------- */
.nag .term { padding: 42px 0; border-bottom: 1px solid var(--nag-hairline); scroll-margin-top: 90px; }
.nag .term:last-of-type { border-bottom: none; }
.nag .term__eyebrow { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--nag-muted); font-weight: 700; margin: 0 0 8px !important; font-family: var(--nag-sans); }
.nag .term h2 { font-size: 30px; margin: 0 0 18px !important; }
.nag .term h3 { font-size: 19px; margin: 28px 0 10px !important; }
.nag .term h4 { font-size: 16px; margin: 20px 0 8px !important; letter-spacing: 0; }
.nag .term .lead { font-size: 19px; color: var(--nag-ink); line-height: 1.55; }

/* Reframe callout (NARM-informed "why your reaction makes sense") */
.nag .reframe {
  background: var(--nag-sage-tint);
  border-left: 4px solid var(--nag-sage);
  border-radius: 0 14px 14px 0;
  padding: 20px 24px;
  margin: 24px 0 6px;
  box-shadow: 0 2px 18px rgba(116,133,114,.14);
}
.nag .reframe .k {
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--nag-sage-deep); margin: 0 0 10px !important; font-family: var(--nag-sans);
}
.nag .reframe .k::before {
  content: "";
  display: inline-block;
  width: 18px; height: 18px;
  flex: none;
  background-color: var(--nag-sage-deep);
  -webkit-mask: url("assets/lotus-mark.png") center/contain no-repeat;
  mask: url("assets/lotus-mark.png") center/contain no-repeat;
}
.nag .reframe p { margin: 0 !important; color: var(--nag-ink); font-size: 16.5px; }
.nag .reframe p + p { margin-top: 10px !important; }

/* ---------- Related terms ---------- */
.nag .related { margin-top: 28px; }
.nag .related__label { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--nag-muted); font-weight: 700; margin: 0 0 11px !important; font-family: var(--nag-sans); }
.nag .related__row { display: flex; flex-wrap: wrap; gap: 9px; }
.nag .related__row a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--nag-sage-deep);
  background: var(--nag-sage-tint); border: none;
  border-radius: 999px; padding: 7px 14px;
  text-decoration: none; font-family: var(--nag-sans);
  transition: background .15s, color .15s;
}
.nag .related__row a:hover { background: var(--nag-sage); color: #fff; border-bottom: none !important; }
.nag .related__row a .x { opacity: .7; }

/* ---------- Author box ---------- */
.nag .author-box {
  background: var(--nag-cream);
  border: 1px solid var(--nag-hairline);
  border-radius: 20px;
  padding: 30px 34px;
  margin: 54px 0 0;
  box-shadow: var(--nag-shadow);
}
.nag .author-box__hd { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }
.nag .author-box__photo {
  width: 76px; height: 76px; border-radius: 50%; overflow: hidden;
  background: #fff; color: var(--nag-sage-deep);
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--nag-hairline), 0 4px 14px rgba(42,55,66,.12);
  font-size: 20px; font-weight: 700; font-family: var(--nag-sans);
  display: flex; align-items: center; justify-content: center;
  flex: none; letter-spacing: .04em;
}
.nag .author-box__photo img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; display: block; }
.nag .author-box__eyebrow { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--nag-sage-deep); font-weight: 700; margin: 0 0 5px !important; font-family: var(--nag-eyebrow); }
.nag .author-box__name { font-size: 22px; margin: 0 0 4px !important; color: var(--nag-ink); line-height: 1.1; font-family: var(--nag-head); }
.nag .author-box__role { font-size: 13px; color: var(--nag-muted); font-style: italic; margin: 0 !important; }
.nag .author-box__bio { font-size: 15.5px; color: var(--nag-body); margin: 0 0 20px !important; line-height: 1.6; }
.nag .author-box__btn {
  display: inline-flex; align-items: center;
  background: var(--nag-sage); color: #fff !important;
  font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 13px 24px; border-radius: 999px; text-decoration: none;
  font-family: var(--nag-sans); border-bottom: none !important; transition: background .15s;
}
.nag .author-box__btn:hover { background: var(--nag-sage-deep); color: #fff !important; }

/* ---------- Coaching CTA panel ---------- */
.nag .coach-cta {
  margin-top: 32px;
  background: #B4C9AA;
  border-radius: 20px;
  padding: 48px 52px;
  text-align: center;
}
.nag .coach-cta .k { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #3B5234; font-weight: 700; margin: 0 auto 16px !important; font-family: var(--nag-sans); text-align: center !important; display: block; max-width: none !important; width: 100%; }
.nag .coach-cta h2 { color: #1A2B17 !important; font-size: 30px; margin: 0 0 24px !important; line-height: 1.22; }
.nag .coach-cta p { color: #2D3E28 !important; font-size: 16px; margin: 0 auto 14px !important; max-width: 52ch; line-height: 1.65; }
.nag .coach-cta .fine { font-size: 13px !important; color: #4A6040 !important; margin: 16px auto 0 !important; font-style: italic; }
.nag .btn {
  display: inline-flex; align-items: center;
  background: #fff; color: #2D3E28 !important;
  font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 28px; border-radius: 999px;
  text-decoration: none; font-family: var(--nag-sans);
  border-bottom: none !important; transition: background .15s, color .15s;
  margin-top: 10px;
}
.nag .btn:hover { background: #2D3E28; color: #fff !important; }

/* ============================================================
   Search overlay — injected by glossary.js into document.body
   ============================================================ */
.nag-search-ov { position: fixed; inset: 0; z-index: 99999; display: none; }
.nag-search-ov.open { display: block; }
.nag-search-ov__scrim { position: absolute; inset: 0; background: rgba(45,57,70,.52); backdrop-filter: blur(3px); }
.nag-search-ov__panel {
  position: relative; max-width: 660px; margin: 8vh auto 0; background: var(--nag-paper, #F8F6F1);
  border-radius: 18px; box-shadow: 0 24px 70px rgba(31,31,31,.22);
  overflow: hidden; display: flex; flex-direction: column; max-height: 80vh;
  animation: nag-pop .16s ease-out; font-family: 'Lato', system-ui, sans-serif;
}
@keyframes nag-pop { from{transform:translateY(-8px);opacity:.6;} to{transform:none;opacity:1;} }
@media (prefers-reduced-motion:reduce){.nag-search-ov__panel{animation:none;}}
.nag-search-ov__bar { display: flex; align-items: center; gap: 13px; padding: 18px 20px; border-bottom: 1px solid #E4E0D6; background: #fff; }
.nag-search-ov__bar input { flex: 1; border: none; background: none; font-family: inherit; font-size: 19px; color: #1F1F1F; outline: none; }
.nag-search-ov__bar input::placeholder { color: #666; }
.nag-search-ov__close { background: #2D3946; border: none; border-radius: 7px; font-family: inherit; font-size: 11px; font-weight: 700; color: #fff; padding: 6px 11px; cursor: pointer; transition: background .15s; }
.nag-search-ov__close:hover { background: #748572; }
.nag-search-ov__results { overflow-y: auto; padding: 8px; }
.nag-s-hint { padding: 16px 16px 22px; color: #666; font-size: 14px; }
.nag-s-hint b { color: #1F1F1F; font-weight: 700; }
.nag-s-cat { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #666; font-weight: 700; padding: 14px 14px 6px; }
.nag-s-item { display: block; padding: 11px 14px; border-radius: 11px; text-decoration: none; color: inherit; }
.nag-s-item.sel, .nag-s-item:hover { background: #DFE5D7; }
.nag-s-item__name { font-weight: 700; color: #1F1F1F; font-size: 15.5px; margin: 0 0 2px; }
.nag-s-item__name .hl { background: rgba(116,133,114,.3); border-radius: 3px; padding: 0 1px; }
.nag-s-item__meta { font-size: 12.5px; color: #666; }
.nag-s-item__blurb { font-size: 13px; color: #3C3C3C; margin-top: 3px; line-height: 1.4; }
.nag-s-empty { padding: 30px 16px; text-align: center; color: #666; }
body.nag-noscroll { overflow: hidden; }

/* ---------- Inline contextual cross-links (auto-linked in prose) ---------- */
.nag .nag-xref {
  color: var(--nag-sage-deep);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(116,133,114,.42);
  text-underline-offset: 2.5px;
  border-bottom: none !important;
  transition: color .15s, text-decoration-color .15s;
}
.nag .nag-xref:hover {
  color: var(--nag-sage);
  text-decoration-color: var(--nag-sage);
}

/* ---------- Collapsible long jump-nav ---------- */
.nag .jump--collapsible.is-collapsed {
  max-height: 104px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
          mask-image: linear-gradient(180deg, #000 60%, transparent);
}
.nag .jump-toggle {
  margin: 12px 0 2px;
  background: none;
  border: none;
  padding: 4px 0;
  font-family: var(--nag-sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--nag-sage-deep);
  cursor: pointer;
  transition: color .15s;
}
.nag .jump-toggle:hover { color: var(--nag-sage); text-decoration: underline; }

/* ---------- Hub "start here" most-looked-up row ---------- */
.nag .hub-popular { margin: 30px 0 0; }
.nag .hub-popular__label {
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: var(--nag-muted); margin: 0 0 12px !important;
}
.nag .hub-popular__row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hub card heading link (a11y: real link, not nested role) ---------- */
.nag .cat-card__link { color: inherit; text-decoration: none; border-bottom: none !important; }
.nag .cat-card:hover .cat-card__link { color: var(--nag-ink); }
.nag .cat-card__link:focus-visible { outline: 3px solid var(--nag-sage); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Back-to-top button (injected into body by glossary.js)
   ============================================================ */
.nag-backtop {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: #5A6858; border: 1px solid #E4E0D6;
  box-shadow: 0 6px 20px rgba(31,31,31,.14);
  cursor: pointer;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .15s, color .15s, border-color .15s;
}
.nag-backtop.show { opacity: 1; transform: none; pointer-events: auto; }
.nag-backtop:hover { background: #748572; color: #fff; border-color: #748572; }
@media print { .nag-backtop { display: none; } }
@media (prefers-reduced-motion: reduce) { .nag-backtop { transition: opacity .2s ease; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 680px) {
  .nag { padding: 14px 0 70px; font-size: 16px; }
  .nag .cat-grid { grid-template-columns: 1fr; }
  .nag .coach-cta { padding: 32px 24px; }
  .nag .author-box { padding: 22px 20px; }
  .nag .term h2 { font-size: 25px; }
  .nag-search-ov__panel { margin: 0; max-width: none; height: 100dvh; max-height: none; border-radius: 0; }
}

/* ============================================================
   MOBILE WAYFINDING — added 2026-06-11
   Two pieces that help a reader who lands deep on a single term
   (straight from Google) realize they're inside a 78-term glossary:
     1. .crumb-sticky  — condensed breadcrumb, MOBILE ONLY (<900px),
        pinned under the header. Replaces the long 3-level .crumb on
        mobile; desktop keeps the full crumb + the always-visible rail.
     2. .glossary-explore — end-of-page "Explore the glossary" block
        (real HTML links, all viewports), before the author box.
   Counts in .glossary-explore mirror glossary-data.js; update them in
   the term-change checklist (nested CLAUDE.md) when a category grows.
   ============================================================ */

/* --- 1. Sticky condensed breadcrumb (mobile only) --- */
.crumb-sticky { display: none; }
@media (max-width: 899px) {
  /* Hide the long 3-level crumb ONLY on pages that have the sticky strip (the 6 section
     pages). Scoped with :has() so the hub + A–Z keep their own crumb on mobile. If a browser
     lacks :has(), both crumbs simply show — redundant, never broken. */
  .content:has(.crumb-sticky) .nag > .crumb { display: none; }
  .crumb-sticky {
    display: flex; align-items: center; gap: 7px;
    position: sticky; top: 64px; z-index: 90;  /* header is 64px (+1px border) at 600–899px */
    /* full-bleed: break out of the padded content column so it reads as a bar, not a box */
    width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    padding: 9px 20px;
    background: var(--paper);                  /* blends into the page at rest — no white band */
    border-bottom: 1px solid transparent;      /* reserved; colored only when stuck (avoids a 1px jump) */
    box-shadow: 0 4px 12px rgba(42, 55, 66, 0);
    transition: border-color .2s ease, box-shadow .2s ease;
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 11.5px;
    letter-spacing: .02em; white-space: nowrap; overflow: hidden;
  }
  /* JS adds .is-stuck once the page scrolls underneath — only then does it lift
     off the content with a hairline + soft shadow. Flat and invisible at rest. */
  .crumb-sticky.is-stuck {
    border-bottom-color: var(--hairline);
    box-shadow: 0 4px 12px rgba(42, 55, 66, .05);
  }
  .crumb-sticky a { color: var(--sage-deep); text-decoration: none; flex: none; }
  .crumb-sticky a:hover { color: var(--sage); }
  .crumb-sticky .sep { color: #b9bdb2; flex: none; display: inline-flex; }
  .crumb-sticky .here { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 599px) {
  .crumb-sticky { top: 58px; padding: 9px 16px; }  /* header is 58px on phones */
}
/* background uses var(--paper), which already flips in dark mode — no override needed */

/* --- 2. "Explore the glossary" end block (all viewports) --- */
.glossary-explore {
  margin: 10px 0 4px; padding: 30px 24px 26px;
  background: var(--mist);          /* warm off-white, not the harsh pure --white */
  border: 1px solid var(--hairline); border-radius: 18px;
  box-shadow: 0 1px 6px rgba(42, 55, 66, .035);   /* whisper-soft, not a popping card */
}
.glossary-explore__eyebrow {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 11px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--sage);
  text-align: center; margin: 0 0 10px;
}
.glossary-explore__title {
  font-family: 'Source Serif 4', Georgia, serif; font-weight: 700; font-size: 25px;
  line-height: 1.15; color: var(--ink); text-align: center; margin: 0 0 6px;
}
.glossary-explore__sub { font-size: 14px; color: var(--muted); text-align: center; margin: 0 0 20px; }
.glossary-explore__search {
  display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  background: var(--sage); color: #fff; border: none; cursor: pointer;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase; padding: 14px; border-radius: 10px;
  margin: 0 0 22px; transition: background .16s;
}
.glossary-explore__search:hover { background: var(--sage-deep); }
.glossary-explore__search svg { width: 16px; height: 16px; flex: none; }
.glossary-explore__cats { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.glossary-explore__cats li { border-bottom: 1px solid var(--hairline); }
.glossary-explore__cats a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-decoration: none; padding: 14px 4px;
}
.glossary-explore__cats .lbl {
  font-family: 'Source Serif 4', Georgia, serif; font-weight: 600; font-size: 16px; color: var(--ink);
}
.glossary-explore__cats a:hover .lbl { color: var(--sage-deep); }
.glossary-explore__cats .ct {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12px;
  color: var(--sage-deep); background: var(--sage-tint); border-radius: 999px; padding: 3px 11px; flex: none;
}
.glossary-explore__az {
  display: block; text-align: center; margin-top: 20px; text-decoration: none;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--sage-deep);
}
.glossary-explore__az:hover { color: var(--sage); }
@media (min-width: 900px) {
  .glossary-explore { max-width: 640px; margin-left: auto; margin-right: auto; }
}

/* --- Hub card 07: A–Z Index --- */
/* Spans both grid columns on desktop so the letter grid has room to breathe */
@media (min-width: 681px) {
  .cat-card--az { grid-column: 1 / -1; }
}
.cat-card__az {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 5px;
}
.cat-card__az a,
.cat-card__az span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 12.5px;
  text-decoration: none; line-height: 1;
}
.cat-card__az a { background: var(--sage-tint); color: var(--sage-deep); transition: background .15s, color .15s; }
.cat-card__az a:hover { background: var(--sage); color: #fff; }
.cat-card__az span { color: var(--hairline); }

/* --- A–Z list: full-row tap targets (mobile a11y) ---
   Stretched-link pattern: .az-item is the positioning context;
   .az-term::after fills it invisibly so the whole row is tappable.
   One real link, one large target — no nested links, no a11y regressions. */
.az-item { position: relative; }
.az-item:hover { background: var(--sage-tint); }
.az-term::after { content: ""; position: absolute; inset: 0; }
