/* ===========================
   Breadcrumbs
   =========================== */

.breadcrumbs {
  background: #f7f7f7;
  padding: 0.75rem 0;
  margin: 0;
  width: 100%;
}

.breadcrumb-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-link {
  color: #374151;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 400;
  border-radius: calc(var(--radius, 0.5rem) - 4px);
  padding: 0.25rem 0.4rem;
  margin: -0.25rem -0.4rem;
}

.breadcrumb-link:hover {
  color: #111827;
}

.breadcrumb-link:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 2px;
  color: #111827;
  border-radius: 4px;
}

.breadcrumb-page {
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
}

.breadcrumb-separator {
  color: #6b7280;
  user-select: none;
  font-size: 0.875rem;
}

/* ===========================
   Layout
   =========================== */

.glossary-main {
  max-width: 1170px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.glossary-header {
  margin-bottom: 2rem;
}

.glossary-title {
  font-weight: 600;
  letter-spacing: -0.03em;
}

.glossary-intro {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground, 0 0% 45.1%));
}

/* ===========================
   Search / Filter Controls (Preline/shadcn UI Style)
   =========================== */

.glossary-controls {
  margin-top: 1.5rem;
  padding: 1.75rem;
  background: hsl(0 0% 100%);
  border: 1px solid hsl(214.3 31.8% 91.4%);
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.glossary-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1.25rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(222.2 47.4% 11.2%);
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.search-group {
  position: relative;
  display: flex;
}

.glossary-search {
  flex: 1;
  height: 40px;
  padding: 0 2.75rem 0 0.75rem;
  border: 1px solid hsl(214.3 31.8% 91.4%);
  border-radius: 6px;
  font-size: 0.875rem;
  background: hsl(0 0% 100%);
  color: hsl(222.2 47.4% 11.2%);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.glossary-search::placeholder {
  color: hsl(215.4 16.3% 46.9%);
}

.glossary-search:hover {
  border-color: hsl(217.2 32.6% 17.5%);
}

/* FIX: focus-visible (not focus) */
.glossary-search:focus-visible {
  outline: none;
  border-color: hsl(221.2 83.2% 53.3%);
  box-shadow: 0 0 0 3px hsl(221.2 83.2% 53.3% / 0.1);
}

.search-button {
  position: absolute;
  right: 0.375rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0.5rem;
  color: hsl(215.4 16.3% 46.9%);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.search-button:hover {
  color: hsl(221.2 83.2% 53.3%);
  background: hsl(221.2 83.2% 53.3% / 0.1);
}

.search-button:focus-visible {
  outline: 2px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
}

.filter-select {
  height: 40px;
  padding: 0 0.75rem;
  border: 1px solid hsl(214.3 31.8% 91.4%);
  border-radius: 6px;
  font-size: 0.875rem;
  background: hsl(0 0% 100%);
  color: hsl(222.2 47.4% 11.2%);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.filter-select:hover {
  border-color: hsl(217.2 32.6% 17.5%);
}

/* FIX: focus-visible (not focus) */
.filter-select:focus-visible {
  outline: none;
  border-color: hsl(221.2 83.2% 53.3%);
  box-shadow: 0 0 0 3px hsl(221.2 83.2% 53.3% / 0.1);
}

.clear-filters-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 40px;
  padding: 0 1rem;
  background: hsl(0 0% 100%);
  border: 1px solid hsl(214.3 31.8% 91.4%);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(222.2 47.4% 11.2%);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.clear-filters-button:hover {
  background: hsl(210 40% 96.1%);
  border-color: hsl(217.2 32.6% 17.5%);
}

.clear-filters-button:active {
  transform: translateY(1px);
}

.clear-filters-button:focus-visible {
  outline: 2px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
}

/* Container for the action buttons (Apply / Clear) */
.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  align-items: center;
}

/* Primary apply button styles */
.apply-filters-button {
  height: 40px;
  padding: 0 1rem;
  background: hsl(221.2 83.2% 53.3%);
  color: #fff;
  border: 1px solid hsl(221.2 83.2% 48%);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.06s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.apply-filters-button:hover {
  background: hsl(217.2 83% 47%);
}

.apply-filters-button:active {
  transform: translateY(1px);
}

.apply-filters-button:focus-visible {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 3px;
}

.results-summary {
  padding: 0.75rem 1rem;
  background: hsl(210 40% 98%);
  border: 1px solid hsl(214.3 31.8% 91.4%);
  border-radius: 6px;
  font-size: 0.875rem;
  color: hsl(215.4 16.3% 46.9%);
  text-align: center;
  font-weight: 500;
}

/* Legacy search label for backward compatibility */
.glossary-search-label {
  display: block;
}

.glossary-search-instructions {
  display: block;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground, 0 0% 45.1%));
  margin-bottom: 0.5rem;
}

/* ===========================
   Category listing (index)
   =========================== */

.glossary-category {
  margin-bottom: 3rem;
}

.glossary-category-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid hsl(var(--border, 0 0% 89.8%));
  color: hsl(var(--foreground, 0 0% 3.9%));
}

.glossary-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.glossary-card {
  border-radius: var(--radius, 0.75rem);
  border: 1px solid hsl(var(--border, 0 0% 89.8%));
  background: hsl(var(--card, 0 0% 100%));
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.glossary-card-link {
  display: block;
  padding: 0.9rem 1rem;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}

.glossary-card-link:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 2px;
}

.glossary-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.glossary-card:focus-within {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.glossary-card-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #333333;
  margin-bottom: 0.25rem;
}

.glossary-card-title {
  font-size: 1rem;
  font-weight: 600;
}

.glossary-card-summary {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground, 0 0% 45.1%));
}

/* ===========================
   Term view header
   =========================== */

.glossary-term-header {
  margin-bottom: 1.75rem;
}

.glossary-term-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #333333;
}

.glossary-term-title {
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 0.25rem;
  color: #111827;
}

.glossary-term-summary {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: hsl(var(--muted-foreground, 0 0% 45.1%));
}

.glossary-term-spec {
  display: inline-flex;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #0066cc;
  text-decoration: underline;
}

.glossary-term-spec:hover {
  color: #0052a3;
}

/* WCAG chips (header) */
.wcag-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin-left: .35rem;
}

.wcag-chip {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .02em;
}

.wcag-chip:hover {
  background: #f3f4f6;
}

.wcag-chip:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* ===========================
   Sections
   =========================== */

.glossary-section {
  margin-top: 2.5rem;
}

.glossary-section-title {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.glossary-section-body {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.6;

  /* Accordion / disclosure (collapsed) — ensure collapsed state meets
     text contrast requirements while remaining visually de-emphasized. */
  details:not([open]) > summary,
  .accordion-button[aria-expanded="false"],
  .accordion-header button[aria-expanded="false"],
  .g-demo-summary {
    color: #111827; /* high contrast glyph */
    background: rgba(17,24,39,0.03); /* subtle muted background */
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
  }
}

/* ===========================
   Meta section
   =========================== */

.glossary-section--meta {
  margin-top: 2rem;
}

.glossary-meta-card {
  border-radius: 1.25rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 1.5rem 1.75rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .glossary-meta-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.meta-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid transparent;
  line-height: 1.3;
}

.meta-pill--impact-high {
  background: #fee2e2;
  border-color: #ef4444;
  color: #7f1d1d;
}

.meta-pill--impact-medium {
  background: #fef9c3;
  border-color: #eab308;
  color: #854d0e;
}

.meta-pill--impact-low {
  background: #ecfeff;
  border-color: #06b6d4;
  color: #0f172a;
}

.meta-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #e5e7eb;
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 500;
}

.meta-chip--impact {
  background: #eef2ff;
  color: #3730a3;
  font-weight: 600;
}

.meta-chip:focus-visible,
.meta-pill:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
}

/* ==================================================
   Lawsuit / Legal Risk Pills
   Small pills used across cards to indicate legal risk
   ================================================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  background: #f3f4f6;
  color: #111827;
}

.pill:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 3px;
}

.pill-legal--low {
  background: #ecfeff;
  border-color: #06b6d4;
  color: #0f172a;
}

.pill-legal--medium {
  background: #fef9c3;
  border-color: #eab308;
  color: #854d0e;
}

.pill-legal--high {
  background: #fee2e2;
  border-color: #ef4444;
  color: #7f1d1d;
}

/* ===========================
   Standards table
   =========================== */

.standards-comparison {
  overflow-x: auto;
  margin-top: 1rem;
}

.standards-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.standards-table thead {
  background: #f9fafb;
}

.standards-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #111827;
  border-bottom: 2px solid #d1d5db;
}

.standards-table th:first-child { width: 50%; }
.standards-table th:nth-child(2) { width: 20%; text-align: center; }
.standards-table th:nth-child(3) { width: 30%; }

.standards-table tbody tr { border-bottom: 1px solid #e5e7eb; }
.standards-table tbody tr:last-child { border-bottom: none; }
.standards-table tbody tr:hover { background: #f9fafb; }

.standards-table td {
  padding: 1rem;
  color: #374151;
  font-size: 0.9375rem;
}

.standards-table td:nth-child(2) {
  text-align: center;
  font-weight: 600;
}

.standards-table td.check {
  color: #059669;
  font-size: 1.5rem;
  background: #d1fae5;
}

.standards-table td.no-check {
  color: #6b7280;
  font-size: 1.25rem;
  background: #f9fafb;
}

/* ===========================
   Related terms
   =========================== */

.glossary-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.glossary-related-list a {
  font-size: 0.875rem;
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  color: #374151;
  transition: all 0.2s;
}

.glossary-related-list a:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.glossary-related-list a:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 2px;
}

/* ===========================
   SR-only helper
   =========================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip link utility */
.sr-only-until-focus {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sr-only-until-focus:focus {
  position: static;
  width: auto;
  height: auto;
  background: #2563eb;
  color: #fff;
  padding: 0.5rem;
  border-radius: 4px;
  z-index: 9999;
}

/* ===========================
   Modern Accessibility Features
   =========================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
  .glossary-card,
  .a11y-card,
  .a11y-demoShell,
  .glossary-search,
  .filter-select {
    border-width: 3px;
  }

  .breadcrumb-link:focus-visible,
  .glossary-card-link:focus-visible,
  .meta-chip:focus-visible,
  .meta-pill:focus-visible,
  .glossary-search:focus-visible,
  .filter-select:focus-visible,
  .search-button:focus-visible {
    outline-width: 3px;
    outline-offset: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .glossary-card:hover {
    transform: none;
  }

  .glossary-search,
  .filter-select,
  .search-button,
  .clear-filters-button {
    transition: none;
  }
}

/* Forced colors mode (Windows High Contrast) */
@media (forced-colors: active) {
  .glossary-card,
  .a11y-card,
  .a11y-demoShell {
    background: Canvas;
    border: 2px solid ButtonText;
    color: CanvasText;
  }

  .breadcrumb-link,
  .glossary-card-link {
    color: LinkText;
  }

  .breadcrumb-link:hover,
  .glossary-card-link:hover {
    color: LinkText;
  }

  .meta-pill,
  .meta-chip,
  .a11y-pill {
    background: ButtonFace;
    color: ButtonText;
    border: 1px solid ButtonText;
  }
}

/* =========================================
   A11Y EXAMPLES (matches your screenshot)
   Markup: snippets/a11y-example.php
   ========================================= */

.a11y-ex { margin: 0 0 1.25rem; }
.a11y-ex__title {
  margin: 0 0 .9rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -.01em;
  color: #111827;
}

.a11y-ex__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 900px) {
  .a11y-ex__grid { grid-template-columns: 1fr 1fr; }
}

.a11y-card {
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
  min-width: 0;
}

.a11y-card--bad { border-color: #ef4444; }
.a11y-card--good { border-color: #16a34a; }

.a11y-card__head {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem .85rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  flex-wrap: wrap;
}

.a11y-card__headTitle {
  font-weight: 650;
  color: #111827;
  letter-spacing: -.01em;
  font-size: .95rem;
}

.a11y-pill {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.a11y-pill--bad {
  background: #991b1b;
  color: #fff;
}

.a11y-pill--good {
  background: #065f46;
  color: #fff;
}

.a11y-card__demo {
  padding: 1rem;
  background: #fff;
}

.a11y-demoShell {
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.1rem;
  max-width: 100%;
  overflow: hidden;
}

.a11y-demoShell * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Compatibility: legacy demo markup */
.demo-container,
.demo-container .card,
.demo-container .demo-shell {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.1rem;
  max-width: 100%;
  overflow: hidden;
}

.demo-container * { max-width: 100%; box-sizing: border-box; }

.demo-container .btn {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  padding: .6rem .95rem;
  font-weight: 650;
  cursor: pointer;
}

.demo-container .btn.primary {
  border-color: rgba(37,99,235,.55);
  background: rgba(37,99,235,.12);
}

.demo-container .label { display:block; font-size:.9rem; color:#0f172a; font-weight:600; }
.demo-container .help { font-size:.85rem; color:#475569; }

.demo-container .pill { display:inline-flex; align-items:center; padding:.35rem .7rem; border-radius:999px; font-weight:700; }
.demo-container .pill.bad { background:rgba(239,68,68,.12); color:#7f1d1d; }
.demo-container .pill.good { background:rgba(34,197,94,.12); color:#14532d; }

.demo-container .input,
.demo-container .select,
.demo-container .textarea {
  width:100%;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  padding:.65rem .75rem;
  font:inherit;
}

/* code */
.a11y-code {
  margin: 0;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.a11y-code > summary {
  cursor: pointer;
  padding: .75rem .85rem;
  font-weight: 650;
  color: #111827;
  list-style: none;
}

.a11y-code > summary::-webkit-details-marker { display: none; }

.a11y-code pre {
  margin: 0;
  padding: .85rem;
  background: #0b1220;
  color: #e5e7eb;
  overflow: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.a11y-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .82rem;
  line-height: 1.55;
  white-space: pre;
}

/* explanation */
.a11y-card__text {
  padding: .85rem;
  border-top: 1px solid #e5e7eb;
  color: #111827;
}

.a11y-card__text p { margin: 0 0 .55rem; line-height: 1.55; }
.a11y-card__text p:last-child { margin-bottom: 0; }

.a11y-muted { color:#475569; font-size: .95rem; }

/* ===========================
   Interactive Example Enhancements
   =========================== */

.a11y-demoShell .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}

.a11y-demoShell .row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.a11y-demoShell .row.end {
  justify-content: flex-end;
}

.a11y-demoShell .stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Ensure modals appear above everything */
.a11y-demoShell [role="dialog"],
.a11y-demoShell .modal-overlay {
  position: fixed;
  z-index: 9999;
}

/* Interactive button states */
.a11y-demoShell button:focus-visible {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
}

.a11y-demoShell input:focus-visible,
.a11y-demoShell select:focus-visible,
.a11y-demoShell textarea:focus-visible {
  outline: 3px solid hsl(221.2 83.2% 53.3%);
  outline-offset: 2px;
  border-color: hsl(221.2 83.2% 53.3%);
}

/* Grayscale filter for color blindness simulation */
.grayscale {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .grayscale { transition: none; }
}

/* Responsive */
@media (max-width: 768px) {
  .glossary-main { padding: 0 1rem; }

  .glossary-section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .glossary-filters {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .clear-filters-button { justify-self: stretch; }
  .glossary-search { max-width: none; }

  .a11y-card__demo { padding: .85rem; }
  .a11y-demoShell { padding: .95rem; }
  .a11y-code code { font-size: .78rem; }

  .a11y-demoShell [role="dialog"] > div {
    max-width: 90% !important;
    margin: 1rem;
  }
}

/* ===========================
   Headings (global)
   =========================== */

h1 { font-size: 2em; line-height: 34px; }
h2 { font-size: 1.5em; line-height: 32px; }
h3 { font-size: 1.17em; line-height: 26px; }

/* keep your term view heading weight but let the global size come from h* rules */
.glossary-term-title { font-weight: 600; }
.glossary-section-title { font-weight: 600; }

/* ===========================
   A–Z Index (square targets)
   =========================== */

.glossary-az {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 1rem 0 1.25rem;
}

/* SQUARE + >= 24x24 */
.glossary-az a,
.glossary-az span {
  width: 32px;
  height: 32px;
  min-width: 24px;
  min-height: 24px;

  padding: 0;
  border-radius: 6px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(0,0,0,0.12);
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  font-size: .9rem;
}

.glossary-az span {
  /* De-emphasized visual while keeping letter text high-contrast.
     Use a soft, low-contrast background and subtle border so the
     letter appears muted but the glyph itself meets WCAG contrast. */
  background: rgba(17,24,39,0.04);
  border-color: rgba(17,24,39,0.06);
  color: #111827;
}

.glossary-az a:focus-visible {
  outline: 3px solid #0066cc;
  outline-offset: 2px;
}

.az-back {
  margin: 1rem 0 1.5rem;
}

.glossary-letter {
  margin-top: 1.25rem;
}

.disclaimer {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  background-color: hsl(220 14% 96%);
}

.disclaimer-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
  color: hsl(215 14% 54%);
}

.disclaimer p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: hsl(215 16% 43%);
}

.disclaimer strong {
  font-weight: 600;
  color: hsl(222 47% 11%);
}