/* ============================================================================
   OFFIQA — Glossary / entity page stylesheet
   Loads AFTER offiqa-design-v2.css via extra_css.
   Used by: /glossary/* pages
   ============================================================================ */

/* Term definition hero block */
.term-block {
  padding: clamp(2rem, 4vw, 3.2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    radial-gradient(28rem 18rem at 90% -10%, rgba(22, 70, 59, 0.07), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}
.term-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.term-label::before {
  content: "";
  width: 1.4rem; height: 2px;
  background: var(--violet);
  border-radius: 2px;
}
.term-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.2rem;
}

/* Short definition — answers "what is X" in 1–2 sentences */
.term-definition {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 68ch;
  margin: 0;
}

/* In-other-words block */
.term-alia {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: var(--space-4);
  font-size: 0.88rem;
  color: var(--muted);
}
.term-alia strong {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Extended definition layout */
.glossary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.78fr);
  gap: var(--space-6);
  align-items: start;
  margin-top: var(--space-6);
}

/* Body prose — definition depth */
.glossary-body h2 {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-soft);
}
.glossary-body h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.glossary-body > p { max-width: 72ch; }

/* Related terms sidebar */
.glossary-sidebar {
  position: sticky;
  top: 90px;
  display: grid;
  gap: var(--space-4);
}

.related-terms-list {
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
}
.related-terms-list li { margin: 0; }
.related-terms-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.75rem var(--space-4);
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease;
}
.related-terms-list li:last-child a { border-bottom: none; }
.related-terms-list a:hover {
  background: var(--surface-2);
  color: var(--violet-d);
  text-decoration: none;
}
.related-terms-list a::after {
  content: "→";
  color: var(--muted);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* See also in-body links */
.see-also-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: var(--space-4) 0;
  align-items: center;
}
.see-also-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.3rem;
}

/* Examples block */
.term-examples {
  display: grid;
  gap: var(--space-3);
  counter-reset: example;
}
.term-example {
  position: relative;
  padding: var(--space-3) var(--space-4) var(--space-3) 3.2rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  counter-increment: example;
  font-size: 0.93rem;
  color: var(--ink-2);
}
.term-example::before {
  content: counter(example);
  position: absolute; left: var(--space-3); top: var(--space-3);
  width: 1.8rem; height: 1.8rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--violet-tint);
  color: var(--violet-d);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
}
.term-example p:last-child { margin: 0; }

/* Workflow tie-in — "how it shows up in Offiqa" */
.term-in-offiqa {
  padding: var(--space-4);
  border: 1px solid var(--violet-tint);
  border-left: 4px solid var(--violet-l);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: var(--violet-tint);
}
.term-in-offiqa h3 { color: var(--violet-d); font-size: 1rem; margin-bottom: 0.4rem; }
.term-in-offiqa p:last-child { margin: 0; }

@media (max-width: 1000px) {
  .glossary-layout { grid-template-columns: 1fr; }
  .glossary-sidebar { position: static; }
}
