/* ===== GUIDE PAGES ===== */

/* Hub page */
.guide-hub-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
  max-width: 720px;
}

.guide-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: var(--space-2xl);
}

.guide-hub-card {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.guide-hub-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.guide-hub-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--primary-dark);
}

.guide-hub-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-light);
  margin: 0 0 0.75rem;
}

.guide-hub-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
}

/* Guide article page */
.guide-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm) var(--space-2xl);
}

.guide-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}
.guide-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.guide-breadcrumb a:hover { color: var(--primary); }
.guide-breadcrumb .sep { color: var(--border); }

.guide-page h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.guide-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.guide-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
  border-left: 3px solid var(--primary);
  padding-left: var(--space-md);
}

/* Steps */
.guide-steps {
  counter-reset: guide-step;
  margin-bottom: var(--space-2xl);
}

.guide-step {
  counter-increment: guide-step;
  position: relative;
  padding-left: 3.5rem;
  margin-bottom: var(--space-xl);
}

.guide-step::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.guide-step h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.guide-step p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-light);
  margin: 0 0 0.75rem;
}

.guide-step ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.guide-step li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

/* Key facts box */
.guide-key-facts {
  background: var(--primary-light);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: var(--space-lg) 0 var(--space-2xl);
}

.guide-key-facts-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.guide-key-facts ul {
  margin: 0;
  padding-left: 1.25rem;
}

.guide-key-facts li {
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 0.35rem;
  color: var(--text);
}

/* Guide byline */
.guide-byline {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: var(--space-sm) 0;
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.guide-byline-photo {
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1/1;
  flex-shrink: 0;
}

.guide-byline-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 180px;
}

.guide-byline-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.guide-byline-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
}
.guide-byline-name:hover { text-decoration: underline; }

.guide-byline-credential {
  font-size: 0.8rem;
  color: var(--text-light);
}

.guide-byline-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Guide related section */
.guide-related {
  margin: var(--space-xl) 0;
  padding: var(--space-lg);
  background: var(--bg-alt);
  border-radius: 8px;
}

.guide-related h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.guide-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.guide-related-list li {
  padding: 0;
}

.guide-related-list a {
  display: block;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--primary-dark);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.guide-related-list a:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

@media (max-width: 768px) {
  .guide-byline-meta { width: 100%; margin-top: 0.25rem; }
  .guide-related-list { grid-template-columns: 1fr; }
}

/* Guide inline attorney CTA */
.guide-attorney-cta {
  background: var(--primary-light);
  border: 1px solid rgba(61,111,163,0.15);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.25rem 0 0.5rem;
}

.guide-attorney-cta-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 1rem;
  text-align: center;
}

.guide-attorney-cta-profiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.guide-attorney-cta-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--bg);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border);
}

.guide-attorney-cta-photo {
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  aspect-ratio: 1/1;
}

.guide-attorney-cta-info strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
}

.guide-attorney-cta-role {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.guide-attorney-cta-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 0.6rem;
}

.guide-attorney-cta-highlights li {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}

.guide-attorney-cta-highlights li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--trust-green);
  font-weight: 700;
  font-size: 0.7rem;
}

.guide-attorney-cta-actions {
  display: flex;
  gap: 0.5rem;
}

.guide-attorney-msg-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.guide-attorney-msg-btn:hover { background: #a12828; }

.guide-attorney-call-btn {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #15803d;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.guide-attorney-call-btn:hover { background: #14532d; }

.guide-attorney-cta-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 1rem;
  margin-top: 0;
  margin-bottom: 0;
  border-top: 1px solid rgba(61,111,163,0.1);
}

@media (max-width: 768px) {
  .guide-attorney-cta-profiles { grid-template-columns: 1fr; }
  .guide-attorney-cta-card { padding: 0.75rem; }
  .guide-attorney-cta-photo { width: 56px; height: 56px; }
}

/* Guide consultation form */
.guide-consultation {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-2xl);
}

.guide-consultation h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  text-align: center;
}

.guide-consultation-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

.guide-consultation-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--space-xl);
  align-items: start;
}

.guide-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.guide-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.guide-field input,
.guide-field select,
.guide-field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.92rem;
  font-family: var(--font-main);
  background: var(--bg);
}

.guide-field input:focus,
.guide-field select:focus,
.guide-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61,111,163,0.12);
}

.guide-field-full { grid-column: 1 / -1; }

.guide-submit-btn {
  display: block;
  width: 100%;
  padding: 0.85rem;
  margin-top: 0.75rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.guide-submit-btn:hover { background: #a12828; }

.guide-form-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.guide-form-reassurance {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
}
.guide-form-reassurance a { color: var(--primary); }

/* Trust sidebar */
.guide-consultation-trust {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.guide-trust-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.guide-trust-item svg {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}

.guide-trust-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.guide-trust-item span {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* Responsive: guide pages */
@media (max-width: 768px) {
  .guide-hub-grid { grid-template-columns: 1fr; }
  .guide-page h1 { font-size: 1.5rem; }
  .guide-step { padding-left: 2.75rem; }
  .guide-step::before { width: 2rem; height: 2rem; font-size: 0.85rem; }
  .guide-consultation { padding: var(--space-lg) var(--space-sm); }
  .guide-consultation-grid { grid-template-columns: 1fr; }
  .guide-form-fields { grid-template-columns: 1fr; }

  /* Prevent iOS auto-zoom on guide form inputs (must be >= 16px) */
  .guide-field input,
  .guide-field select,
  .guide-field textarea {
    font-size: 1rem;
    min-height: 44px;
    padding: 12px 14px;
  }
  .guide-submit-btn {
    min-height: 52px;
    font-size: 1.05rem;
  }
}

/* ===== COMPARE PAGES ===== */

/* Compare page layout — reuses guide-page base */
.compare-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm) var(--space-2xl);
}

.compare-page h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Summary paragraph — AI extraction target */
.compare-summary {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
  border-left: 3px solid var(--primary);
  padding-left: var(--space-md);
}

/* Comparison table */
.compare-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-lg);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  line-height: 1.5;
}

.compare-table thead th {
  background: var(--primary-dark);
  color: #fff;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.compare-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table tbody tr:nth-child(even) {
  background: var(--bg-alt);
}

.compare-table tbody tr:hover {
  background: var(--primary-light);
}

.compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.compare-table .compare-check {
  color: var(--trust-green);
  font-weight: 700;
}

.compare-table .compare-x {
  color: var(--text-muted);
}

.compare-table-source {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: var(--space-md);
}

/* Key differences section */
.compare-key-differences {
  margin-bottom: var(--space-xl);
}

.compare-key-differences h2,
.compare-key-differences h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: var(--space-lg) 0 0.5rem;
  color: var(--text);
}

.compare-key-differences p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

/* Bridge CTA — decision point after comparison */
.compare-bridge-cta {
  text-align: center;
  background: var(--primary-light);
  border: 1px solid rgba(61,111,163,0.15);
  border-radius: 10px;
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-xl) 0;
}

.compare-bridge-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 0.5rem;
}

.compare-bridge-sub {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto var(--space-md);
}

.compare-bridge-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.compare-bridge-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: #15803d;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.compare-bridge-phone:hover { background: #14532d; }
.compare-bridge-phone svg { flex-shrink: 0; }

.compare-bridge-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.compare-bridge-btn:hover { background: #a12828; }

.compare-bridge-reassurance {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

/* Decision section — "Which is right for you?" */
.compare-decision {
  margin: var(--space-xl) 0;
}

.compare-decision h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 var(--space-sm);
}

.compare-decision p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.compare-decision ul {
  margin: 0.5rem 0 var(--space-md);
  padding-left: 1.25rem;
}

.compare-decision li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 0.35rem;
}

/* Sources section */
.compare-sources {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: var(--space-lg) 0;
}

.compare-sources-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.compare-sources ol {
  margin: 0;
  padding-left: 1.25rem;
}

.compare-sources li {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

/* Hub page */
.compare-hub-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
  max-width: 720px;
}

/* Compare badge — visual differentiator from guide pages */
.compare-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(61,111,163,0.15);
  flex-shrink: 0;
  line-height: 1;
}
.compare-badge svg { opacity: 0.7; }

/* Compare TOC — compact jump links */
.compare-toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  margin-bottom: var(--space-lg);
}
.compare-toc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.4rem;
}
.compare-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  counter-reset: toc;
}
.compare-toc-list li {
  counter-increment: toc;
  font-size: 0.85rem;
}
.compare-toc-list li::before {
  content: counter(toc) ". ";
  color: var(--text-muted);
  font-weight: 500;
}
.compare-toc-list a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}
.compare-toc-list a:hover { text-decoration: underline; }

/* Compare email capture — lightweight alternative */
.compare-email-capture {
  margin: var(--space-xl) 0;
  padding: 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: center;
}
.compare-email-capture-inner { max-width: 480px; margin: 0 auto; }
.compare-email-heading {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.25rem;
}
.compare-email-sub {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0 0 0.75rem;
}
.compare-email-field {
  display: flex;
  gap: 0.5rem;
}
.compare-email-field input[type="email"] {
  flex: 1;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
}
.compare-email-field input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61,111,163,0.1);
}
.compare-email-field button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.compare-email-field button:hover { background: var(--primary-dark); }
.compare-email-privacy {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
}

/* Responsive: compare pages */
@media (max-width: 768px) {
  .compare-page h1 { font-size: 1.5rem; }
  .compare-table { font-size: 0.82rem; }
  .compare-table thead th { padding: 0.5rem 0.65rem; font-size: 0.75rem; }
  .compare-table tbody td { padding: 0.5rem 0.65rem; }
  .compare-bridge-cta { padding: var(--space-lg) var(--space-sm); }
  .compare-bridge-actions { flex-direction: column; align-items: center; }
  .compare-toc-list { flex-direction: column; gap: 0.3rem; }
  .compare-email-field { flex-direction: column; }
  .compare-email-field button { width: 100%; }
}

/* ===== GLOSSARY SECTION ===== */

.glossary-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm) var(--space-2xl);
}
.glossary-page h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* Category badges */
.glossary-cat-badge,
.glossary-cat-badge-sm {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  line-height: 1;
}
.glossary-cat-badge { margin-bottom: 0.75rem; }
.glossary-cat-badge-sm { font-size: 0.65rem; padding: 0.15rem 0.45rem; flex-shrink: 0; }
.glossary-cat-medical { background: #eef3fa; color: var(--primary-dark); border: 1px solid rgba(61,111,163,0.15); }
.glossary-cat-treatment { background: #ecfdf5; color: #166534; border: 1px solid rgba(22,101,52,0.15); }
.glossary-cat-legal { background: #fef9ec; color: #92400e; border: 1px solid rgba(146,64,14,0.15); }
.glossary-cat-drug { background: #faf5ff; color: #6b21a8; border: 1px solid rgba(107,33,168,0.15); }
.glossary-cat-asbestos { background: #f3f4f6; color: #374151; border: 1px solid rgba(55,65,81,0.15); }

/* Definition block — AI citation target (Item #9: stronger visual hierarchy) */
.glossary-definition {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: var(--space-lg);
  border-left: 3px solid var(--primary);
  padding: var(--space-sm) var(--space-md);
  background: var(--primary-light);
  border-radius: 0 6px 6px 0;
}
.glossary-definition p { margin: 0; }
.glossary-definition dfn { font-style: normal; }

/* Context paragraphs */
.glossary-context {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: var(--space-xl);
}
.glossary-context p { margin: 0 0 1rem; }
.glossary-context p:last-child { margin-bottom: 0; }
.glossary-context a { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.glossary-context a:hover { color: var(--primary); }

/* Quick Facts box */
.glossary-quick-facts {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: var(--space-xl);
}
.glossary-quick-facts-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.glossary-facts-list { margin: 0; }
.glossary-fact-row {
  display: flex;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.glossary-fact-row:last-child { border-bottom: none; }
.glossary-fact-row dt {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 120px;
  flex-shrink: 0;
}
.glossary-fact-row dd {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}
.glossary-fact-row dd a {
  color: var(--primary-dark);
  text-decoration: none;
}
.glossary-fact-row dd a:hover { text-decoration: underline; }
.glossary-fact-row dd code {
  background: #e5e7eb;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.82rem;
}

/* Learn More links */
.glossary-learn-more {
  margin-bottom: var(--space-lg);
}
.glossary-learn-more-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}
.glossary-learn-more ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.glossary-learn-more li::before {
  content: "\2192 ";
  color: var(--primary);
}
.glossary-learn-more a {
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.glossary-learn-more a:hover { text-decoration: underline; }

/* FAQ section (details/summary) */
.glossary-faqs {
  margin-bottom: var(--space-xl);
}
.glossary-faqs-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.glossary-faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 0.4rem;
  overflow: hidden;
}
.glossary-faq-item summary {
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.glossary-faq-item summary::after {
  content: '+';
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
  flex-shrink: 0;
}
.glossary-faq-item[open] summary::after { content: '\2212'; }
.glossary-faq-item summary::-webkit-details-marker { display: none; }
.glossary-faq-item p {
  margin: 0;
  padding: 0 0.85rem 0.65rem;
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Source and reviewed */
.glossary-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}
.glossary-source a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}
.glossary-source a:hover { text-decoration: underline; }
.glossary-reviewed {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.glossary-reviewed a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}
.glossary-reviewed a:hover { text-decoration: underline; }

/* Related terms grid at bottom of term pages */
.glossary-related-terms {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}
.glossary-related-terms h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
}
.glossary-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.glossary-related-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.glossary-related-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.glossary-related-card strong {
  font-size: 0.9rem;
  color: var(--primary-dark);
}
.glossary-related-card > span:last-child {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Soft CTA at bottom of term pages */
.glossary-term-cta {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-xl);
  text-align: center;
}
.glossary-term-cta > p {
  font-size: 0.92rem;
  color: var(--text-light);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.glossary-term-cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.glossary-term-cta-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #15803d;
  text-decoration: none;
}
.glossary-term-cta-phone:hover { text-decoration: underline; }
.glossary-term-cta-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
}
.glossary-term-cta-link:hover { text-decoration: underline; }

/* Empty filter state */
.glossary-letter-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0.3rem 0 0;
  padding: 0;
}

/* ===== GLOSSARY HUB ===== */

.glossary-hub-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: var(--space-lg);
  max-width: 720px;
}

/* A-Z bar */
.glossary-az-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: var(--space-md);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.glossary-az-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
  background: var(--primary-light);
  transition: background 0.15s, color 0.15s;
}
.glossary-az-bar a:hover {
  background: var(--primary-dark);
  color: #fff;
}
.glossary-az-disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.4;
}

/* Category filters */
.glossary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: var(--space-xl);
}
.glossary-filter-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
}
.glossary-filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}
.glossary-filter-btn.active {
  background: var(--primary-dark);
  color: #fff;
  border-color: var(--primary-dark);
}
.glossary-filter-count { font-weight: 400; opacity: 0.7; }

/* Letter group headings */
.glossary-letter-heading {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: var(--space-lg) 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* Term cards on hub */
.glossary-term-card {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.glossary-term-card:last-child { border-bottom: none; }
.glossary-term-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.glossary-term-link {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
}
.glossary-term-link:hover { text-decoration: underline; }
.glossary-term-preview {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Hub bridge CTA */
.glossary-bridge-cta {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  margin: var(--space-2xl) 0 var(--space-lg);
}
.glossary-bridge-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.glossary-bridge-sub {
  font-size: 0.95rem;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}
.glossary-bridge-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.glossary-bridge-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #15803d;
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
}
.glossary-bridge-phone:hover { background: #14532d; }
.glossary-bridge-btn {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s;
}
.glossary-bridge-btn:hover { background: #a12828; }
.glossary-hub-reviewed {
  text-align: center;
  margin-top: var(--space-lg);
}

/* Responsive: glossary */
@media (max-width: 768px) {
  .glossary-page h1 { font-size: 1.5rem; }
  .glossary-az-bar a,
  .glossary-az-disabled { width: 1.7rem; height: 1.7rem; font-size: 0.75rem; }
  .glossary-fact-row { flex-direction: column; gap: 0.15rem; }
  .glossary-fact-row dt { min-width: auto; }
  .glossary-bridge-actions { flex-direction: column; align-items: center; }
  .glossary-bridge-phone,
  .glossary-bridge-btn { width: 100%; justify-content: center; max-width: 280px; }
  .glossary-related-grid { grid-template-columns: 1fr; }
  .glossary-term-cta-actions { flex-direction: column; }
  .glossary-term-card-header { flex-wrap: wrap; }
  .glossary-cat-badge-sm { margin-top: 0.15rem; }
}

/* ===== ENCYCLOPEDIA ===== */

/* Page header */
.encyclopedia-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm) var(--space-2xl);
}
.encyclopedia-header {
  margin-bottom: var(--space-lg);
}
.encyclopedia-page h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.encyclopedia-aliases {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-style: italic;
}
.encyclopedia-review-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.encyclopedia-reviewer-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}
.encyclopedia-review-line a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
}
.encyclopedia-review-line a:hover { text-decoration: underline; }

/* Layout: TOC sidebar + content */
.encyclopedia-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Sticky TOC (desktop) */
.encyclopedia-toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.encyclopedia-toc-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.encyclopedia-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.encyclopedia-toc li {
  margin-bottom: 0.1rem;
}
.encyclopedia-toc-link {
  display: block;
  padding: 0.3rem 0 0.3rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.encyclopedia-toc-link:hover {
  color: var(--primary-dark);
}
.encyclopedia-toc-link.active {
  color: var(--primary-dark);
  font-weight: 600;
  border-left-color: var(--primary);
}

/* Mobile TOC */
.encyclopedia-toc-mobile {
  display: none;
}

/* Content area */
.encyclopedia-content section {
  margin-bottom: var(--space-xl);
  scroll-margin-top: 80px;
}
.encyclopedia-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}
.encyclopedia-content section:first-child h2 {
  border-top: none;
  padding-top: 0;
}
.encyclopedia-section-body {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-light);
}
.encyclopedia-section-body p { margin: 0 0 1rem; }
.encyclopedia-section-body p:first-child {
  font-size: 1.05rem;
  color: var(--text);
}
.encyclopedia-section-body p:last-child { margin-bottom: 0; }
.encyclopedia-section-body ul,
.encyclopedia-section-body ol {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}
.encyclopedia-section-body li { margin-bottom: 0.3rem; }
.encyclopedia-section-body a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.encyclopedia-section-body a:hover { color: var(--primary); }
.encyclopedia-section-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}
.encyclopedia-section-body thead th {
  background: var(--primary-dark);
  color: #fff;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
}
.encyclopedia-section-body tbody td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.encyclopedia-section-body tbody tr:nth-child(even) { background: var(--bg-alt); }

/* Inline citations */
.encyclopedia-cite {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.75em;
}
.encyclopedia-cite:hover { text-decoration: underline; }

/* Snippet paragraph (AI extraction target) */
.encyclopedia-snippet {
  font-size: 1.05rem;
  color: var(--text);
}

/* Key Facts infobox */
.encyclopedia-methodology {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}
.encyclopedia-methodology a {
  color: var(--text-light);
  text-decoration: underline;
}
.encyclopedia-key-facts {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: var(--space-xl);
  scroll-margin-top: 80px;
}
.encyclopedia-key-facts-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.encyclopedia-key-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem 1.5rem;
}
.encyclopedia-key-fact {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.encyclopedia-key-fact-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.encyclopedia-key-fact-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* References */
.encyclopedia-references {
  scroll-margin-top: 80px;
  margin-bottom: var(--space-xl);
}
.encyclopedia-references h2 {
  font-size: 1.1rem;
}
.encyclopedia-ref-list {
  padding-left: 1.25rem;
  margin: 0;
}
.encyclopedia-ref-list li {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  line-height: 1.5;
}
.encyclopedia-ref-list a {
  color: var(--primary-dark);
  text-decoration: none;
  word-break: break-word;
}
.encyclopedia-ref-list a:hover { text-decoration: underline; }
.encyclopedia-ref-hidden { display: none; }
.encyclopedia-ref-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--primary-dark);
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.15s;
}
.encyclopedia-ref-toggle:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* Next Steps bridge CTA */
.encyclopedia-next-steps {
  scroll-margin-top: 80px;
  margin-bottom: var(--space-xl);
}
.encyclopedia-next-steps h2 {
  font-size: 1.15rem;
}
.encyclopedia-next-steps-intro {
  font-size: 0.92rem;
  color: var(--text-light);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.encyclopedia-next-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.encyclopedia-next-step-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.encyclopedia-next-step-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.encyclopedia-next-step-card svg {
  color: var(--primary);
  flex-shrink: 0;
}
.encyclopedia-next-step-phone svg { color: #15803d; }
.encyclopedia-next-step-card strong {
  font-size: 0.9rem;
  color: var(--text);
}
.encyclopedia-next-step-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Next step CTA variant */
.encyclopedia-next-step-cta svg { color: var(--accent); }

/* Medical disclaimer */
.encyclopedia-medical-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  margin-bottom: var(--space-lg);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.5;
}
.encyclopedia-medical-disclaimer svg {
  flex-shrink: 0;
  color: var(--text-muted);
  margin-top: 1px;
}
.encyclopedia-medical-disclaimer p {
  margin: 0;
}
.encyclopedia-medical-disclaimer strong {
  color: var(--text);
}

/* Editorial policy link */
.encyclopedia-editorial-link {
  color: var(--text-muted);
  text-decoration: none;
  font-style: italic;
}
.encyclopedia-editorial-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* FAQ section */
.encyclopedia-faq-section {
  scroll-margin-top: 80px;
}

/* Related content */
.encyclopedia-related {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}
.encyclopedia-related-section {
  margin-bottom: var(--space-lg);
}
.encyclopedia-related-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.encyclopedia-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.encyclopedia-related-links a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--primary-dark);
  text-decoration: none;
  transition: border-color 0.15s;
}
.encyclopedia-related-links a:hover {
  border-color: var(--primary);
  text-decoration: underline;
}

/* Hub page: search bar */
.encyclopedia-search-wrap {
  margin-bottom: var(--space-sm);
}
.encyclopedia-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.encyclopedia-search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}
.encyclopedia-search-input {
  width: 100%;
  padding: 0.7rem 2.5rem 0.7rem 2.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.encyclopedia-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(61,111,163,0.12);
}
.encyclopedia-search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.encyclopedia-search-clear {
  position: absolute;
  right: 0.65rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  line-height: 1;
}
.encyclopedia-search-clear:hover { color: var(--text); }
.encyclopedia-search-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Hub page: letter-grouped entries */
.encyclopedia-letter-entries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: var(--space-lg);
}

/* No results */
.encyclopedia-no-results {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-light);
  font-size: 0.95rem;
}
.encyclopedia-reset-link {
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
}

/* Hub page: entry cards */
.encyclopedia-hub .encyclopedia-entries {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: var(--space-2xl);
}
.encyclopedia-entry-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.encyclopedia-entry-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.encyclopedia-entry-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}
.encyclopedia-icd10-badge {
  font-size: 0.62rem;
  font-weight: 600;
  font-family: monospace;
  color: var(--text-muted);
  background: #e5e7eb;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.encyclopedia-entry-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-dark);
}
.encyclopedia-entry-aliases {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}
.encyclopedia-entry-preview {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
  margin: 0.15rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.encyclopedia-entry-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.35rem;
}

/* Responsive: encyclopedia */
@media (max-width: 968px) {
  .encyclopedia-layout {
    grid-template-columns: 1fr;
  }
  .encyclopedia-toc { display: none; }
  .encyclopedia-toc-mobile {
    display: block;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: var(--space-lg);
  }
  .encyclopedia-toc-mobile summary {
    padding: 0.6rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
  }
  .encyclopedia-toc-mobile ul {
    list-style: none;
    padding: 0 0.85rem 0.6rem;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .encyclopedia-toc-mobile li a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    min-height: 44px;
    line-height: 1.4;
    color: var(--primary-dark);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
  }
  .encyclopedia-toc-mobile li a:hover { border-color: var(--primary); }
}
@media (max-width: 768px) {
  .encyclopedia-page h1 { font-size: 1.5rem; }
  .encyclopedia-key-facts-grid { grid-template-columns: 1fr; }
  .encyclopedia-next-steps-grid { grid-template-columns: 1fr; }
  .encyclopedia-hub .encyclopedia-entries { grid-template-columns: 1fr; }
  .encyclopedia-letter-entries { grid-template-columns: 1fr; }
}

