[x-cloak] {
  display: none !important;
}

/* Glossary terms — subtle dotted underline, hover/focus shows tooltip,
   click opens the modal popover for the long definition. */
.glossary-term {
  border-bottom: 1px dashed #94a3b8;
  cursor: help;
  background-color: rgba(74, 85, 200, 0.04);
  transition: background-color 120ms ease;
  padding: 0 1px;
  position: relative;
}
.glossary-term:hover,
.glossary-term:focus {
  background-color: rgba(74, 85, 200, 0.12);
  outline: none;
}
.glossary-term[data-loaded] {
  border-bottom-color: rgba(74, 85, 200, 0.6);
}

.glossary-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background-color: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  width: 260px;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  transition: opacity 80ms ease;
  box-shadow: 0 8px 24px rgba(15,23,42,0.18);
}
.glossary-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}
.glossary-term:hover .glossary-tooltip,
.glossary-term:focus .glossary-tooltip {
  opacity: 1;
}

/* Table headers sit inside horizontal scroll wrappers; upward tooltips get clipped. */
thead th {
  overflow: visible;
  position: relative;
  z-index: 1;
}
thead th:hover,
thead th:focus-within {
  z-index: 20;
}
th .glossary-tooltip {
  bottom: auto;
  top: calc(100% + 6px);
  z-index: 50;
}
th .glossary-tooltip::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent #0f172a transparent;
}

/* Markdown article styling */
.prose-doc {
  max-width: none;
  color: #1f2937;
}
.prose-doc h1 { font-size: 1.875rem; font-weight: 700; color: #0f172a; margin: 0 0 1.25rem; line-height: 1.15; }
.prose-doc h2 { font-size: 1.4rem; font-weight: 700; color: #0f172a; margin: 2.25rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid #e5e7eb; }
.prose-doc h3 { font-size: 1.15rem; font-weight: 600; color: #0f172a; margin: 1.75rem 0 0.5rem; }
.prose-doc h4 { font-size: 1rem;    font-weight: 600; color: #0f172a; margin: 1.25rem 0 0.25rem; }
.prose-doc p, .prose-doc li, .prose-doc td, .prose-doc th { line-height: 1.65; }
.prose-doc p  { margin: 0.75rem 0; }
.prose-doc ul, .prose-doc ol { padding-left: 1.5rem; margin: 0.75rem 0; }
.prose-doc ul { list-style: disc; }
.prose-doc ol { list-style: decimal; }
.prose-doc strong { color: #0f172a; }
.prose-doc blockquote {
  border-left: 4px solid #4a55c8;
  background: #eef2ff;
  padding: 0.6rem 1rem;
  color: #1e1b4b;
  margin: 1rem 0;
  border-radius: 0 6px 6px 0;
}
.prose-doc code {
  background: #eef2ff;
  color: #312e81;
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
  font-size: 0.85em;
}
.prose-doc pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.5;
}
.prose-doc pre code { background: transparent; color: inherit; padding: 0; }
.prose-doc table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: 0.9rem; }
.prose-doc th, .prose-doc td {
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
.prose-doc th { background: #f1f5f9; font-weight: 600; color: #0f172a; }
.prose-doc tr:nth-child(even) td { background: #fafafa; }

/* Schedule risk matrix cell colouring */
.cell-margin {
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  width: 38px;
  min-width: 38px;
  white-space: nowrap;
}
.matrix-table th { font-size: 11px; font-weight: 600; }
.matrix-table th.rotated {
  height: 110px;
  vertical-align: bottom;
  white-space: nowrap;
  position: relative;
}
.matrix-table th.rotated > div {
  transform: rotate(-65deg) translate(20px, 0);
  transform-origin: left bottom;
  width: 22px;
}
.matrix-table th.row-label { white-space: nowrap; padding-right: 8px; text-align: right; font-weight: 600; }

/* Inline tag pill */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tag-pill.action { background: #fee2e2; color: #991b1b; }
.tag-pill.info   { background: #dbeafe; color: #1e40af; }
.tag-pill.clear  { background: #dcfce7; color: #166534; }

/* Sortable th */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: #e2e8f0; }

/* Public conference color badges (Red / Yellow / Green) */
.conf-badge.conf-red { background: #fee2e2; color: #991b1b; }
.conf-badge.conf-yellow { background: #fef9c3; color: #854d0e; }
.conf-badge.conf-green { background: #dcfce7; color: #166534; }
.conf-red { color: #b91c1c; }
.conf-yellow { color: #a16207; }
.conf-green { color: #15803d; }

/* Global header nav dropdowns */
.site-nav-dropdown {
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}
.site-nav-group-active {
  font-weight: 600;
}
