/* Curated plain-language feature help: subtle 14px gray badge + anti-clipping practical guide popover */
:root {
  --sidebar: 214px;
}

.sidebar .nav-item,
.sidebar .nav-group-toggle {
  padding: 0 14px 0 18px;
  gap: 10px;
}

.sidebar .nav-children .nav-item {
  padding: 0 14px 0 38px;
  gap: 0;
}

/* Understated 14x14 thin gray circle; only pops into theme blue on hover/focus/open */
.fh-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  margin-left: 5px;
  border-radius: 50%;
  border: 1px solid #cbd5e1;
  background: transparent;
  color: #94a3b8;
  opacity: 0.72;
  font-size: 10px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  vertical-align: middle;
  flex-shrink: 0;
  cursor: help;
  user-select: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.fh-badge:hover,
.fh-badge:focus-visible,
.fh-badge.is-open {
  background: #1677ff;
  border-color: #1677ff;
  color: #ffffff;
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.16);
  outline: none;
}

.sidebar .nav-item.active .fh-badge {
  border-color: #93c5fd;
  background: transparent;
  color: #3b82f6;
  opacity: 0.85;
}

.sidebar .nav-item.active .fh-badge:hover,
.sidebar .nav-item.active .fh-badge.is-open {
  background: #1677ff;
  border-color: #1677ff;
  color: #ffffff;
  opacity: 1;
}

.collapsed .sidebar .fh-badge,
.nav-collapsed .sidebar .fh-badge {
  display: none !important;
}

.tab .fh-badge,
.subtab .fh-badge {
  margin-left: 5px;
  vertical-align: -1px;
}

.page-panel > .tabs {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.panel-title .fh-badge {
  margin-left: 6px;
}

.staff-metric > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Global body-mounted anti-clipping popover */
.fh-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99999;
  width: max-content;
  min-width: 280px;
  max-width: min(416px, calc(100vw - 20px));
  background: #ffffff;
  color: #1e293b;
  border: 1px solid #d7e4f4;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 42, 84, 0.14), 0 2px 8px rgba(15, 42, 84, 0.06);
  padding: 13px 15px 14px;
  font-size: 12.5px;
  line-height: 1.62;
  text-align: left;
  white-space: normal;
  word-break: break-word;
  pointer-events: auto;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.fh-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fh-tooltip-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid #edf2f7;
}

.fh-tooltip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1677ff;
  flex-shrink: 0;
}

.fh-tooltip-rows {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.fh-tooltip-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: start;
}

.fh-tooltip-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 20px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  margin-top: 1px;
  white-space: nowrap;
}

.fh-tooltip-tag.plain {
  background: #e8f3ff;
  color: #1366d6;
}

.fh-tooltip-tag.steps {
  background: #e8f8ef;
  color: #157a46;
}

.fh-tooltip-tag.pitfall {
  background: #fff4e2;
  color: #b56500;
}

.fh-tooltip-text {
  color: #334155;
  font-weight: 400;
}

.fh-tooltip-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #334155;
}

.fh-tooltip-step {
  line-height: 1.56;
}

@media print {
  .fh-badge,
  .fh-tooltip {
    display: none !important;
  }
}
