/* ============================================================================
   Glossary. Loaded only on /glossary pages, on top of the shared system.
   ========================================================================== */

/* --- breadcrumbs ---------------------------------------------------------- */
.crumbs { padding-top: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.crumbs li { display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim); }
.crumbs li + li::before { content: "/"; color: var(--border-hi); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* --- shared heads --------------------------------------------------------- */
.page-hero { padding: 1.4rem 0 clamp(2rem, 1.4rem + 2.5vw, 3rem); }
.dek {
  color: var(--muted);
  font-size: var(--t-lede);
  line-height: 1.65;
  max-width: 64ch;
  margin-top: 0.9rem;
}

/* --- index ---------------------------------------------------------------- */
.glossary-group { padding-bottom: clamp(2rem, 1.4rem + 2.5vw, 3.2rem); }
.group-head {
  display: flex; align-items: baseline; gap: 0.7rem;
  font-size: var(--t-h3);
  padding-bottom: 0.7rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--border);
}
.group-count {
  font-family: var(--mono); font-size: var(--t-micro);
  color: var(--accent); font-weight: 500;
}
.glossary-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1rem;
}
.glossary-grid > li { display: flex; }
.glossary-grid .card { display: flex; flex-direction: column; width: 100%; }
.g-cta {
  margin-top: auto; padding-top: 1rem;
  font-family: var(--mono); font-size: var(--t-small); color: var(--accent);
}

/* --- article -------------------------------------------------------------- */
.entry { padding-bottom: clamp(2.5rem, 2rem + 3vw, 4rem); }
.entry-head { padding: 1.4rem 0 1.6rem; }
.entry-head h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }

.byline {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--dim);
}
.byline a { color: var(--muted); border-bottom: 1px solid transparent; }
.byline a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.byline time { color: var(--muted); }

/* The lead definition: the passage most likely to be quoted, so it is set
   apart and kept self contained. */
.definition {
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--r);
  background: var(--bg-raised);
  padding: 1.1rem 1.3rem;
  margin-bottom: 2rem;
}
.definition p { font-size: var(--t-lede); line-height: 1.65; color: var(--fg); max-width: 68ch; }

.entry-section { margin-bottom: 2rem; }
.entry-section h2 {
  font-size: var(--t-h3);
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.entry-section p { color: var(--muted); margin-bottom: 0.9rem; max-width: 70ch; }
.entry-section p:last-child { margin-bottom: 0; }

.entry-list { list-style: none; margin-top: 0.4rem; }
.entry-list li {
  position: relative;
  padding: 0.32rem 0 0.32rem 1.4rem;
  color: var(--muted);
  font-size: var(--t-small);
  max-width: 70ch;
}
.entry-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.82em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}

/* --- pull quote (matching the About page treatment) ----------------------- */
.pull-quote {
  position: relative;
  margin: 2.2rem 0;
  padding: 0 0 0 2.4rem;
  border-left: 2px solid var(--accent);
}
.pull-quote::before {
  content: "\201C";
  position: absolute; left: 0.6rem; top: -0.75rem;
  font-size: 3rem; line-height: 1; color: var(--accent); opacity: 0.28;
}
.pull-quote blockquote p {
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
  line-height: 1.6;
  color: var(--fg-hi);
  max-width: 62ch;
}
.pull-quote figcaption {
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.pull-quote figcaption a { color: var(--muted); border-bottom: 1px solid var(--border-hi); }
.pull-quote figcaption a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* --- references and related ----------------------------------------------- */
.sources { list-style: none; }
.sources li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.4rem;
  font-size: var(--t-small);
}
.sources li::before {
  content: "\2197";
  position: absolute; left: 0; top: 0.35rem;
  color: var(--dim); font-family: var(--mono); font-size: 0.8em;
}

.related { list-style: none; display: grid; gap: 0.6rem; }
.related a {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-raised);
  padding: 0.85rem 1rem;
  transition: border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease-out);
}
.related a:hover { border-color: var(--border-hi); transform: translateX(2px); }
.related .r-term { display: block; color: var(--fg-hi); font-weight: 600; font-size: var(--t-small); }
.related .r-dek { display: block; color: var(--muted); font-size: var(--t-micro); margin-top: 0.25rem; line-height: 1.5; }
.related a:hover .r-term { color: var(--accent); }

/* --- closing CTA ---------------------------------------------------------- */
.entry-cta {
  margin-top: 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(ellipse 70% 130% at 0% 0%, rgba(232, 163, 61, 0.07), transparent 70%),
    var(--bg-raised);
  padding: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
}
.entry-cta h2 { font-size: var(--t-h2); margin-bottom: 0.7rem; }
.entry-cta p { color: var(--muted); max-width: 62ch; }

/* --- comparison tables inside an entry ------------------------------------ */
.entry-table { margin-top: 0.6rem; min-width: 640px; }
.entry-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: var(--track-mid);
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.6rem;
}
.entry-table th[scope="row"] {
  /* Cells are top aligned by the shared table rule; without this the row name
     sank to the bottom of its own row and read as belonging to the row below. */
  vertical-align: top;
  color: var(--fg-hi);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--t-small);
  font-family: var(--sans);
  white-space: nowrap;
  padding-right: 1.1rem;
}
.entry-table td { color: var(--muted); font-size: var(--t-small); line-height: 1.55; }

/* --- the featured long-form entry on the index --------------------------- */
.g-featured {
  display: block;
  border: 1px solid rgba(232, 163, 61, 0.4);
  background:
    radial-gradient(ellipse 70% 130% at 0% 0%, rgba(232, 163, 61, 0.08), transparent 70%),
    var(--bg-raised);
  padding: clamp(1.4rem, 1rem + 2vw, 2rem);
  margin-bottom: 2.4rem;
  transition: border-color var(--d-mid) var(--ease), transform var(--d-mid) var(--ease-out);
}
.g-featured:hover { border-color: var(--accent); transform: translateY(-2px); }
.g-featured h2 { font-size: var(--t-h2); margin: 0.5rem 0 0.6rem; }
.g-featured:hover h2 { color: var(--accent); }
.g-featured .g-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--t-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  padding: 0.15rem 0.55rem;
}
.g-featured p { color: var(--muted); max-width: 74ch; }

/* --- section-level pull quote (one step down from the article quote) ------ */
.pull-quote.is-inline { margin: 1.4rem 0; padding-left: 1.9rem; }
.pull-quote.is-inline::before { font-size: 2.4rem; top: -0.5rem; left: 0.45rem; }
.pull-quote.is-inline blockquote p {
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
  color: var(--fg);
}
