/* ============================================================
   File: assets/css/glossary.css
   Purpose: The glossary's own two surfaces — the A-Z index additions
            (term-name links, layer chips, the count lede) and the
            per-term page at /glossary/<slug>: definition callout, cited
            source, "where this comes up", related-term cards, prev/next
            pager, soft CTA, and the browse sidebar with its letter jump.
            Loaded from the styles section of BOTH glossary views.
   Scope:   Additive to assets/css/blog.css, which already owns the index's
            letter nav, group headings and .glossary-term-block/-name/-def/
            -source rules. Nothing here redefines those — this file only
            adds what the per-term pages and the new index affordances need.
   Tokens:  --ccc-* from assets/css/site.css :root. Class roles ported from
            /var/www/ispecllc/css/glossary.css 2026-09-26 and re-themed;
            that file's token names map onto this site's as:
              --ink        -> --ccc-ink          --line      -> --ccc-border
              --ink-soft   -> --ccc-body-soft    --paper     -> #ffffff
              --muted      -> --ccc-muted        --band      -> --ccc-ink
              --teal       -> --ccc-teal         --surface   -> --ccc-surface
              --teal-deep  -> --ccc-teal-dark
              --teal-tint  -> --ccc-callout-tint
            ispecllc's --serif/--display split collapses to --ccc-font-sans
            (this site is Inter only), and its inline SVG icons become
            Font Awesome 7 solid glyphs, which the layout already loads.
   Author:  iSpec LLC
   Created: 2026-09-26
   Last Modified: 2026-09-26 — created (per-term glossary pages)
   ============================================================ */

/* ── INDEX ADDITIONS ─────────────────────────────────────── */
/* The lede line above the A-Z run: "468 terms, A to Z…". */
.glossary-lede {
  color: var(--ccc-on-dark-soft);
  margin-bottom: 0;
  max-width: 620px;
}
.glossary-count {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ccc-muted);
  margin-bottom: 20px;
}

/* Term names are links to their own page now; the heading keeps its size
   from blog.css (.glossary-term-name) and only the anchor is styled. */
.glossary-term-name a {
  color: var(--ccc-ink);
}
.glossary-term-name a:hover,
.glossary-term-name a:focus {
  color: var(--ccc-teal-dark);
  text-decoration: none;
}

/* Layer chip beside a term name on the index, and the legend above it. */
.glossary-term-layer {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--ccc-callout-tint);
  color: var(--ccc-teal-dark);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}
.glossary-layer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.glossary-layer-legend li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--ccc-border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--ccc-body-soft);
}
.glossary-layer-legend span {
  font-weight: 600;
  color: var(--ccc-teal-dark);
}

/* ── TERM PAGE — LAYOUT ──────────────────────────────────── */
.term-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
@media (min-width: 992px) {
  .term-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; }
}
.term-article {
  max-width: 780px;
  min-width: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ccc-body-soft);
}
.term-article h2 {
  font-size: 1.5rem;
  margin: 0 0 16px;
}
.term-article h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

/* ── TERM PAGE — DEFINITION CALLOUT ──────────────────────── */
/* The snippet target: the whole point of the page, so it leads. */
.term-definition {
  margin: 0 0 16px;
  padding: 22px 26px;
  border-left: 4px solid var(--ccc-teal);
  border-radius: 0 6px 6px 0;
  background: var(--ccc-callout-tint);
}
.term-definition-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ccc-teal-dark);
  margin-bottom: 8px;
}
.term-definition p {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ccc-ink);
}
.term-source {
  font-size: 14px;
  color: var(--ccc-muted);
  margin-bottom: 0;
}
.term-source a {
  color: var(--ccc-teal-dark);
  word-break: break-word;
}
.term-source .fa-arrow-up-right-from-square {
  font-size: 0.7em;
  margin-left: 2px;
}

.term-section { margin-top: 40px; }

/* ── TERM PAGE — WHERE THIS COMES UP ─────────────────────── */
.term-usage {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.term-usage a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--ccc-border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ccc-teal-dark);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}
.term-usage a:hover,
.term-usage a:focus {
  border-color: var(--ccc-teal);
  background: var(--ccc-callout-tint);
  text-decoration: none;
}
.term-usage-kind {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ccc-muted);
}

/* ── TERM PAGE — RELATED TERM CARDS ──────────────────────── */
.term-related {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 640px) {
  .term-related { grid-template-columns: 1fr 1fr; }
}
.term-card {
  padding: 18px 20px;
  border: 1px solid var(--ccc-border);
  border-top: 3px solid var(--ccc-teal);
  border-radius: 6px;
  background: #ffffff;
  transition: transform 0.2s, box-shadow 0.2s;
}
.term-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.term-card h3 { margin-bottom: 6px; }
.term-card h3 a { color: var(--ccc-ink); }
.term-card h3 a:hover,
.term-card h3 a:focus { color: var(--ccc-teal-dark); text-decoration: none; }
.term-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ccc-muted);
}

/* ── TERM PAGE — PREV / NEXT ─────────────────────────────── */
.term-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--ccc-border);
}
.term-pager a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 48%;
  color: var(--ccc-ink);
}
.term-pager-next { margin-left: auto; text-align: right; align-items: flex-end; }
.term-pager-kicker {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ccc-muted);
}
.term-pager-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ccc-teal-dark);
}
.term-pager a:hover .term-pager-label,
.term-pager a:focus .term-pager-label { text-decoration: underline; }

/* ── TERM PAGE — SOFT CTA ────────────────────────────────── */
/* Quiet register: it points at this site's own guides and cost pages, not
   at the parent brand (funnel_site_ispec_posture). */
.term-cta {
  margin-top: 48px;
  padding: 32px 28px;
  border-radius: 6px;
  background: var(--ccc-ink);
  color: var(--ccc-on-dark-soft);
  text-align: center;
}
.term-cta h2 { color: var(--ccc-on-dark); margin-bottom: 10px; }
.term-cta p {
  max-width: 620px;
  margin: 0 auto 20px;
  color: var(--ccc-on-dark-soft);
}
.term-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.term-cta-actions a {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid var(--ccc-teal);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.term-cta-primary { background: var(--ccc-teal); color: var(--ccc-ink); }
.term-cta-primary:hover,
.term-cta-primary:focus { background: var(--ccc-teal-dark); color: var(--ccc-ink); text-decoration: none; }
.term-cta-secondary { background: transparent; color: var(--ccc-teal); }
.term-cta-secondary:hover,
.term-cta-secondary:focus { background: var(--ccc-callout-tint); color: var(--ccc-teal-dark); text-decoration: none; }

/* ── TERM PAGE — BROWSE SIDEBAR ──────────────────────────── */
.term-side {
  border: 1px solid var(--ccc-border);
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}
@media (min-width: 992px) {
  .term-side { position: sticky; top: 24px; }
}
.term-side-title {
  margin: 0;
  padding: 14px 20px;
  background: var(--ccc-ink);
  color: var(--ccc-on-dark);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.term-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 16px 20px 8px;
}
.term-letters a {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--ccc-border);
  border-radius: 4px;
  color: var(--ccc-teal-dark);
  font-size: 0.8rem;
  font-weight: 600;
}
.term-letters a:hover,
.term-letters a:focus {
  background: var(--ccc-teal);
  border-color: var(--ccc-teal);
  color: var(--ccc-ink);
  text-decoration: none;
}
.term-side-all {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--ccc-border);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ccc-teal-dark);
}
.term-side-all:hover,
.term-side-all:focus { color: var(--ccc-teal); text-decoration: none; }
