/**
 * competency-framework.css — shared CSS partial for the 3-hub
 * `/competency-framework` page (CH Specialists · AH Leaders · TH Teachers).
 *
 * Source-of-truth lives in monorepo /shared-design/. Each hub's build.js
 * copies this file into dist/competency-framework.css and the HTML carries
 * a <link rel="stylesheet" href="competency-framework.css">.
 *
 * SCOPE — extracted from the 3 hub HTMLs 2026-05-23 after byte-level diff.
 * Only blocks that are 100% byte-identical across all 3 hubs live here:
 *   - .cf-legend-* chip legend popover (fixed bottom-right help button)
 *   - .domain-takeaways accordion toggle
 *
 * NOT extracted (kept in per-hub <style> blocks):
 *   - hub accent colors (mor / teal / violet)
 *   - hero gradients
 *   - chip pill families (CH+TH .cts-pill vs AH .csls-pill)
 *   - .sf-toolbar (TH wraps, CH+AH nowrap)
 *   - .comp-row (TH column layout, CH+AH row)
 *   - .level-card colors (per-hub theme)
 *   - .grounded-band gradient + tile colors
 *   - .page-intro banner colors
 *   - 3-hub render contract details (renderDomains, renderCompRow, etc.)
 *
 * If a future change needs hub-specific behavior for cf-legend or
 * domain-takeaways, MOVE the block back into the per-hub <style> first,
 * then divergence can happen safely. Don't fork behavior here.
 */

/* ─── DOMAIN TAKEAWAYS ACCORDION ───────────────────────────────── */
.domain-takeaways { padding: 0 20px 16px; border-top: 1px solid var(--border); margin-top: 4px; }
.domain-takeaways-toggle { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 0; cursor: pointer; user-select: none; }
.domain-takeaways-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.domain-takeaways-chevron { width: 16px; height: 16px; color: var(--ink-3); transition: transform .2s; flex-shrink: 0; }
.domain-card.tk-open .domain-takeaways-chevron { transform: rotate(180deg); }
.domain-takeaways-list { display: none; padding-top: 10px; flex-direction: column; gap: 6px; }
.domain-card.tk-open .domain-takeaways-list { display: flex; }
.domain-tk-item { font-size: 12px; color: var(--ink-2); line-height: 1.5; padding: 7px 10px; border-radius: 8px; background: var(--paper); border-left: 3px solid var(--border); display: flex; gap: 8px; align-items: flex-start; }
.domain-tk-item::before { content: '→'; font-weight: 700; color: var(--ink-3); flex-shrink: 0; margin-top: 1px; }

/* ─── CHIP LEGEND POPOVER (bottom-right floating help) ─────────── */
.cf-legend-btn {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  background: #1e1b4b; color: #fff;
  border: none; border-radius: 999px;
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 28px rgba(30, 27, 75, 0.32), 0 2px 6px rgba(30, 27, 75, 0.18);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cf-legend-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(30, 27, 75, 0.4), 0 3px 8px rgba(30, 27, 75, 0.2); }
.cf-legend-btn:focus-visible { outline: 2px solid #a78bfa; outline-offset: 3px; }
.cf-legend-btn .cf-legend-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,0.18); font-size: 11px; font-weight: 700; font-style: italic; font-family: 'Lora', serif;
}

.cf-legend-popover {
  position: fixed; right: 24px; bottom: 80px; z-index: 91;
  width: 360px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px); overflow-y: auto;
  background: #fff; color: #0f172a;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28), 0 6px 16px rgba(15, 23, 42, 0.12);
  border: 1px solid #e2e8f0;
  font-family: 'DM Sans', sans-serif;
  opacity: 0; transform: translateY(8px) scale(0.98); pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.cf-legend-popover.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.cf-legend-popover__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f1f5f9;
}
.cf-legend-popover__title { font-family: 'Lora', serif; font-size: 15px; font-weight: 700; color: #0f172a; margin: 0; }
.cf-legend-popover__close {
  appearance: none; background: transparent; border: none;
  width: 28px; height: 28px; border-radius: 6px;
  font-size: 18px; line-height: 1; color: #64748b; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.cf-legend-popover__close:hover { background: #f1f5f9; color: #0f172a; }
.cf-legend-popover__body { padding: 12px 16px 16px; }
.cf-legend-popover__intro {
  font-size: 12px; line-height: 1.5; color: #64748b;
  margin: 0 0 12px;
}
.cf-legend-row {
  display: grid; grid-template-columns: auto 1fr; gap: 10px 12px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
}
.cf-legend-row:first-of-type { border-top: none; padding-top: 4px; }
.cf-legend-row__sample { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 64px; }
.cf-legend-row__text { font-size: 12px; line-height: 1.45; }
.cf-legend-row__label { display: block; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.cf-legend-row__desc { color: #475569; }
.cf-legend-popover__footer {
  margin-top: 8px; padding-top: 10px; border-top: 1px solid #f1f5f9;
  font-size: 11px; color: #94a3b8; line-height: 1.5;
}
@media (max-width: 720px) {
  .cf-legend-btn { right: 16px; bottom: 16px; padding: 9px 14px; font-size: 12px; }
  .cf-legend-popover { right: 16px; left: 16px; width: auto; bottom: 68px; }
}
@media print {
  .cf-legend-btn, .cf-legend-popover { display: none !important; }
}
