/* EZ AI — Design Tokens v2  ("Pro Dark")
   Audience: 15–18  |  Style: Linear / Vercel / Notion for teens */

:root {
  /* ---- Brand ---- */
  --brand:        #7C3AED;
  --brand-hi:     #A78BFA;
  --brand-dim:    rgba(124,58,237,.15);
  --brand-border: rgba(124,58,237,.35);
  /* Progress / status — not brand CTAs */
  --progress:     var(--cyan);
  --progress-dim: var(--cyan-dim);
  --cyan:         #06B6D4;
  --cyan-dim:     rgba(6,182,212,.12);
  --orange:       #F97316;
  --green:        #10B981;
  --green-dim:    rgba(16,185,129,.12);
  --red:          #EF4444;
  --yellow:       #F59E0B;

  /* ---- Track accents ---- */
  --t-prompt:  #818CF8;
  --t-vibe:    #A78BFA;
  --t-found:   #60A5FA;
  --t-auto:    #22D3EE;
  --t-agents:  #C084FC;
  --t-ml:      #34D399;
  --t-cursor:  #F472B6;
  --t-models:  #FB923C;
  --t-business:#2DD4BF;
  --t-sales-agent: #F59E0B;
  --t-sales-manager: #8B5CF6;
  --t-parent-guardian: #38BDF8;
  --t-parent-coach: #A78BFA;
  --t-parent-home: #34D399;

  /* ---- Surfaces — DARK default ---- */
  --bg:         #0A0A0F;
  --bg-2:       #111118;
  --bg-3:       #18181F;
  --bg-4:       #202028;
  --border:     rgba(255,255,255,.08);
  --border-hi:  rgba(255,255,255,.14);

  /* ---- Text ---- */
  --tx:         #F1F0F5;
  --tx-2:       #9493A8;
  --tx-3:       #5A5970;

  /* ---- Typography ---- */
  --font:       "Heebo", system-ui, -apple-system, sans-serif;
  --font-d:     "Rubik", "Heebo", system-ui, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, monospace;

  /* ---- Scale ---- */
  --fs-xl:   28px;
  --fs-h1:   22px;
  --fs-h2:   17px;
  --fs-body: 15px;
  --fs-sm:   13px;
  --fs-xs:   11px;

  /* ---- Space ---- */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;

  /* ---- Radius ---- */
  --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-xl: 18px; --r-full: 999px;

  /* ---- Shadow ---- */
  --sh-card: 0 1px 3px rgba(0,0,0,.4), 0 0 0 1px var(--border);
  --sh-pop:  0 20px 60px rgba(0,0,0,.7);

  /* ---- Motion ---- */
  --ease: cubic-bezier(.22,1,.36,1);
  --dur:  200ms;

  /* ---- Layout ---- */
  --hud-h: 52px;
  --tab-h: 60px;
  --sidebar-w: 220px;
  --nav-w: 220px;
  --nav-rail: 56px;
  --dock-w: 380px;
  --dock-rail: 52px;

  /* ---- App chrome (header + nav + dock) ---- */
  --chrome-bg:     var(--bg-2);
  --chrome-border: var(--border);
}

/* Light override */
:root[data-theme="light"] {
  --bg:        #F8F8FC;
  --bg-2:      #FFFFFF;
  --bg-3:      #F1F0F8;
  --bg-4:      #E8E7F2;
  --border:    rgba(0,0,0,.07);
  --border-hi: rgba(0,0,0,.13);
  --tx:        #18181F;
  --tx-2:      #5A5970;
  --tx-3:      #9493A8;
  --sh-card:   0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--border);
  --sh-pop:    0 20px 60px rgba(0,0,0,.18);
  --brand-dim: rgba(124,58,237,.08);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F8F8FC; --bg-2: #FFFFFF; --bg-3: #F1F0F8; --bg-4: #E8E7F2;
    --border: rgba(0,0,0,.07); --border-hi: rgba(0,0,0,.13);
    --tx: #18181F; --tx-2: #5A5970; --tx-3: #9493A8;
    --sh-card: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--border);
    --sh-pop: 0 20px 60px rgba(0,0,0,.18);
    --brand-dim: rgba(124,58,237,.08);
  }
}

/* EZ Comply — corporate theme (calm, professional) */
:root {
  --comply-bg: #f8fafc;
  --comply-surface: #ffffff;
  --comply-border: #e2e8f0;
  --comply-text: #0f172a;
  --comply-muted: #64748b;
  --comply-accent: #2563eb;
  --comply-accent-soft: #dbeafe;
  --comply-success: #059669;
  --comply-warn: #d97706;
  --comply-danger: #dc2626;
  --comply-radius: 10px;
  --comply-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.comply-app {
  min-height: 100vh;
  background: var(--comply-bg);
  color: var(--comply-text);
  font-family: system-ui, -apple-system, sans-serif;
}

.comply-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--comply-surface);
  border-bottom: 1px solid var(--comply-border);
  box-shadow: var(--comply-shadow);
}

.comply-brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--comply-accent);
}

.comply-nav {
  display: flex;
  gap: 8px;
}

.comply-nav button {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--comply-muted);
  font-weight: 500;
}

.comply-nav button.active,
.comply-nav button:hover {
  background: var(--comply-accent-soft);
  color: var(--comply-accent);
}

.comply-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
}

.comply-card {
  background: var(--comply-surface);
  border: 1px solid var(--comply-border);
  border-radius: var(--comply-radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--comply-shadow);
}

.comply-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.comply-card p {
  margin: 0;
  color: var(--comply-muted);
  font-size: 14px;
}

.comply-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.comply-btn {
  border: none;
  background: var(--comply-accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.comply-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.comply-btn--ghost {
  background: transparent;
  color: var(--comply-accent);
  border: 1px solid var(--comply-border);
}

.comply-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.comply-chip--todo { background: #fef3c7; color: #92400e; }
.comply-chip--progress { background: #dbeafe; color: #1d4ed8; }
.comply-chip--done { background: #d1fae5; color: #065f46; }
.comply-chip--overdue { background: #fee2e2; color: #991b1b; }

.comply-admin {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.comply-sidebar {
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px 0;
}

.comply-sidebar h1 {
  font-size: 16px;
  padding: 0 20px 16px;
  margin: 0;
  color: #fff;
}

.comply-sidebar nav button {
  display: block;
  width: 100%;
  text-align: start;
  border: none;
  background: transparent;
  color: #94a3b8;
  padding: 10px 20px;
  cursor: pointer;
}

.comply-sidebar nav button.active,
.comply-sidebar nav button:hover {
  background: rgba(37, 99, 235, 0.2);
  color: #fff;
}

.comply-admin-main {
  padding: 24px;
  overflow: auto;
}

.comply-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.comply-stat {
  background: var(--comply-surface);
  border: 1px solid var(--comply-border);
  border-radius: var(--comply-radius);
  padding: 16px;
}

.comply-stat-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--comply-accent);
}

.comply-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comply-table th,
.comply-table td {
  border-bottom: 1px solid var(--comply-border);
  padding: 10px 8px;
  text-align: start;
}

.comply-table th {
  color: var(--comply-muted);
  font-weight: 600;
}

.comply-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.comply-form input,
.comply-form select,
.comply-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--comply-border);
  border-radius: 8px;
  margin-bottom: 14px;
  font: inherit;
}
.comply-form select[multiple] {
  min-height: 6.5rem;
  padding: 6px;
}
.comply-form select[multiple] option {
  padding: 4px 6px;
  border-radius: 4px;
}

.comply-progress-rail {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.comply-progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--comply-border);
}

.comply-progress-dot.done { background: var(--comply-success); }
.comply-progress-dot.current { background: var(--comply-accent); }

.comply-attest {
  border: 2px solid var(--comply-accent-soft);
  background: #f0f9ff;
  padding: 20px;
  border-radius: var(--comply-radius);
  margin-top: 20px;
}

.comply-attest label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

@media (max-width: 720px) {
  .comply-admin { grid-template-columns: 1fr; }
  .comply-sidebar { display: flex; overflow-x: auto; padding: 12px; }
  .comply-sidebar nav { display: flex; gap: 4px; }
  .comply-sidebar nav button { white-space: nowrap; width: auto; border-radius: 8px; }
}

.comply-auth-gate {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent); padding: var(--s4);
}
.comply-auth-gate[hidden] { display: none !important; }
.comply-auth-card { max-width: 420px; width: 100%; padding: var(--s4); }
.comply-auth-card h1 { margin: 0 0 var(--s2); font-family: var(--font-d); }

/* ── Shell header ── */
.comply-brand-block { min-width: 0; }
.comply-brand-sub { font-size: 12px; color: var(--comply-muted); margin-top: 2px; }
.comply-header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.comply-header {
  flex-wrap: wrap;
  gap: 12px;
}
.comply-sidebar-brand {
  padding: 0 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 8px;
}
.comply-sidebar-product {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #94a3b8;
}
.comply-sidebar-org {
  display: block;
  font-size: 15px;
  color: #fff;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comply-sidebar-foot {
  margin-top: auto;
  padding: 16px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.comply-sidebar {
  display: flex;
  flex-direction: column;
}
.comply-admin-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}
.comply-admin-top {
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--comply-border);
  background: var(--comply-surface);
}
.comply-admin-top h1 {
  margin: 0;
  font-size: 22px;
}
.comply-admin-sub {
  margin: 4px 0 16px;
  font-size: 14px;
  color: var(--comply-muted);
}

/* ── Components ── */
.comply-btn--sm { padding: 6px 12px; font-size: 13px; }
.comply-muted { color: var(--comply-muted); font-size: 14px; margin: 4px 0 0; }
.comply-meta { color: var(--comply-muted); font-size: 13px; margin: 6px 0 0; }
.comply-meta strong { color: var(--comply-text); }
.comply-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--comply-accent-soft);
  color: var(--comply-accent);
  margin-bottom: 6px;
}
.comply-badge--req { background: #fef3c7; color: #92400e; }
.comply-list { display: flex; flex-direction: column; gap: 12px; }
.comply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.comply-training-card {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
}
.comply-training-card__body { flex: 1; min-width: 0; }
.comply-training-card__top { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.comply-training-card__cta { align-self: center; flex-shrink: 0; }
.comply-training-card h2 { margin: 0; font-size: 17px; }
.comply-empty { text-align: center; padding: 48px 24px; }
.comply-empty h2 { margin: 0 0 8px; font-size: 18px; }
.comply-alert { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.comply-loading { padding: 32px; color: var(--comply-muted); }
.comply-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.comply-toolbar h2 { margin: 0; }
.comply-section { margin-top: 24px; }
.comply-section-title { margin: 24px 0 12px; font-size: 18px; }
.comply-table-wrap { overflow-x: auto; border: 1px solid var(--comply-border); border-radius: var(--comply-radius); background: var(--comply-surface); }
.comply-actions { white-space: nowrap; text-align: end; }
.comply-actions .comply-btn { margin-inline-start: 6px; }
.comply-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.comply-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.comply-course-card h2 { margin: 8px 0 4px; font-size: 16px; }

/* ── Course + completion ── */
.comply-course-head { margin-bottom: 20px; }
.comply-course-head h1 { margin: 0 0 6px; font-size: 22px; }
.comply-course-shell { max-width: 720px; }
.comply-quiz-prompt p { margin: 0 0 16px; }
.comply-complete {
  text-align: center;
  max-width: 420px;
  margin: 48px auto;
  padding: 32px 24px;
}
.comply-complete-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #d1fae5;
  color: #059669;
  font-size: 32px;
  line-height: 64px;
  font-weight: 700;
}
.comply-complete h2 { margin: 0 0 8px; }
.comply-complete-score { font-size: 28px; font-weight: 700; color: var(--comply-accent); }
.comply-complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

/* ── Modal ── */
.comply-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.comply-modal {
  width: min(480px, 100%);
  max-height: 90vh;
  overflow: auto;
}
.comply-modal textarea {
  width: 100%;
  font: inherit;
  padding: 10px;
  border: 1px solid var(--comply-border);
  border-radius: 8px;
  margin-bottom: 16px;
  box-sizing: border-box;
}
.comply-modal--wide { width: min(640px, 100%); }
.comply-table--click tbody tr { cursor: pointer; }
.comply-table--click tbody tr:hover { background: var(--comply-surface-2, #f8fafc); }

.comply-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.comply-plan-card { display: flex; flex-direction: column; gap: 8px; }
.comply-plan-card--current { border-color: var(--comply-accent, #2563eb); }
.comply-plan-price { font-size: 1.1rem; font-weight: 600; margin: 0; }
.comply-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
  font-size: .875rem;
  color: var(--comply-muted, #64748b);
}
.comply-plan-features li::before { content: "✓ "; color: var(--comply-accent, #2563eb); }
.comply-plan-note { font-size: .875rem; margin-top: 12px; }

.comply-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 12px 0 16px;
  max-height: 240px;
  overflow: auto;
}
.comply-perm-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: .875rem;
}

.comply-admin { --comply-sidebar-bg: #0f172a; --comply-sidebar-accent: rgba(37, 99, 235, 0.2); }
.comply-admin[data-admin-mode="manager"] {
  --comply-sidebar-bg: #134e4a;
  --comply-sidebar-accent: rgba(13, 148, 136, 0.25);
  --comply-accent: #0d9488;
  --comply-accent-soft: #ccfbf1;
}
.comply-admin[data-admin-mode="auditor"] {
  --comply-sidebar-bg: #334155;
  --comply-sidebar-accent: rgba(100, 116, 139, 0.25);
  --comply-accent: #475569;
  --comply-accent-soft: #e2e8f0;
}
.comply-sidebar { background: var(--comply-sidebar-bg, #0f172a); }
.comply-sidebar nav button.active,
.comply-sidebar nav button:hover { background: var(--comply-sidebar-accent); }
.comply-sidebar-brand { padding: 0 20px 16px; }
.comply-sidebar-role {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,.12);
  color: #e2e8f0;
}
.comply-mode-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--comply-accent-soft);
  color: var(--comply-accent);
  margin-bottom: 8px;
}
.comply-mode-pill--mgr { background: #ccfbf1; color: #0f766e; }
.comply-mode-pill--audit { background: #e2e8f0; color: #475569; }
.comply-hr-hero, .comply-mgr-hero { display: grid; gap: 16px; }
.comply-hr-hero-top h2 { margin: 0 0 4px; font-size: 1.5rem; }
.comply-hr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.comply-seat-bar { margin-top: 4px; }
.comply-seat-bar-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.comply-seat-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--comply-border);
  overflow: hidden;
}
.comply-seat-bar-fill { height: 100%; background: var(--comply-accent); border-radius: 999px; }
.comply-seat-warn { color: var(--comply-danger); margin: 6px 0 0; font-size: 12px; }
.comply-hr-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  margin-bottom: 16px;
}
.comply-dept-grid, .comply-camp-grid, .comply-mgr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.comply-dept-card, .comply-camp-card, .comply-mgr-card {
  border: 1px solid var(--comply-border);
  border-radius: 10px;
  padding: 14px;
  background: var(--comply-bg);
}
.comply-dept-card h4, .comply-camp-card strong { margin: 0 0 6px; display: block; }
.comply-dept-meta { margin: 0 0 8px; font-size: 12px; color: var(--comply-muted); }
.comply-dept-stats { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.comply-dept-overdue { color: var(--comply-danger); font-weight: 600; }
.comply-progress-line {
  height: 6px;
  border-radius: 999px;
  background: var(--comply-border);
  overflow: hidden;
  margin: 8px 0 4px;
}
.comply-progress-fill { height: 100%; background: var(--comply-accent); border-radius: 999px; }
.comply-attention-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: start;
  border: 1px solid var(--comply-border);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--comply-surface);
  cursor: pointer;
}
.comply-attention-row:hover { border-color: var(--comply-accent); }
.comply-stat--warn .comply-stat-val { color: var(--comply-danger); }
.comply-mgr-hero { position: relative; padding-bottom: 72px; }
.comply-mgr-ring {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 6px solid var(--comply-accent-soft);
  border-top-color: var(--comply-accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.comply-mgr-ring-val { font-size: 1.25rem; font-weight: 800; color: var(--comply-accent); line-height: 1; }
.comply-mgr-ring-label { font-size: 10px; color: var(--comply-muted); }
.comply-mgr-card { cursor: pointer; transition: border-color .15s; }
.comply-mgr-card:hover { border-color: var(--comply-accent); }
.comply-mgr-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.comply-mgr-progress { margin-top: 10px; font-size: 12px; color: var(--comply-muted); }
.comply-mgr-courses {
  margin: 10px 0 0;
  padding-left: 16px;
  font-size: 12px;
  color: var(--comply-muted);
}
.comply-auditor-home { max-width: 520px; }
.comply-hr-people-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 16px;
}

/* ── Admin page chrome ── */
.comply-sidebar nav button.comply-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.comply-nav-icon {
  width: 18px;
  text-align: center;
  opacity: 0.85;
  font-size: 14px;
}
.comply-nav-label { flex: 1; }

.comply-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.comply-section-bar-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.comply-section-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-inline-start: auto; }

.comply-toolbar-row { margin-bottom: 12px; }
.comply-search-wrap { max-width: 360px; }
.comply-search {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--comply-border);
  border-radius: 10px;
  font: inherit;
  background: var(--comply-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 12px center;
}
.comply-search:focus {
  outline: none;
  border-color: var(--comply-accent);
  box-shadow: 0 0 0 3px var(--comply-accent-soft);
}

.comply-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.comply-filter-chip {
  border: 1px solid var(--comply-border);
  background: var(--comply-surface);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--comply-muted);
  text-transform: capitalize;
}
.comply-filter-chip:hover { border-color: var(--comply-accent); color: var(--comply-text); }
.comply-filter-chip.active {
  background: var(--comply-accent-soft);
  border-color: var(--comply-accent);
  color: var(--comply-accent);
}

.comply-stat-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}
.comply-stat-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  border: 1px solid var(--comply-border);
  border-radius: 10px;
  background: var(--comply-surface);
  min-width: 100px;
}
.comply-stat-pill--warn { border-color: #fecaca; background: #fef2f2; }
.comply-stat-pill--warn .comply-stat-pill-val { color: var(--comply-danger, #dc2626); }
.comply-stat-pill-val { font-size: 20px; font-weight: 800; color: var(--comply-accent); line-height: 1.1; }
.comply-stat-pill-label { font-size: 12px; color: var(--comply-muted); }

.comply-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.comply-course-tile {
  position: relative;
  border: 1px solid var(--comply-border);
  border-radius: 12px;
  background: var(--comply-surface);
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}
.comply-course-tile:hover {
  border-color: var(--comply-accent);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.comply-course-tile-accent {
  height: 4px;
  background: var(--comply-accent);
}
.comply-cat--security .comply-course-tile-accent { background: #2563eb; }
.comply-cat--privacy .comply-course-tile-accent { background: #7c3aed; }
.comply-cat--ai .comply-course-tile-accent { background: #0891b2; }
.comply-cat--hr .comply-course-tile-accent { background: #db2777; }
.comply-cat--finance .comply-course-tile-accent { background: #059669; }
.comply-cat--dev .comply-course-tile-accent { background: #ea580c; }
.comply-cat--mgmt .comply-course-tile-accent { background: #4f46e5; }
.comply-cat--default .comply-course-tile-accent { background: #64748b; }
.comply-course-tile-body { padding: 14px 14px 12px; }
.comply-course-tile-title {
  margin: 6px 0 4px;
  font-size: 15px;
  line-height: 1.35;
}
.comply-course-tile-meta { margin: 0; font-size: 12px; }
.comply-course-tile-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--comply-border); }
.comply-badge--cat { font-size: 10px; margin-bottom: 0; }

/* ── Courses: Library-style shelf (mirrors Learn → Library) ── */
.comply-lib-page { display: flex; flex-direction: column; gap: 16px; }
.comply-lib-bar { padding: 16px 18px; }
.comply-lib-bar .comply-filter-chips { margin-bottom: 0; margin-top: 12px; }
.comply-lib-bar-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.comply-lib-bar-title {
  font-weight: 800;
  font-size: 16px;
  color: var(--comply-text);
}
.comply-lib-bar-note { font-size: 13px; color: var(--comply-muted); }
.comply-lib-bar-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.comply-lib-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--comply-border);
  background: var(--comply-bg);
  color: var(--comply-muted);
}
.comply-lib-stat--on {
  color: var(--comply-success);
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.comply-lib-stat--sections { color: var(--comply-accent); border-color: var(--comply-accent-soft); }
.comply-lib-search {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 40px;
  border: 1px solid var(--comply-border);
  border-radius: 999px;
  font: inherit;
  background: var(--comply-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 14px center;
}
.comply-lib-search:focus {
  outline: none;
  border-color: var(--comply-accent);
  box-shadow: 0 0 0 3px var(--comply-accent-soft);
}
.comply-details--inline {
  margin-top: 12px;
  border: 1px dashed var(--comply-border);
  border-radius: 10px;
  background: var(--comply-bg);
}
.comply-details--inline summary { padding: 10px 14px; font-size: 13px; }
.comply-form--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 0 14px 14px;
}
.comply-form--inline label { flex: 1; min-width: 180px; margin: 0; }
.comply-form--inline input { margin-bottom: 0; }

.comply-lib-shelf { display: flex; flex-direction: column; gap: 28px; padding-bottom: 8px; }
.comply-lib-section { display: flex; flex-direction: column; gap: 10px; }
.comply-lib-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.comply-lib-section-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.comply-lib-section-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--comply-muted);
}
.comply-lib-section-meta {
  font-size: 13px;
  font-weight: 800;
  color: var(--comply-accent);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--comply-accent-soft);
  flex-shrink: 0;
}
.comply-lib-shelf-row { position: relative; padding-bottom: 10px; }
.comply-lib-shelf-books {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  perspective: 900px;
  padding: 4px 2px 14px;
}
.comply-lib-shelf-plank {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08);
}
.comply-lib-book {
  position: relative;
  width: 148px;
  min-height: 196px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: default;
  text-align: start;
  transition: transform 0.2s ease;
}
.comply-lib-book:hover { transform: translateY(-6px); }
.comply-lib-book-spine {
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 10px;
  border-radius: 3px 0 0 3px;
  background: color-mix(in srgb, var(--book) 75%, #000);
}
.comply-lib-book-cover {
  position: relative;
  margin-left: 8px;
  min-height: 188px;
  padding: 12px 12px 10px;
  border-radius: 0 10px 10px 0;
  background: linear-gradient(145deg, var(--book) 0%, color-mix(in srgb, var(--book) 70%, #1e293b) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 4px 12px rgba(15, 23, 42, 0.18);
  transition: box-shadow 0.2s ease, filter 0.2s ease;
}
.comply-lib-book-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 10px 10px 0;
  background: linear-gradient(135deg, rgba(255,255,255,.18) 0%, transparent 45%);
  pointer-events: none;
}
.comply-lib-book-glyph {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.2));
}
.comply-lib-book-cat {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.88;
  margin-bottom: 4px;
}
.comply-lib-book-title {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.comply-lib-book-meta {
  margin: 0;
  font-size: 10px;
  opacity: 0.85;
}
.comply-lib-book-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.comply-lib-book.is-off .comply-lib-book-cover {
  filter: saturate(0.45) brightness(0.88);
  opacity: 0.92;
}
.comply-switch--book {
  color: #fff;
  font-size: 11px;
}
.comply-switch--book .comply-switch-ui {
  background: rgba(255,255,255,.35);
}
.comply-switch--book input:checked + .comply-switch-ui {
  background: rgba(255,255,255,.95);
}
.comply-switch--book input:checked + .comply-switch-ui::after {
  background: var(--book);
}
.comply-lib-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--comply-muted);
}

.comply-lib-mount--open .comply-lib-bar { display: none; }
.comply-lib-book { cursor: pointer; font: inherit; color: inherit; text-align: start; }
.comply-lib-book:focus-visible { outline: 2px solid var(--comply-accent); outline-offset: 3px; }

/* Course open — lecture map (Library track view) */
.comply-lib-open {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.comply-lib-open.is-in { opacity: 1; transform: none; }
.comply-lib-open-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.comply-lib-open-titles { flex: 1; min-width: 0; }
.comply-lib-open-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--book, var(--comply-accent));
}
.comply-lib-open-title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.comply-lib-open-stats {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--comply-muted);
}
.comply-lib-open-frameworks { margin: 0 0 12px; font-size: 13px; }
.comply-lib-map {
  position: relative;
  padding-inline-start: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comply-lib-map-trail {
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--comply-border);
  border-radius: 999px;
}
.comply-lib-class {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: start;
  border: 1px solid var(--comply-border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--comply-surface);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.comply-lib-class:hover {
  border-color: var(--book, var(--comply-accent));
  background: var(--comply-bg);
}
.comply-lib-class-node {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--book, var(--comply-accent)) 15%, white);
  color: var(--book, var(--comply-accent));
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.comply-lib-class-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.comply-lib-class-title { font-weight: 700; font-size: 14px; }
.comply-lib-class-meta { font-size: 12px; color: var(--comply-muted); }
.comply-lib-class-go { color: var(--comply-muted); font-size: 18px; flex-shrink: 0; }

/* Lecture reader (Library read view, light theme) */
/* ── Admin course reader — two-panel layout ── */
.comply-read-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: 560px;
  border-radius: var(--comply-radius);
  border: 1px solid var(--comply-border);
  overflow: hidden;
  background: var(--comply-surface);
  box-shadow: var(--comply-shadow);
}

/* Sidebar */
.comply-read-sidebar {
  background: #f8faff;
  border-right: 1px solid var(--comply-border);
  display: flex;
  flex-direction: column;
}
.comply-read-sidebar-head {
  padding: 16px 14px;
  border-bottom: 1px solid var(--comply-border);
}
.comply-read-sidebar-course {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--comply-muted);
  line-height: 1.3;
}
.comply-read-sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.comply-read-sidebar-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: start;
  padding: 10px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 120ms;
  border-left: 3px solid transparent;
}
.comply-read-sidebar-item:hover { background: var(--comply-accent-soft); }
.comply-read-sidebar-item--active {
  background: var(--comply-accent-soft);
  border-left-color: var(--comply-accent);
}
.comply-read-sidebar-num {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--comply-border);
  font-size: 11px;
  font-weight: 800;
  color: var(--comply-muted);
  display: grid;
  place-items: center;
}
.comply-read-sidebar-item--active .comply-read-sidebar-num {
  background: var(--comply-accent);
  color: #fff;
}
.comply-read-sidebar-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--comply-text);
  flex: 1;
  text-align: start;
}
.comply-read-sidebar-item--active .comply-read-sidebar-label { font-weight: 700; color: var(--comply-accent); }

/* Main reading pane */
.comply-read-main {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: min(80vh, 760px);
}
.comply-read-content { border: none !important; box-shadow: none !important; border-radius: 0 !important; margin: 0 !important; flex: 1; }

/* Content header */
.comply-read-content-head {
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--comply-border);
  background: linear-gradient(160deg, color-mix(in srgb, var(--book, var(--comply-accent)) 8%, #fff) 0%, #fff 80%);
}
.comply-read-content-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--comply-accent);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.comply-read-content-title {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--comply-text);
}
.comply-read-content-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--comply-muted);
}
.comply-read-preview-badge {
  background: #fef3c7;
  color: #92400e;
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 600;
  font-size: 11px;
}

.comply-read-article {
  padding: 24px 28px 28px;
  flex: 1;
}
.comply-read-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-top: 1px solid var(--comply-border);
  background: var(--comply-bg);
  flex-shrink: 0;
}
.comply-read-end-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--comply-success);
}

/* Kept for compatibility */
.comply-read-page { padding: 0; overflow: hidden; }
.comply-read-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--comply-border); flex-wrap: wrap;
}
.comply-read-head-text { flex: 1; min-width: 0; }
.comply-read-kicker { font-size: 11px; font-weight: 700; color: var(--comply-accent); text-transform: uppercase; letter-spacing: .04em; }
.comply-read-title { margin: 4px 0 0; font-size: 20px; font-weight: 800; }
.comply-read-meta { margin: 6px 0 0; font-size: 12px; }
.comply-read-nav { display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--comply-border); flex-wrap: wrap; }
.comply-read-nav-dot { width: 10px; height: 10px; border-radius: 50%; border: none; padding: 0; background: var(--comply-border); cursor: pointer; }
.comply-read-nav-dot.active { background: var(--comply-accent); transform: scale(1.15); }

/* Reader prose (shared with LibraryReader output) */
.comply-read-article .rd-lead { display: none; } /* header shown in comply-read-content-head */
.comply-read-article .rd-meta { display: none; }
.comply-read-article .rd-sec {
  padding: 18px 0;
  border-top: 1px solid var(--comply-border);
}
.comply-read-article .rd-sec:first-of-type { border-top: none; padding-top: 0; }
.comply-read-article .rd-h {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--comply-text);
}
.comply-read-article .ls-prose-p {
  margin: 0 0 14px;
  line-height: 1.7;
  font-size: 15px;
  color: var(--comply-text);
}
.comply-read-article .ls-prose-p:last-child { margin-bottom: 0; }
.comply-read-article .ls-prose strong { color: var(--comply-text); }
.comply-read-article .rd-list {
  margin: 0 0 12px;
  padding-left: 22px;
  line-height: 1.65;
  font-size: 15px;
}
.comply-read-article .rd-list-item { margin-bottom: 6px; }
.comply-read-article .rd-quiz-q { font-weight: 700; font-size: 16px; margin-bottom: 14px; line-height: 1.4; }
.comply-read-article .rd-choices {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.comply-read-article .rd-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--comply-border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--comply-bg);
  transition: border-color 120ms, background 120ms;
}
.comply-read-article .rd-choice:hover { border-color: #93c5fd; background: #eff6ff; }
.comply-read-article .rd-choice.is-correct {
  border-color: #86efac;
  background: #f0fdf4;
}
.comply-read-article .rd-choice-key {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--comply-border);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.comply-read-article .rd-choice.is-correct .rd-choice-key {
  background: var(--comply-success);
  color: #fff;
}
.comply-read-article .rd-correct-tag {
  margin-inline-start: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--comply-success);
  white-space: nowrap;
}
.comply-read-article .rd-reveal {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--comply-accent-soft);
  border: 1px solid #bfdbfe;
}
.comply-read-article .rd-task-tag,
.comply-read-article .rd-reveal-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--comply-accent);
  background: var(--comply-accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.comply-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}
.comply-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.comply-switch-ui {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--comply-border);
  position: relative;
  transition: background .15s;
  flex-shrink: 0;
}
.comply-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.comply-switch input:checked + .comply-switch-ui { background: var(--comply-accent); }
.comply-switch input:checked + .comply-switch-ui::after { transform: translateX(16px); }

.comply-campaign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.comply-campaign-tile { padding: 16px; }
.comply-campaign-tile-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 8px;
}
.comply-campaign-tile-head strong { display: block; margin-bottom: 4px; }
.comply-campaign-tile-meta { margin: 8px 0 0; font-size: 13px; color: var(--comply-muted); }
.comply-progress-line--lg { height: 8px; }

.comply-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.comply-group-tile {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
}
.comply-group-tile-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--comply-accent-soft);
  color: var(--comply-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.comply-group-count {
  font-size: 22px;
  font-weight: 800;
  color: var(--comply-accent);
}

.comply-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--comply-accent-soft);
  color: var(--comply-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.comply-role-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  text-transform: capitalize;
}
.comply-muted-cell { color: var(--comply-muted); font-size: 13px; }
.comply-table-wrap--pro { margin-top: 0; }
.comply-table--people td:first-child { width: 48px; }

.comply-details {
  margin-bottom: 16px;
  padding: 0;
  overflow: hidden;
}
.comply-details summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  list-style: none;
}
.comply-details summary::-webkit-details-marker { display: none; }
.comply-details summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform .15s;
}
.comply-details[open] summary::before { transform: rotate(90deg); }
.comply-details .comply-form { padding: 0 16px 16px; }

.comply-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 24px;
  color: var(--comply-muted);
}
.comply-empty-state p { margin: 0; }

.comply-reports-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.comply-field-inline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.comply-field-inline input {
  padding: 8px 10px;
  border: 1px solid var(--comply-border);
  border-radius: 8px;
  font: inherit;
}

.comply-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
  align-items: start;
}
.comply-settings-heading {
  margin: 0 0 8px;
  font-size: 17px;
}
.comply-settings-org .comply-form { margin-top: 16px; }
.comply-seat-bar--compact { margin: 12px 0 16px; }

.comply-camp-card--link { cursor: pointer; transition: border-color .15s; }
.comply-camp-card--link:hover { border-color: var(--comply-accent); }
.comply-dept-card--link { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.comply-dept-card--link:hover { border-color: var(--comply-accent); box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06); }
.comply-stats--hr, .comply-stats--mgr { margin-top: 16px; }

/* Drill-down explorer (all admin pages) */
.comply-drill-active { animation: complyDrillIn 0.2s ease; }
@keyframes complyDrillIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.comply-drill-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.comply-drill-head-text { min-width: 0; }
.comply-drill-title { margin: 0; font-size: 20px; font-weight: 800; }
.comply-drill-sub { margin: 4px 0 0; }
.comply-drill-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.comply-drill-section { margin-top: 14px; }
.comply-drill-section-title { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.comply-drill-hint { margin: 0 0 12px; font-size: 13px; }
.comply-drill-row { cursor: pointer; transition: background 0.12s; }
.comply-drill-row:hover { background: var(--comply-bg); }
.comply-drill-row-go { color: var(--comply-muted); font-size: 18px; text-align: end; width: 28px; }
.comply-drill-tile {
  cursor: pointer;
  text-align: start;
  font: inherit;
  color: inherit;
  width: 100%;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.comply-drill-tile:hover {
  border-color: var(--comply-accent);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}
.comply-drill-tile-go {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--comply-muted);
  font-size: 20px;
}
.comply-group-tile.comply-drill-tile { grid-template-columns: auto 1fr auto auto; padding-right: 36px; }
.comply-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.comply-people-grid--compact { margin-bottom: 20px; }
.comply-person-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  text-align: start;
  font: inherit;
  color: inherit;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.comply-person-card:hover {
  border-color: var(--comply-accent);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.comply-person-card-body { min-width: 0; }
.comply-person-card-body strong { display: block; margin-bottom: 2px; }
.comply-person-card-body p { margin: 0 0 6px; font-size: 13px; }
.comply-person-card-go { color: var(--comply-muted); font-size: 20px; }

.comply-hidden { display: none !important; }
.comply-form-hint { margin: 8px 0 0; font-size: 13px; }
.comply-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.comply-camp-meta, .comply-camp-note { margin: 0 0 12px; font-size: 13px; }
.comply-camp-due-input {
  padding: 6px 10px;
  border: 1px solid var(--comply-border);
  border-radius: 8px;
  font: inherit;
}
.comply-drill-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.comply-filter-chips--sm { margin: 0; }

/* ── Employee app (My Training) ── */
.comply-main--app { max-width: 1040px; padding: 20px 20px 48px; }
body.comply-app { --comply-ease: cubic-bezier(.22, 1, .36, 1); --comply-dur: 220ms; }
body.comply-app[data-comply-screen="course"] .comply-nav button[data-tab="training"] { background: var(--comply-accent-soft); color: var(--comply-accent); }
.comply-enter {
  animation: complyFadeUp var(--comply-dur) var(--comply-ease) both;
}
.comply-enter--2 { animation-delay: 60ms; }
.comply-enter--3 { animation-delay: 100ms; }
.comply-enter--4 { animation-delay: 140ms; }
@keyframes complyFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
/* ── Employee app — loading ── */
.comply-emp-loading { text-align: center; padding: 80px 24px; color: var(--comply-muted); }
.comply-emp-spinner {
  width: 40px; height: 40px; margin: 0 auto 16px;
  border: 3px solid var(--comply-border);
  border-top-color: var(--comply-accent);
  border-radius: 50%;
  animation: complySpin .7s linear infinite;
}
@keyframes complySpin { to { transform: rotate(360deg); } }

/* ── Hero ── */
.comply-emp-hero {
  border-radius: 16px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  color: #fff;
  padding: 32px 28px;
  margin-bottom: 24px;
  overflow: hidden;
  position: relative;
}
.comply-emp-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 50%, rgba(255,255,255,.12) 0, transparent 60%);
  pointer-events: none;
}
.comply-emp-hero__content {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  position: relative; z-index: 1;
}
.comply-emp-hero__left { flex: 1; min-width: 0; }
.comply-emp-eyebrow {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: rgba(255,255,255,.65); margin: 0 0 8px;
}
.comply-emp-hero__title {
  margin: 0 0 6px; font-size: 26px; line-height: 1.2; font-weight: 800;
  color: #fff;
}
.comply-emp-hero__sub {
  margin: 0 0 18px; font-size: 14px; color: rgba(255,255,255,.75);
}
.comply-emp-stat-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.comply-emp-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(255,255,255,.18); color: #fff;
  font-size: 13px; font-weight: 600; backdrop-filter: blur(4px);
}
.comply-emp-pill strong { font-size: 15px; }
.comply-emp-pill--danger {
  background: rgba(220,38,38,.35); color: #fecaca;
}
.comply-emp-pill--done {
  background: rgba(5,150,105,.3); color: #a7f3d0;
}

/* ── Compliance ring ── */
.comply-emp-hero__ring { flex: 0 0 auto; position: relative; width: 132px; height: 132px; }
.comply-emp-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.comply-emp-ring-track { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 9; }
.comply-emp-ring-fill {
  fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round;
  transition: stroke-dashoffset 800ms cubic-bezier(.4,0,.2,1);
  filter: drop-shadow(0 0 6px rgba(255,255,255,.5));
}
.comply-emp-ring-fill--done { stroke: #6ee7b7; }
.comply-emp-ring-val {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-align: center;
}
.comply-emp-ring-pct { font-size: 30px; font-weight: 900; line-height: 1; }
.comply-emp-ring-unit { font-size: 13px; font-weight: 700; opacity: .8; margin-top: 1px; }
.comply-emp-ring-label {
  font-size: 10px; font-weight: 600; opacity: .65; text-transform: uppercase;
  letter-spacing: .06em; margin-top: 2px;
}

/* ── Next up card ── */
.comply-emp-next {
  border-radius: 14px;
  border: 2px solid #bfdbfe;
  background: linear-gradient(160deg, #eff6ff 0%, #f8faff 100%);
  padding: 22px 24px;
  margin-bottom: 28px;
  box-shadow: 0 2px 12px rgba(37,99,235,.08);
  transition: box-shadow var(--comply-dur), transform var(--comply-dur);
}
.comply-emp-next:hover { box-shadow: 0 8px 28px rgba(37,99,235,.14); transform: translateY(-1px); }
.comply-emp-next--overdue {
  border-color: #fca5a5;
  background: linear-gradient(160deg, #fff5f5 0%, #fff 100%);
}
.comply-emp-next__top {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.comply-emp-next__badge {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: var(--comply-accent);
}
.comply-emp-next--overdue .comply-emp-next__badge { color: var(--comply-danger); }
.comply-emp-next__icon { font-size: 28px; line-height: 1; }
.comply-emp-next__title { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.comply-emp-next__campaign { margin: 0 0 10px; font-size: 13px; color: var(--comply-muted); }
.comply-emp-next-btn { margin-top: 18px; font-size: 15px; padding: 11px 22px; }

/* ── Due date inline labels ── */
.comply-emp-due {
  display: inline-block; font-size: 12px; font-weight: 500;
  color: var(--comply-muted); margin: 4px 0 6px;
}
.comply-emp-due--overdue { color: var(--comply-danger); font-weight: 700; }
.comply-emp-due--today { color: var(--comply-danger); font-weight: 700; }
.comply-emp-due--soon { color: var(--comply-warn); font-weight: 600; }

/* ── Progress bars ── */
.comply-emp-progress { margin-top: 10px; }
.comply-emp-progress-mini { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.comply-emp-bar {
  flex: 1; height: 5px; border-radius: 999px;
  background: var(--comply-border); overflow: hidden;
}
.comply-emp-bar--lg { height: 8px; }
.comply-emp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--comply-accent) 0%, #60a5fa 100%);
  border-radius: 999px;
  transition: width 600ms cubic-bezier(.4,0,.2,1);
}
.comply-emp-bar-fill--done {
  background: linear-gradient(90deg, var(--comply-success) 0%, #34d399 100%);
}
.comply-emp-bar-label {
  font-size: 11px; color: var(--comply-muted); font-weight: 500;
  flex: 0 0 auto; white-space: nowrap;
}

/* ── Section headings ── */
.comply-emp-section { margin-bottom: 32px; }
.comply-emp-section-title {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; font-size: 15px; font-weight: 800;
  color: var(--comply-text); letter-spacing: -.01em;
}
.comply-emp-section-icon { font-size: 16px; line-height: 1; }
.comply-emp-count {
  font-size: 11px; font-weight: 700; color: var(--comply-muted);
  background: var(--comply-bg); border: 1px solid var(--comply-border);
  border-radius: 999px; padding: 2px 9px; margin-left: 2px;
}
.comply-emp-section--warn .comply-emp-section-title { color: var(--comply-danger); }
.comply-emp-section--done .comply-emp-section-title { color: var(--comply-success); opacity: .8; }

/* ── Assignment cards ── */
.comply-emp-grid { display: grid; gap: 10px; }
.comply-emp-card {
  display: flex; flex-direction: column;
  background: var(--comply-surface);
  border: 1px solid var(--comply-border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
  cursor: pointer; overflow: hidden;
  transition: transform 150ms var(--comply-ease), box-shadow 150ms, border-color 150ms;
  position: relative;
}
.comply-emp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(15,23,42,.1);
  border-color: #93c5fd;
}
.comply-emp-card:focus-visible { outline: 2px solid var(--comply-accent); outline-offset: 2px; }
/* Status accent strip */
.comply-emp-card-accent {
  height: 3px; width: 100%;
  background: var(--comply-border);
}
.comply-emp-card--open .comply-emp-card-accent,
.comply-emp-card--in-progress .comply-emp-card-accent { background: var(--comply-accent); }
.comply-emp-card--overdue .comply-emp-card-accent { background: var(--comply-danger); }
.comply-emp-card--due-soon .comply-emp-card-accent { background: var(--comply-warn); }
.comply-emp-card--done .comply-emp-card-accent { background: var(--comply-success); }

.comply-emp-card__body {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 18px 12px;
}
.comply-emp-card-icon {
  flex: 0 0 40px; height: 40px;
  background: var(--comply-bg); border-radius: 10px;
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  border: 1px solid var(--comply-border);
}
.comply-emp-card__info { flex: 1; min-width: 0; }
.comply-emp-card__tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px;
}
.comply-emp-card__title {
  margin: 0 0 4px; font-size: 16px; font-weight: 700; line-height: 1.3;
  color: var(--comply-text);
}
.comply-emp-card--done .comply-emp-card__title { color: var(--comply-muted); }
.comply-emp-card__cta {
  padding: 10px 18px 14px 72px;
  display: flex; align-items: center;
}
.comply-emp-card-btn {
  font-size: 13px !important; padding: 6px 14px !important;
}
.comply-emp-card--overdue .comply-emp-card-btn { background: var(--comply-danger) !important; }

/* ── Campaign groups ── */
.comply-emp-campaign { margin-bottom: 20px; }
.comply-emp-campaign-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; color: var(--comply-muted); }

/* ── Empty state ── */
.comply-emp-empty { text-align: center; padding: 80px 24px; }
.comply-emp-empty-icon {
  width: 80px; height: 80px; margin: 0 auto 20px; border-radius: 50%;
  background: #d1fae5; color: #059669; font-size: 38px; line-height: 80px;
}
.comply-emp-empty h2 { margin: 0 0 8px; font-size: 22px; }

/* ── Record view ── */
.comply-emp-record-hero h1 { margin: 0 0 6px; font-size: 22px; }
.comply-emp-record-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comply-emp-back { margin-bottom: 16px; }

/* ── Phase rail ── */
.comply-emp-phases {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 16px; font-size: 12px; font-weight: 600;
}
.comply-emp-phase {
  padding: 5px 12px; border-radius: 999px;
  background: var(--comply-bg); color: var(--comply-muted);
  border: 1px solid var(--comply-border);
}
.comply-emp-phase--current { background: var(--comply-accent-soft); color: var(--comply-accent); border-color: #bfdbfe; }
.comply-emp-phase--done { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.comply-emp-phase-sep { width: 16px; height: 1px; background: var(--comply-border); display: inline-block; }

/* ── Course / lecture reader ── */
.comply-emp-course { max-width: 820px; }

.comply-lecture-map {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.comply-lecture-map::-webkit-scrollbar { display: none; }

.comply-lecture-map-item {
  flex: 0 0 auto; min-width: 110px; max-width: 150px;
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--comply-border);
  background: var(--comply-surface); cursor: pointer; scroll-snap-align: start;
  transition: border-color 150ms, background 150ms, transform 150ms;
}
.comply-lecture-map-item:hover { transform: translateY(-1px); border-color: #93c5fd; }
.comply-lecture-map-item--current {
  border-color: var(--comply-accent); background: var(--comply-accent-soft);
  box-shadow: 0 2px 8px rgba(37,99,235,.18);
}
.comply-lecture-map-item--done {
  border-color: #6ee7b7; background: #ecfdf5;
}
.comply-lecture-map-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--comply-bg); border: 1px solid var(--comply-border);
  font-size: 11px; font-weight: 800; color: var(--comply-muted);
  display: grid; place-items: center; flex-shrink: 0;
}
.comply-lecture-map-item--current .comply-lecture-map-num {
  background: var(--comply-accent); color: #fff; border-color: transparent;
}
.comply-lecture-map-item--done .comply-lecture-map-num {
  background: var(--comply-success); color: #fff; border-color: transparent;
  font-size: 13px; /* checkmark */
}
.comply-lecture-map-label {
  font-size: 11px; font-weight: 600; line-height: 1.3; text-align: start; color: var(--comply-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.comply-lecture-map-item--done .comply-lecture-map-label { color: var(--comply-muted); }

.comply-lecture-panel { transition: opacity 180ms var(--comply-ease), transform 180ms var(--comply-ease); }
.comply-lecture-panel--out { opacity: 0; transform: translateX(10px); }

.comply-lecture-card { border-radius: 14px; border: 1px solid #e0eaff; }
.comply-lecture-card-head {
  margin-bottom: 16px; padding-bottom: 14px;
  border-bottom: 1px solid var(--comply-border);
}
.comply-lecture-index {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--comply-accent); margin-bottom: 6px;
}
.comply-lecture-card-head h2 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; }

.comply-dwell-meter { margin-top: 20px; }
.comply-dwell-meter-track {
  height: 5px; border-radius: 999px; background: var(--comply-border); overflow: hidden;
}
.comply-dwell-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--comply-accent) 0%, #60a5fa 100%);
  border-radius: 999px; transition: width 1s linear;
}
.comply-lecture-nav { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--comply-border); }

/* ── Quiz prompt ── */
.comply-emp-quiz { text-align: center; padding: 36px 24px; }
.comply-emp-quiz-icon {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--comply-accent-soft); color: var(--comply-accent);
  font-size: 30px; font-weight: 800; line-height: 64px;
}
.comply-emp-quiz h2 { margin: 0 0 10px; }

/* ── Attest panel ── */
.comply-emp-attest { text-align: start; padding: 28px; margin-top: 16px; border-radius: 14px; }
.comply-emp-attest-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--comply-accent-soft); color: var(--comply-accent);
  display: grid; place-items: center; font-size: 24px; margin-bottom: 14px;
}
.comply-emp-attest h2 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.comply-emp-attest-statement {
  font-size: 15px; line-height: 1.6; color: var(--comply-text); margin: 0 0 18px;
  padding: 14px 16px; background: var(--comply-bg); border-radius: 10px;
  border: 1px solid var(--comply-border);
}
.comply-emp-attest-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 18px;
}
.comply-emp-attest-check input { margin-top: 3px; accent-color: var(--comply-accent); }

/* ── Completion celebration ── */
.comply-complete--animated .comply-complete-icon {
  animation: complyPop 500ms var(--comply-ease) both;
}
@keyframes complyPop {
  0% { transform: scale(.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.comply-complete-confetti {
  position: absolute; inset: 0; pointer-events: none; opacity: .4;
  background: radial-gradient(circle at 20% 30%, #dbeafe 0, transparent 40%),
    radial-gradient(circle at 80% 20%, #d1fae5 0, transparent 35%),
    radial-gradient(circle at 50% 80%, #fef3c7 0, transparent 40%);
}
.comply-complete--animated { position: relative; }

/* ── App header chrome ── */
.comply-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  padding: 8px 12px; background: var(--comply-accent); color: #fff;
  border-radius: 0 0 8px 0; font-weight: 600; text-decoration: none;
}
.comply-skip-link:focus { left: 0; }
.comply-header--app { position: sticky; top: 0; z-index: 40; flex-wrap: wrap; gap: 10px; }
.comply-header-member { display: block; font-size: 12px; color: var(--comply-muted); margin-top: 2px; }
.comply-nav button { display: inline-flex; align-items: center; gap: 6px; }
.comply-nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--comply-accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
}
.comply-nav-badge--warn { background: var(--comply-danger); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .comply-header { padding: 12px 16px; }
  .comply-nav { order: 3; width: 100%; }
  .comply-training-card { flex-direction: column; }
  .comply-training-card__cta { width: 100%; }
  .comply-admin { grid-template-columns: 1fr; }
  .comply-hr-grid { grid-template-columns: 1fr; }
  .comply-mgr-ring { position: static; margin-top: 12px; }
  .comply-mgr-hero { padding-bottom: 20px; }
  .comply-sidebar-foot { margin-top: 0; }
  .comply-settings-grid { grid-template-columns: 1fr; }
  .comply-lib-shelf-books { gap: 10px; }
  .comply-lib-book { width: calc(50% - 6px); min-width: 130px; }
  .comply-drill-head { grid-template-columns: 1fr; }
  .comply-people-grid { grid-template-columns: 1fr; }
  .comply-emp-hero__content { flex-direction: column; }
  .comply-emp-hero__ring { width: 110px; height: 110px; }
  .comply-emp-hero__title { font-size: 22px; }
  .comply-emp-card__cta { padding-left: 18px; }
  .comply-read-layout { grid-template-columns: 1fr; }
  .comply-read-sidebar { max-height: 200px; border-right: none; border-bottom: 1px solid var(--comply-border); }
  .comply-read-sidebar-list { display: flex; flex-direction: row; overflow-x: auto; padding: 6px; gap: 4px; }
  .comply-read-sidebar-item { min-width: 120px; border-left: none; border-bottom: 3px solid transparent; flex-direction: column; align-items: center; text-align: center; padding: 8px; }
  .comply-read-sidebar-item--active { border-bottom-color: var(--comply-accent); border-left-color: transparent; }
  .comply-read-content-head { padding: 16px 18px; }
  .comply-read-content-title { font-size: 20px; }
  .comply-read-article { padding: 16px 18px; }
}

/* ── EZ Exam system (host overlay + iframe runner) ── */
.exam-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(4, 4, 8, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
}

.exam-overlay[hidden] {
  display: none !important;
}

body.exam-mode-open {
  overflow: hidden;
}

.exam-overlay-inner {
  width: min(760px, 100%);
  height: min(82dvh, 760px);
  margin: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg-2, #12121a);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.exam-overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--chrome-border, rgba(255, 255, 255, 0.08));
}

.exam-overlay-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-overlay-close {
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.exam-overlay-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.exam-overlay-stage.hidden {
  display: none;
}

.exam-iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  background: #0a0a0f;
  display: block;
}

.exam-results {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.exam-results.hidden {
  display: none;
}

.exam-score-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  animation: examScoreIn 0.5s ease;
}

.exam-score-card.pass {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.exam-score-card.fail {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

@keyframes examScoreIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.exam-score-ring {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: conic-gradient(#a78bfa calc(var(--pct, 0) * 1%), rgba(255, 255, 255, 0.08) 0);
  display: grid;
  place-items: center;
}

.exam-score-ring::before {
  content: "";
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: var(--bg-2, #12121a);
}

.exam-score-num {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 800;
}

.exam-score-card {
  position: relative;
}

.exam-result-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.exam-result-row {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  gap: 0.5rem;
  align-items: start;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.04);
}

.exam-result-pts {
  font-weight: 700;
  font-size: 0.72rem;
  color: #c4b5fd;
  white-space: nowrap;
}

.exam-points,
.exam-coins {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
}

.exam-coins {
  color: #fbbf24;
  font-weight: 700;
}

.exam-result-row.ok { border-inline-start: 3px solid #34d399; }
.exam-result-row.bad { border-inline-start: 3px solid #f87171; }

/* ── iframe runner ── */
.exm-body {
  margin: 0;
  min-height: 100dvh;
  background: #0a0a0f;
  color: #e8e8ed;
  font-family: "Heebo", system-ui, sans-serif;
  overflow: hidden;
}

.exm-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
}

.exm-head {
  padding: 0.75rem 1rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.exm-progress-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.exm-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  transition: width 0.25s ease;
}

.exm-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.exm-q-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9493a8;
}

.exm-timer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 0.85rem;
}

.exm-timer-ring {
  width: 1.75rem;
  height: 1.75rem;
  transform: rotate(-90deg);
}

.exm-timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2.5;
}

.exm-timer-fill {
  fill: none;
  stroke: #a78bfa;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.3s ease;
}

.exm-anticheat {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  color: #9493a8;
}

.exm-main {
  flex: 1 1 auto;
  min-height: 0;
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.exm-card {
  animation: exmCardIn 0.35s ease;
}

@keyframes exmCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.exm-scenario {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #c4b5fd;
  line-height: 1.45;
}

.exm-q-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.exm-diff {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.exm-diff--easy { color: #34d399; background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.35); }
.exm-diff--medium { color: #fbbf24; background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.35); }
.exm-diff--hard { color: #f87171; background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.35); }

.exm-pts {
  font-size: 0.72rem;
  font-weight: 700;
  color: #9493a8;
}

.exm-concept-figure {
  margin: 0 0 0.85rem;
  width: 100%;
}

.exm-concept-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(167, 139, 250, 0.25);
  background: rgba(255, 255, 255, 0.03);
}

.exm-concept-caption {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  color: #9493a8;
  line-height: 1.4;
}

.exm-q {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  line-height: 1.4;
}

.exm-hint {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  color: #9493a8;
}

.exm-choices {
  display: grid;
  gap: 0.45rem;
}

.exm-choice {
  text-align: start;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.exm-choice:hover {
  border-color: rgba(124, 58, 237, 0.45);
}

.exm-choice.is-selected {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.2);
}

.exm-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  cursor: pointer;
}

.exm-check.is-selected {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.15);
}

.exm-written {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  font: inherit;
  resize: vertical;
}

.exm-order {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.exm-order-item {
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  cursor: grab;
}

.exm-order-item.is-dragging {
  opacity: 0.5;
}

.exm-foot {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  background: #0a0a0f;
}

.exm-btn {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.exm-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.exm-btn--primary {
  background: #7c3aed;
  color: #fff;
}

.exm-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.exm-submitting {
  text-align: center;
  padding: 2rem;
  color: #a78bfa;
}

.learn-exam-cta {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.learn-exam-cta .btn {
  width: 100%;
}

@media (min-width: 1100px) {
  .exam-overlay-inner {
    width: min(820px, calc(100vw - 3rem));
  }
}

@media (max-height: 680px) and (min-width: 641px) {
  .exam-overlay {
    padding-block: max(0.5rem, env(safe-area-inset-top)) max(0.5rem, env(safe-area-inset-bottom));
  }

  .exam-overlay-inner {
    height: min(92dvh, 640px);
  }

  .exm-head {
    padding: 0.55rem 0.85rem 0.45rem;
  }

  .exm-anticheat {
    display: none;
  }

  .exm-main {
    padding: 0.75rem 0.85rem;
  }
}

@media (max-width: 640px) {
  .exam-overlay {
    align-items: stretch;
    padding: 0;
  }

  .exam-overlay-inner {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    border-inline: 0;
  }

  .exam-overlay-head {
    min-height: calc(3.25rem + env(safe-area-inset-top, 0px));
    padding:
      calc(0.65rem + env(safe-area-inset-top, 0px))
      max(0.75rem, env(safe-area-inset-right, 0px))
      0.65rem
      max(0.75rem, env(safe-area-inset-left, 0px));
  }

  .exam-overlay-title {
    font-size: 0.92rem;
  }

  .exam-overlay-close {
    width: 2.25rem;
    height: 2.25rem;
  }

  .exm-head {
    padding: 0.65rem 0.85rem 0.5rem;
  }

  .exm-progress-wrap {
    height: 5px;
  }

  .exm-anticheat {
    margin-top: 0.25rem;
    font-size: 0.62rem;
  }

  .exm-main {
    padding: 0.85rem;
  }

  .exm-q {
    font-size: clamp(1rem, 4vw, 1.15rem);
  }

  .exm-choice,
  .exm-check,
  .exm-order-item {
    min-height: 44px;
    padding: 0.75rem 0.85rem;
  }

  .exm-foot {
    padding:
      0.65rem
      max(0.85rem, env(safe-area-inset-right, 0px))
      calc(0.65rem + env(safe-area-inset-bottom, 0px))
      max(0.85rem, env(safe-area-inset-left, 0px));
  }

  .exm-btn {
    flex: 1;
    min-height: 44px;
  }
}
