/* ================================================================
   NOIR PLATFORM v3 — DESIGN SYSTEM
   Dark-glass component layer matching the React Native app.
   Scoped to .noir-v3. Both dark (default) and light themes.

   Token naming: --nv3-* to avoid collision with legacy --noir-*
   Light mode: add .nv3-light class to the .noir-v3 root element.
   ================================================================ */

/* ──────────────────────────────────────────
   0. GOOGLE FONTS IMPORT
   (fallback — main enqueue loads Inter + Roboto Slab)
   ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@500;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* ──────────────────────────────────────────
   1. DESIGN TOKENS — DARK MODE (default)
   ────────────────────────────────────────── */
.noir-v3 {
  /* ── Canvas ── */
  --nv3-ink:          #1c1712;     /* page / card background */
  --nv3-page-bg:      #0d0a07;     /* overall page canvas (darker) */
  --nv3-paper:        #f4f0e8;     /* primary text + light fills */
  --nv3-paper2:       #ede8df;     /* secondary text */
  --nv3-muted:        #9a8f82;     /* tertiary text, hints */
  --nv3-line:         #3a3028;     /* dividers */

  /* ── Glass ── */
  --nv3-glass-tint:   rgba(42, 34, 25, 0.55);
  --nv3-glass-border: rgba(244, 240, 232, 0.10);
  --nv3-pill-bg:      rgba(244, 240, 232, 0.08);
  --nv3-track:        rgba(244, 240, 232, 0.08);

  /* ── Sidebar (desktop) ── */
  --nv3-sidebar-bg:   rgba(12, 9, 6, 0.55);
  --nv3-tabbar-bg:    rgba(12, 9, 6, 0.72);
  --nv3-tabbar-border: rgba(244, 240, 232, 0.11);

  /* ── Brand + accents (same in both themes) ── */
  --nv3-orange:    #cb360f;
  --nv3-orange2:   #e04010;
  --nv3-plum:      #7c3d6e;
  --nv3-sky:       #2e6e8e;
  --nv3-moss:      #3d6e4a;
  --nv3-lime:      #6ea832;
  --nv3-butter:    #c4a832;
  --nv3-rose:      #c45c6a;
  --nv3-lilac:     #7868c4;

  /* ── Typography ── */
  --nv3-font-serif: 'Roboto Slab', ui-serif, Georgia, serif;
  --nv3-font-sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* ── Radius ── */
  --nv3-r-sm:   8px;
  --nv3-r-md:   12px;
  --nv3-r-lg:   18px;
  --nv3-r-xl:   20px;
  --nv3-r-pill: 999px;

  /* ── Spacing (4px base) ── */
  --nv3-s1:  4px;
  --nv3-s2:  8px;
  --nv3-s3:  12px;
  --nv3-s4:  16px;
  --nv3-s5:  20px;
  --nv3-s6:  24px;
  --nv3-s7:  32px;
  --nv3-s8:  48px;

  /* ── Motion ── */
  --nv3-ease:     cubic-bezier(.4, 0, .2, 1);
  --nv3-dur-fast: .15s;
  --nv3-dur-med:  .25s;
}

/* ──────────────────────────────────────────
   2. DESIGN TOKENS — LIGHT MODE
   Add .nv3-light to the .noir-v3 root element.
   ────────────────────────────────────────── */
.noir-v3.nv3-light {
  --nv3-ink:          #e8e3da;
  --nv3-page-bg:      #cfc8bd;
  --nv3-paper:        #1a140e;
  --nv3-paper2:       #33291f;
  --nv3-muted:        #7a7468;
  --nv3-line:         rgba(0, 0, 0, 0.10);

  --nv3-glass-tint:   rgba(255, 255, 255, 0.62);
  --nv3-glass-border: rgba(15, 15, 15, 0.10);
  --nv3-pill-bg:      rgba(0, 0, 0, 0.05);
  --nv3-track:        rgba(0, 0, 0, 0.08);

  --nv3-sidebar-bg:   rgba(255, 255, 255, 0.55);
  --nv3-tabbar-bg:    rgba(244, 240, 232, 0.72);
  --nv3-tabbar-border: rgba(0, 0, 0, 0.10);
}

/* ──────────────────────────────────────────
   3. ISOLATION RESET
   ────────────────────────────────────────── */
.noir-v3,
.noir-v3 * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.noir-v3 {
  background: var(--nv3-page-bg) !important;
  color: var(--nv3-paper) !important;
  font-family: var(--nv3-font-sans) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
.noir-v3 a          { color: inherit; text-decoration: none; }
/* Kill the most common theme button overrides (width/appearance/shadow) —
   do NOT use !important on display/flex so component classes can override freely */
.noir-v3 button {
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none !important;
  appearance: none !important;
  width: auto !important;
  max-width: none !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  box-sizing: border-box;
}
.noir-v3 ul, .noir-v3 ol { list-style: none; }
.noir-v3 img        { max-width: 100%; display: block; }
.noir-v3 input, .noir-v3 select, .noir-v3 textarea { font: inherit; }

/* Kill theme overrides on structural tags */
.noir-v3 header, .noir-v3 main, .noir-v3 section,
.noir-v3 article, .noir-v3 aside, .noir-v3 footer, .noir-v3 nav {
  background: transparent !important;
  color: inherit !important;
  float: none !important;
  width: auto !important;
  max-width: none !important;
}

/* Focus rings */
.noir-v3 :focus-visible {
  outline: 2px solid var(--nv3-orange);
  outline-offset: 2px;
  border-radius: var(--nv3-r-sm);
}
@media (prefers-reduced-motion: reduce) {
  .noir-v3 *, .noir-v3 *::before, .noir-v3 *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ──────────────────────────────────────────
   4. PAGE BACKGROUND + BLOBS
   ────────────────────────────────────────── */
.nv3-page-wrap {
  position: relative;
  min-height: 100vh;
  background: var(--nv3-page-bg);
  overflow: hidden;
}
.nv3-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.nv3-blob-a {
  width: 380px;
  height: 380px;
  background: var(--nv3-orange);
  top: -80px;
  right: -60px;
  opacity: .16;
}
.nv3-blob-b {
  width: 320px;
  height: 320px;
  background: var(--nv3-plum);
  bottom: 100px;
  left: -80px;
  opacity: .13;
}
.nv3-light .nv3-blob { opacity: .08 !important; }

/* ──────────────────────────────────────────
   5. BRAND MARK
   ────────────────────────────────────────── */
.nv3-mark {
  display: inline-block;
  width: 32px;
  height: 19px;
  border: 3px solid var(--nv3-orange);
  border-radius: 999px;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────
   6. GLASS CARD
   ────────────────────────────────────────── */
.nv3-glass {
  background: var(--nv3-glass-tint);
  border: 1px solid var(--nv3-glass-border);
  border-radius: var(--nv3-r-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nv3-glass.nv3-accent {
  border-left: 3px solid var(--nv3-orange);
}
/* Colored accent variants */
.nv3-glass.nv3-accent-lime { border-left: 3px solid var(--nv3-lime); }
.nv3-glass.nv3-accent-sky  { border-left: 3px solid var(--nv3-sky); }
.nv3-glass.nv3-accent-plum { border-left: 3px solid var(--nv3-plum); }

/* ──────────────────────────────────────────
   7. EYEBROW LABEL
   ────────────────────────────────────────── */
.nv3-eyebrow {
  color: var(--nv3-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.nv3-eyebrow-sm {
  color: var(--nv3-muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .8px;
  text-transform: uppercase;
}

/* ──────────────────────────────────────────
   8. PILLS / STATUS CHIPS
   ────────────────────────────────────────── */
.nv3-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.nv3-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  flex-shrink: 0;
}
/* Pill colour variants */
.nv3-pill-orange  { background: rgba(203, 54, 15, .16);  color: var(--nv3-orange); }
.nv3-pill-lime    { background: rgba(110, 168, 50, .18); color: var(--nv3-lime); }
.nv3-pill-butter  { background: rgba(196, 168, 50, .16); color: var(--nv3-butter); }
.nv3-pill-sky     { background: rgba(46, 110, 142, .20); color: var(--nv3-sky); }
.nv3-pill-plum    { background: rgba(124, 61, 110, .20); color: var(--nv3-plum); }
.nv3-pill-rose    { background: rgba(196, 92, 106, .20); color: var(--nv3-rose); }
.nv3-pill-lilac   { background: rgba(120, 104, 196, .20); color: var(--nv3-lilac); }
.nv3-pill-muted   { background: var(--nv3-pill-bg);      color: var(--nv3-muted); }
/* Status pill mapping (locked values) */
.nv3-pill-active,
.nv3-pill-approved,
.nv3-pill-completed,
.nv3-pill-hired    { background: rgba(110, 168, 50, .18); color: var(--nv3-lime); }
.nv3-pill-pending,
.nv3-pill-offered  { background: rgba(196, 168, 50, .16); color: var(--nv3-butter); }
.nv3-pill-in_progress { background: rgba(110, 168, 50, .18); color: var(--nv3-lime); }
.nv3-pill-rejected,
.nv3-pill-suspended { background: rgba(196, 92, 106, .20); color: var(--nv3-rose); }

/* ──────────────────────────────────────────
   9. PROGRESS TRACK + FILL
   ────────────────────────────────────────── */
.nv3-track {
  height: 7px;
  border-radius: 999px;
  background: var(--nv3-track);
  overflow: hidden;
}
.nv3-track-sm { height: 5px; }
.nv3-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nv3-orange), var(--nv3-orange2));
  transition: width .4s var(--nv3-ease);
}
.nv3-prog-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--nv3-orange);
}

/* ──────────────────────────────────────────
   10. ICON TILES
   ────────────────────────────────────────── */
.nv3-ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nv3-pill-bg);
  border: 1px solid var(--nv3-glass-border);
  font-size: 20px;
  flex-shrink: 0;
  color: var(--nv3-paper);
}
.nv3-ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.nv3-ico-sm {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 17px;
}
.nv3-ico-sm svg { width: 17px; height: 17px; }
/* Icon colours */
.nv3-ico-orange, .nv3-ico-sm.nv3-ico-orange { color: var(--nv3-orange); }
.nv3-ico-lime,   .nv3-ico-sm.nv3-ico-lime   { color: var(--nv3-lime); }
.nv3-ico-sky,    .nv3-ico-sm.nv3-ico-sky    { color: var(--nv3-sky); }
.nv3-ico-plum,   .nv3-ico-sm.nv3-ico-plum   { color: var(--nv3-plum); }
.nv3-ico-butter, .nv3-ico-sm.nv3-ico-butter { color: var(--nv3-butter); }
.nv3-ico-lilac,  .nv3-ico-sm.nv3-ico-lilac  { color: var(--nv3-lilac); }
.nv3-ico-rose,   .nv3-ico-sm.nv3-ico-rose   { color: var(--nv3-rose); }

/* ──────────────────────────────────────────
   11. BUTTONS
   ────────────────────────────────────────── */
.nv3-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px;
  border-radius: var(--nv3-r-md) !important;
  padding: 12px 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: var(--nv3-font-sans) !important;
  cursor: pointer !important;
  transition: opacity var(--nv3-dur-fast) var(--nv3-ease),
              transform var(--nv3-dur-fast) var(--nv3-ease);
  border: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
.nv3-btn-full { width: 100% !important; display: flex !important; }
.nv3-btn:active { transform: scale(.97); opacity: .88; }

/* Primary — solid orange */
.nv3-btn-primary {
  background: var(--nv3-orange);
  color: #fff;
}
.nv3-btn-primary:hover { background: var(--nv3-orange2); color: #fff; }

/* Danger — rose/red */
.nv3-btn-danger {
  background: rgba(196, 92, 106, .20);
  border: 1px solid rgba(196, 92, 106, .35);
  color: var(--nv3-rose);
}
.nv3-btn-danger:hover { background: rgba(196, 92, 106, .30); }

/* Ghost — neutral */
.nv3-btn-ghost {
  background: var(--nv3-pill-bg);
  border: 1px solid var(--nv3-line);
  color: var(--nv3-paper2);
}
.nv3-btn-ghost:hover { border-color: var(--nv3-glass-border); }

/* Orange ghost */
.nv3-btn-orange-ghost {
  background: rgba(203, 54, 15, .10);
  border: 1px solid rgba(203, 54, 15, .30);
  color: var(--nv3-orange);
}

/* Pill button variant */
.nv3-btn-pill { border-radius: 999px; padding: 7px 16px; font-size: 13px; }

/* Small */
.nv3-btn-sm { padding: 8px 14px; font-size: 12px; }

/* Full width */
.nv3-btn-full { width: 100%; }

/* Disabled */
.nv3-btn:disabled, .nv3-btn.is-disabled {
  opacity: .45;
  pointer-events: none;
}

/* ──────────────────────────────────────────
   12. LIST ROW
   ────────────────────────────────────────── */
.nv3-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
}
.nv3-row + .nv3-row {
  border-top: 1px solid var(--nv3-line);
}
.nv3-row-title {
  color: var(--nv3-paper);
  font-size: 14px;
  font-weight: 600;
}
.nv3-row-meta {
  color: var(--nv3-muted);
  font-size: 12px;
  margin-top: 2px;
}

/* ──────────────────────────────────────────
   13. STAT CARD
   ────────────────────────────────────────── */
.nv3-stat {
  flex: 1;
  padding: 13px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
}
.nv3-stat-num {
  color: var(--nv3-paper);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1;
}
.nv3-stat-cap {
  color: var(--nv3-muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.nv3-stat-num-orange { color: var(--nv3-orange); }
.nv3-stat-num-lime   { color: var(--nv3-lime); }
.nv3-stat-num-butter { color: var(--nv3-butter); }

/* ──────────────────────────────────────────
   14. AVATAR
   ────────────────────────────────────────── */
.nv3-avatar {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nv3-orange), var(--nv3-plum));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}
.nv3-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
}
.nv3-avatar-sm  { width: 36px; height: 36px; font-size: 12px; }
.nv3-avatar-md  { width: 40px; height: 40px; font-size: 13px; }
.nv3-avatar-lg  { width: 84px; height: 84px; font-size: 30px; }
/* Camera badge (edit profile) */
.nv3-avatar-cam {
  position: absolute;
  bottom: 0; right: 0;
  width: 26px; height: 26px;
  border-radius: 13px;
  background: var(--nv3-orange);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  border: 2px solid var(--nv3-ink);
  color: #fff;
}
.nv3-avatar-cam svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 2.5; }

/* ──────────────────────────────────────────
   15. SEGMENTED CONTROL
   ────────────────────────────────────────── */
.nv3-seg {
  display: flex;
  gap: 6px;
  background: var(--nv3-pill-bg);
  border: 1px solid var(--nv3-glass-border);
  border-radius: var(--nv3-r-md);
  padding: 4px;
}
.nv3-seg-tab {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 9px;
  color: var(--nv3-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--nv3-dur-fast), color var(--nv3-dur-fast);
}
.nv3-seg-tab.is-active,
.nv3-seg-tab[aria-selected="true"] {
  background: var(--nv3-orange);
  color: #fff;
}

/* ──────────────────────────────────────────
   16. FILTER CHIPS
   ────────────────────────────────────────── */
.nv3-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}
.nv3-chips::-webkit-scrollbar { display: none; }
.nv3-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--nv3-glass-border);
  background: var(--nv3-pill-bg);
  color: var(--nv3-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--nv3-dur-fast), color var(--nv3-dur-fast), border-color var(--nv3-dur-fast);
  flex-shrink: 0;
}
.nv3-chip.is-active,
.nv3-chip[aria-selected="true"] {
  border-color: rgba(203, 54, 15, .4);
  background: rgba(203, 54, 15, .12);
  color: var(--nv3-orange);
}
.nv3-chip-count {
  background: var(--nv3-orange);
  color: #fff;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 6px;
}

/* ──────────────────────────────────────────
   17. SUBTABS (underline style)
   ────────────────────────────────────────── */
.nv3-subtabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--nv3-line);
}
.nv3-subtab {
  padding-bottom: 11px;
  color: var(--nv3-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  background: none;
  border: 0;
  font-family: inherit;
  transition: color var(--nv3-dur-fast);
}
.nv3-subtab.is-active,
.nv3-subtab[aria-selected="true"] {
  color: var(--nv3-paper);
  font-weight: 800;
}
.nv3-subtab.is-active::after,
.nv3-subtab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--nv3-orange);
}
.nv3-subtab-badge {
  background: var(--nv3-orange);
  color: #fff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 6px;
  margin-left: 5px;
}

/* ──────────────────────────────────────────
   18. SEARCH BAR
   ────────────────────────────────────────── */
.nv3-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--nv3-pill-bg);
  border: 1px solid var(--nv3-glass-border);
  border-radius: var(--nv3-r-md);
}
.nv3-search svg {
  width: 15px; height: 15px;
  stroke: var(--nv3-muted);
  fill: none; stroke-width: 2;
  flex-shrink: 0;
}
.nv3-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--nv3-paper);
  font-size: 13px;
  font-family: var(--nv3-font-sans);
  flex: 1;
  width: 100%;
}
.nv3-search input::placeholder { color: var(--nv3-muted); }

/* ──────────────────────────────────────────
   19. FORM FIELDS
   ────────────────────────────────────────── */
.nv3-field { margin-bottom: 12px; }
.nv3-field:last-child { margin-bottom: 0; }
.nv3-label {
  display: block;
  color: var(--nv3-muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.nv3-label-req { color: var(--nv3-orange); margin-left: 2px; }
.nv3-input {
  display: block !important;
  width: 100% !important;
  background: var(--nv3-pill-bg) !important;
  border: 1px solid var(--nv3-glass-border) !important;
  border-radius: var(--nv3-r-md) !important;
  padding: 12px 14px !important;
  color: var(--nv3-paper) !important;
  font-size: 14px !important;
  font-family: var(--nv3-font-sans) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color var(--nv3-dur-fast) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.nv3-input:focus {
  border-color: rgba(203, 54, 15, .5) !important;
  outline: none !important;
}
.nv3-input::placeholder { color: var(--nv3-muted); }
.nv3-textarea {
  min-height: 100px !important;
  resize: vertical !important;
}
.nv3-char-count {
  color: var(--nv3-muted);
  font-size: 11px;
  text-align: right;
  margin-top: 5px;
}
/* Skill chip */
.nv3-skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(203, 54, 15, .12);
  border: 1px solid rgba(203, 54, 15, .3);
  color: var(--nv3-orange);
  font-size: 12.5px;
  font-weight: 700;
}

/* ──────────────────────────────────────────
   20. NOTIFICATION ROW
   ────────────────────────────────────────── */
.nv3-nrow {
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  align-items: flex-start;
}
.nv3-nrow + .nv3-nrow { border-top: 1px solid var(--nv3-line); }
.nv3-nrow.is-unread { background: rgba(203, 54, 15, .06); }
.nv3-nrow-title {
  color: var(--nv3-paper);
  font-size: 14px;
  font-weight: 700;
}
.nv3-nrow-body {
  color: var(--nv3-muted);
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 2px;
}
.nv3-nrow-time {
  color: var(--nv3-muted);
  font-size: 11px;
  white-space: nowrap;
}
.nv3-nrow-dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  background: var(--nv3-orange);
  margin-top: 6px;
}
/* Dot indicators for community */
.nv3-dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  flex-shrink: 0;
}
.nv3-dot-orange { background: var(--nv3-orange); }
.nv3-dot-lime   { background: var(--nv3-lime); }
.nv3-dot-sky    { background: var(--nv3-sky); }
.nv3-dot-rose   { background: var(--nv3-rose); }

/* ──────────────────────────────────────────
   21. COMMUNITY CHANNEL ROW
   ────────────────────────────────────────── */
.nv3-chan {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}
.nv3-chan + .nv3-chan { border-top: 1px solid var(--nv3-line); }
.nv3-chan-hash {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--nv3-pill-bg);
  border: 1px solid var(--nv3-glass-border);
  color: var(--nv3-orange);
  font-size: 17px;
  font-weight: 800;
  flex-shrink: 0;
}
.nv3-badge {
  background: var(--nv3-orange);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
  margin-left: auto;
}

/* ──────────────────────────────────────────
   22. CERTIFICATE CARD
   ────────────────────────────────────────── */
.nv3-cert {
  width: 168px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.nv3-cert-badge {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--nv3-orange), var(--nv3-plum));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.nv3-cert-badge svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; }
.nv3-cert-title {
  color: var(--nv3-paper);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}
.nv3-cert-verify {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--nv3-lime);
  font-size: 10px;
  font-weight: 700;
}
.nv3-cert-verify svg { width: 12px; height: 12px; stroke: var(--nv3-lime); fill: none; stroke-width: 2.5; }

/* ──────────────────────────────────────────
   23. LESSON MEDIA BLOCK
   ────────────────────────────────────────── */
.nv3-media {
  height: 188px;
  border-radius: var(--nv3-r-lg);
  border: 1px solid var(--nv3-glass-border);
  background: linear-gradient(135deg, #241a14, #1a130d);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.nv3-light .nv3-media { background: linear-gradient(135deg, #d8d0c4, #cabfae); }
.nv3-play-btn {
  width: 60px; height: 60px;
  border-radius: 30px;
  background: var(--nv3-orange);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(203, 54, 15, .4);
  color: #fff;
}
.nv3-play-btn svg { width: 26px; height: 26px; fill: #fff; margin-left: 3px; }
.nv3-play-hint {
  color: var(--nv3-paper2);
  font-size: 12.5px;
  font-weight: 600;
}

/* ──────────────────────────────────────────
   24. QUIZ OPTION
   ────────────────────────────────────────── */
.nv3-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 13px;
  border: 1px solid var(--nv3-glass-border);
  background: var(--nv3-pill-bg);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background var(--nv3-dur-fast), border-color var(--nv3-dur-fast);
}
.nv3-opt:last-child { margin-bottom: 0; }
.nv3-opt-radio {
  width: 20px; height: 20px;
  border-radius: 10px;
  border: 2px solid var(--nv3-muted);
  flex-shrink: 0;
  transition: border-color var(--nv3-dur-fast), background var(--nv3-dur-fast);
}
.nv3-opt-text { color: var(--nv3-paper); font-size: 14px; font-weight: 600; }
.nv3-opt.is-selected {
  border-color: rgba(203, 54, 15, .5);
  background: rgba(203, 54, 15, .10);
}
.nv3-opt.is-selected .nv3-opt-radio {
  border-color: var(--nv3-orange);
  background: radial-gradient(circle, var(--nv3-orange) 0 5px, transparent 6px);
}
.nv3-opt.is-correct {
  border-color: rgba(110, 168, 50, .5);
  background: rgba(110, 168, 50, .10);
}
.nv3-opt.is-wrong {
  border-color: rgba(196, 92, 106, .5);
  background: rgba(196, 92, 106, .10);
}

/* ──────────────────────────────────────────
   25. DROP ZONE (file upload)
   ────────────────────────────────────────── */
.nv3-dropzone {
  border: 1.5px dashed var(--nv3-glass-border);
  border-radius: 14px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--nv3-muted);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--nv3-dur-fast), background var(--nv3-dur-fast);
}
.nv3-dropzone:hover, .nv3-dropzone.is-hover {
  border-color: rgba(203, 54, 15, .4);
  background: rgba(203, 54, 15, .05);
}
.nv3-dropzone svg { width: 28px; height: 28px; stroke: var(--nv3-muted); fill: none; stroke-width: 1.5; }

/* ──────────────────────────────────────────
   26. EARNINGS BALANCE
   ────────────────────────────────────────── */
.nv3-bal-label { color: var(--nv3-muted); font-size: 12px; font-weight: 600; }
.nv3-bal-num {
  color: var(--nv3-paper);
  font-family: var(--nv3-font-serif);
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-top: 2px;
}
.nv3-bal-split {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--nv3-line);
}
.nv3-bal-split-num   { color: var(--nv3-paper); font-size: 14px; font-weight: 800; }
.nv3-bal-split-label { color: var(--nv3-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin-top: 2px; }

/* ──────────────────────────────────────────
   27. PENDING / STATUS BANNER
   ────────────────────────────────────────── */
.nv3-status-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--nv3-r-lg);
  background: rgba(196, 168, 50, .12);
  border: 1px solid rgba(196, 168, 50, .25);
  color: var(--nv3-butter);
  margin-bottom: var(--nv3-s5);
}
.nv3-status-banner-warn {
  background: rgba(196, 92, 106, .12);
  border-color: rgba(196, 92, 106, .25);
  color: var(--nv3-rose);
}
.nv3-status-banner-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}
.nv3-status-banner-body {
  font-size: 12.5px;
  color: var(--nv3-paper2);
  line-height: 1.45;
}
.nv3-status-banner-body a { color: var(--nv3-orange); text-decoration: underline; }

/* ──────────────────────────────────────────
   28. UPGRADE CTA CARD (sidebar)
   ────────────────────────────────────────── */
.nv3-upgrade-cta {
  padding: 14px;
  border-radius: var(--nv3-r-md);
  background: rgba(203, 54, 15, .10);
  border: 1px solid rgba(203, 54, 15, .20);
  font-size: 12px;
  line-height: 1.5;
}
.nv3-upgrade-cta strong { color: var(--nv3-paper); font-weight: 700; display: block; margin-bottom: 4px; }
.nv3-upgrade-cta p { color: var(--nv3-muted); font-size: 11.5px; margin-bottom: 10px; }

/* ──────────────────────────────────────────
   29. EMPTY STATE
   ────────────────────────────────────────── */
.nv3-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 20px;
  text-align: center;
}
.nv3-empty svg { width: 32px; height: 32px; stroke: var(--nv3-muted); fill: none; stroke-width: 1.5; opacity: .7; }
.nv3-empty-title { color: var(--nv3-paper); font-size: 15px; font-weight: 700; }
.nv3-empty-body  { color: var(--nv3-muted); font-size: 13px; line-height: 1.5; }

/* ──────────────────────────────────────────
   30. SKELETON LOADER
   ────────────────────────────────────────── */
@keyframes nv3-shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.nv3-skeleton {
  border-radius: var(--nv3-r-md);
  background: linear-gradient(90deg, var(--nv3-pill-bg) 25%, rgba(244,240,232,.14) 50%, var(--nv3-pill-bg) 75%);
  background-size: 800px 100%;
  animation: nv3-shimmer 1.4s ease-in-out infinite;
}
.nv3-skeleton-line { height: 14px; border-radius: 7px; }
.nv3-skeleton-card { height: 88px; }

/* ──────────────────────────────────────────
   31. HEADINGS
   ────────────────────────────────────────── */
.nv3-h1 {
  font-family: var(--nv3-font-serif);
  color: var(--nv3-paper);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.15;
}
.nv3-h2 {
  font-family: var(--nv3-font-serif);
  color: var(--nv3-paper);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.nv3-subhead { color: var(--nv3-muted); font-size: 13px; margin-top: 3px; }
.nv3-body    { color: var(--nv3-paper2); font-size: 13.5px; line-height: 1.55; }
.nv3-meta    { color: var(--nv3-muted);  font-size: 12px; }

/* ──────────────────────────────────────────
   32. UTILITY
   ────────────────────────────────────────── */
.nv3-between  { display: flex; align-items: center; justify-content: space-between; }
.nv3-row-flex { display: flex; align-items: center; gap: 11px; }
.nv3-flex-1   { flex: 1; min-width: 0; }
.nv3-stack    { display: flex; flex-direction: column; gap: 18px; }
.nv3-stack-sm { display: flex; flex-direction: column; gap: 10px; }
.nv3-hscroll  { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px; }
.nv3-hscroll::-webkit-scrollbar { display: none; }
.nv3-payout   { color: var(--nv3-paper); font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.nv3-sr-only  { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ──────────────────────────────────────────
   33. MOBILE TAB BAR
   ────────────────────────────────────────── */
.nv3-tabbar {
  position: fixed !important;
  left: 14px !important;
  right: 14px !important;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px)) !important;
  height: 64px !important;
  z-index: 200 !important;
  background: var(--nv3-tabbar-bg) !important;
  border: 1px solid var(--nv3-tabbar-border) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  padding: 0 6px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  transition: transform var(--nv3-dur-med) var(--nv3-ease);
}
.nv3-tab {
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  color: var(--nv3-muted) !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  cursor: pointer !important;
  padding: 6px 0 !important;
  margin: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  text-align: center !important;
  text-transform: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
  transition: color var(--nv3-dur-fast);
}
.nv3-tab svg {
  width: 22px !important;
  height: 22px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
  flex-shrink: 0 !important;
  display: block !important;
}
.nv3-tab.is-active { color: var(--nv3-orange) !important; }
.nv3-tab-more {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border-radius: 13px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--nv3-pill-bg) !important;
  border: 1px solid var(--nv3-glass-border) !important;
  color: var(--nv3-paper) !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  margin: 0 0 0 3px !important;
  padding: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  box-sizing: border-box !important;
}
.nv3-tab-more svg {
  width: 19px !important;
  height: 19px !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2 !important;
  display: block !important;
}

/* Scroll pad so content isn't hidden under fixed tab bar */
.nv3-tabbar-pad {
  height: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
  padding: 0 !important;
  display: block !important;
}

/* ──────────────────────────────────────────
   34. MOBILE HEADER BAR
   ────────────────────────────────────────── */
.nv3-mobilebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.nv3-mobilebar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nv3-bell-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 11px !important;
  background: var(--nv3-pill-bg) !important;
  border: 1px solid var(--nv3-glass-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  cursor: pointer !important;
  color: var(--nv3-paper) !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}
.nv3-bell-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.nv3-bell-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  background: var(--nv3-orange);
  color: #fff;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 1.5px solid var(--nv3-page-bg);
}

/* ──────────────────────────────────────────
   33b. PAYMENTS
   ────────────────────────────────────────── */
.nv3-payment-stats {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.nv3-payment-stat {
  flex: 1; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.nv3-payment-stat-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--nv3-muted);
}
.nv3-payment-stat-amount {
  font-size: 17px; font-weight: 800; color: var(--nv3-paper); letter-spacing: -.3px;
}
.nv3-payment-stat-amount--paid  { color: var(--nv3-lime); }
.nv3-payment-stat-amount--due   { color: var(--nv3-orange); }

.nv3-payment-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid rgba(244,240,232,.05);
}
.nv3-payment-row:last-child { border-bottom: none; }
.nv3-payment-row-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end;
}
.nv3-payment-amount {
  font-size: 13.5px; font-weight: 700; color: var(--nv3-paper);
}
.nv3-payment-amount--paid { color: var(--nv3-lime); }
.nv3-receipt-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--nv3-muted);
  background: rgba(244,240,232,.07); border: 1px solid rgba(244,240,232,.1);
  border-radius: var(--nv3-r-sm, 8px); padding: 4px 10px; cursor: pointer;
  transition: color var(--nv3-dur-fast), background var(--nv3-dur-fast);
}
.nv3-receipt-btn:hover { color: var(--nv3-paper); background: rgba(244,240,232,.12); }

/* ──────────────────────────────────────────
   33c. STREAK STAT
   ────────────────────────────────────────── */
.nv3-stat-num-flame { color: #f97316; }

/* ──────────────────────────────────────────
   33d. CERTIFICATE ACTIONS
   ────────────────────────────────────────── */
.nv3-cert-actions {
  display: flex; gap: 6px; margin-top: 10px;
}
.nv3-cert-action-btn {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--nv3-muted);
  background: rgba(244,240,232,.07); border: 1px solid rgba(244,240,232,.1);
  border-radius: 999px; padding: 5px 11px; cursor: pointer; text-decoration: none;
  transition: color var(--nv3-dur-fast), background var(--nv3-dur-fast);
}
.nv3-cert-action-btn:hover { color: var(--nv3-paper); background: rgba(244,240,232,.14); }

/* ──────────────────────────────────────────
   33e. PEER LIST
   ────────────────────────────────────────── */
.nv3-peer-list {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 14px; margin-bottom: 4px;
}
.nv3-peer-list-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--nv3-muted); font-weight: 600;
  white-space: nowrap;
}
.nv3-peer-avatars {
  display: flex; flex-direction: row-reverse; align-items: center;
}
.nv3-peer-avatar {
  margin-left: -8px; border: 2px solid rgba(8,6,4,.9);
  transition: transform var(--nv3-dur-fast);
}
.nv3-peer-avatar:first-child { margin-left: 0; }
.nv3-peer-avatar:hover { transform: translateY(-2px) scale(1.08); z-index: 2; }
.nv3-peer-overflow {
  background: rgba(244,240,232,.12); color: var(--nv3-muted);
  font-size: 10px; font-weight: 700;
}

/* ──────────────────────────────────────────
   33f. PROGRESS TOAST
   ────────────────────────────────────────── */
.nv3-toast {
  position: fixed; bottom: calc(env(safe-area-inset-bottom, 0px) + 80px); left: 50%;
  transform: translateX(-50%) translateY(24px);
  opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px;
  background: rgba(18,14,10,.97); border: 1px solid rgba(244,240,232,.12);
  border-radius: var(--nv3-r-lg); padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 600; max-width: calc(100vw - 32px); width: 360px;
  transition: opacity .3s, transform .3s cubic-bezier(.34,1.56,.64,1);
}
.nv3-toast--in { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.nv3-toast--out { opacity: 0; transform: translateX(-50%) translateY(16px); }
.nv3-toast--flame { border-color: rgba(249,115,22,.35); }
.nv3-toast--success { border-color: rgba(110,168,50,.35); }
.nv3-toast-icon { font-size: 18px; flex-shrink: 0; }
.nv3-toast-text { font-size: 13px; color: var(--nv3-paper); flex: 1; line-height: 1.4; }
.nv3-toast-cta {
  font-size: 12px; font-weight: 700; color: var(--nv3-orange);
  background: none; border: none; cursor: pointer; flex-shrink: 0; padding: 0 4px;
}
.nv3-toast-close {
  font-size: 11px; color: var(--nv3-muted); background: none;
  border: none; cursor: pointer; flex-shrink: 0; padding: 0 2px;
}

/* ──────────────────────────────────────────
   34a. COHORT — PROGRAM LIST & DETAIL
   ────────────────────────────────────────── */

/* Program card on cohort list */
.nv3-cohort-prog-card {
  padding: 16px 18px;
  cursor: pointer;
  transition: background var(--nv3-dur-fast);
}
.nv3-cohort-prog-card:hover { background: rgba(244,240,232,.05); }
.nv3-cohort-prog-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nv3-cohort-prog-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--nv3-paper);
  letter-spacing: -.15px;
}

/* Detail view header */
.nv3-cohort-detail-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.nv3-cohort-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nv3-orange);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: pointer;
}
.nv3-cohort-back-btn:hover { opacity: .8; }

/* Program tabs */
.nv3-prog-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--nv3-line);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nv3-prog-tabs::-webkit-scrollbar { display: none; }
.nv3-prog-tab {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--nv3-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--nv3-dur-fast);
}
.nv3-prog-tab::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--nv3-orange);
  transform: scaleX(0);
  transition: transform var(--nv3-dur-fast);
}
.nv3-prog-tab.is-active { color: var(--nv3-paper); }
.nv3-prog-tab.is-active::after { transform: scaleX(1); }
.nv3-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(203,54,15,.2);
  color: var(--nv3-orange);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 5px;
}

/* Assessment/quiz rows */
.nv3-assessment-row {
  padding: 14px 16px;
  margin-bottom: 8px;
}
.nv3-assessment-instructions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--nv3-line);
  font-size: 12.5px;
  color: var(--nv3-muted);
  line-height: 1.5;
}

/* Quiz gate strip — shown between module block and next module */
.nv3-quiz-gate {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 4px 0 12px;
  border-radius: var(--nv3-r-md);
  border: 1px dashed rgba(244,240,232,.12);
  background: rgba(244,240,232,.03);
}
.nv3-quiz-gate--ready {
  border-color: rgba(203,54,15,.4);
  background: rgba(203,54,15,.06);
  cursor: pointer;
}
.nv3-quiz-gate--ready:hover { background: rgba(203,54,15,.1); }
.nv3-quiz-gate--passed {
  border-color: rgba(110,168,50,.3);
  background: rgba(110,168,50,.05);
}
.nv3-quiz-gate--submitted {
  border-color: rgba(196,168,50,.3);
  background: rgba(196,168,50,.05);
}
.nv3-quiz-gate-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: rgba(244,240,232,.07);
}
.nv3-quiz-gate--ready .nv3-quiz-gate-ico { background: rgba(203,54,15,.15); color: var(--nv3-orange); }
.nv3-quiz-gate--passed .nv3-quiz-gate-ico { background: rgba(110,168,50,.15); color: var(--nv3-lime); }
.nv3-quiz-gate--submitted .nv3-quiz-gate-ico { background: rgba(196,168,50,.15); color: #d4b84a; }
.nv3-quiz-gate--locked .nv3-quiz-gate-ico { color: var(--nv3-muted); }
.nv3-quiz-gate-title {
  font-size: 13px; font-weight: 600; color: var(--nv3-paper);
}
.nv3-quiz-gate-meta {
  font-size: 11.5px; color: var(--nv3-muted); margin-top: 2px;
}

/* ──────────────────────────────────────────
   34b. CURRICULUM & LESSON PLAYER
   ────────────────────────────────────────── */

/* Module accordion */
.nv3-module-block { margin-bottom: 8px; }
.nv3-module-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  user-select: none;
  transition: background var(--nv3-dur-fast);
}
.nv3-module-header:hover { background: rgba(244,240,232,.04); }
.nv3-module-chevron {
  flex-shrink: 0;
  color: var(--nv3-muted);
  transition: transform var(--nv3-dur-fast);
}
.nv3-module-header[aria-expanded="true"] .nv3-module-chevron { transform: rotate(180deg); }
.nv3-module-header.is-locked { cursor: default; }

/* Lesson list */
.nv3-lesson-list {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--nv3-line);
}
.nv3-lesson-list.is-open { display: flex; }

.nv3-lesson-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px 11px 18px;
  cursor: pointer;
  border-bottom: 1px solid rgba(244,240,232,.05);
  transition: background var(--nv3-dur-fast);
}
.nv3-lesson-row:last-child { border-bottom: none; }
.nv3-lesson-row:hover { background: rgba(244,240,232,.04); }
.nv3-lesson-row.is-done .nv3-lesson-title { opacity: .55; text-decoration: line-through; text-decoration-color: rgba(244,240,232,.2); }

.nv3-lesson-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(244,240,232,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--nv3-muted);
  transition: border-color var(--nv3-dur-fast), background var(--nv3-dur-fast);
}
.nv3-lesson-row.is-done .nv3-lesson-check {
  background: rgba(110,168,50,.2);
  border-color: var(--nv3-lime);
  color: var(--nv3-lime);
}

.nv3-lesson-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--nv3-paper);
  line-height: 1.3;
}
.nv3-lesson-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.nv3-lesson-type-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(244,240,232,.07);
  color: var(--nv3-muted);
}
.nv3-lesson-type-video { background: rgba(46,110,142,.2); color: #6ab4d6; }
.nv3-lesson-type-resource_link { background: rgba(203,54,15,.15); color: #e07a50; }
.nv3-lesson-type-text { background: rgba(196,168,50,.15); color: #d4b84a; }
.nv3-lesson-meta span:last-child { font-size: 11px; color: var(--nv3-muted); }

/* ── Lesson Player Overlay ── */
.nv3-lesson-player-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 500;
}
.nv3-lesson-player {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 510;
  background: #0a0806;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 600px) {
  .nv3-lesson-player {
    inset: auto;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(720px, 96vw);
    height: min(88vh, 640px);
    border-radius: var(--nv3-r-lg);
    border: 1px solid rgba(244,240,232,.1);
    box-shadow: 0 32px 80px rgba(0,0,0,.7);
  }
}

.nv3-lp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(244,240,232,.07);
  flex-shrink: 0;
}
.nv3-lp-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.nv3-lp-type-badge {
  font-size: 9px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: rgba(203,54,15,.18); color: var(--nv3-orange);
}
.nv3-lp-duration { font-size: 11.5px; color: var(--nv3-muted); }
.nv3-lp-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(244,240,232,.07); border: 1px solid rgba(244,240,232,.1);
  color: var(--nv3-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: background var(--nv3-dur-fast), color var(--nv3-dur-fast);
}
.nv3-lp-close:hover { background: rgba(244,240,232,.12); color: var(--nv3-paper); }

.nv3-lp-title {
  padding: 14px 18px 8px;
  font-size: 17px; font-weight: 700;
  color: var(--nv3-paper);
  letter-spacing: -.2px;
  flex-shrink: 0;
}

.nv3-lp-body {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #070504;
}
.nv3-lp-iframe {
  width: 100%; height: 100%;
  border: none;
}
.nv3-lp-link-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 32px 24px; text-align: center;
}
.nv3-lp-link-icon { color: var(--nv3-muted); }
.nv3-lp-link-title {
  font-size: 16px; font-weight: 600; color: var(--nv3-paper);
  max-width: 360px; line-height: 1.4;
}
.nv3-lp-no-content {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; color: var(--nv3-muted); text-align: center; padding: 24px;
}
.nv3-lp-no-content p { font-size: 13.5px; }

.nv3-lp-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  border-top: 1px solid rgba(244,240,232,.07);
  flex-shrink: 0;
}
.nv3-lp-prev, .nv3-lp-next {
  display: flex; align-items: center; gap: 5px;
  background: rgba(244,240,232,.07); border: 1px solid rgba(244,240,232,.1);
  color: var(--nv3-muted); font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: var(--nv3-r-md); cursor: pointer;
  transition: background var(--nv3-dur-fast), color var(--nv3-dur-fast);
}
.nv3-lp-prev:hover, .nv3-lp-next:hover { background: rgba(244,240,232,.12); color: var(--nv3-paper); }
.nv3-lp-complete {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--nv3-orange); color: #fff;
  border: none; border-radius: var(--nv3-r-md);
  padding: 10px 18px; font-size: 13.5px; font-weight: 700;
  cursor: pointer; transition: background var(--nv3-dur-fast), opacity var(--nv3-dur-fast);
}
.nv3-lp-complete:hover { background: var(--nv3-orange2); }
.nv3-lp-complete.is-done {
  background: rgba(110,168,50,.2); color: var(--nv3-lime);
  border: 1px solid rgba(110,168,50,.3);
}

/* ──────────────────────────────────────────
   35. DRAWER (mobile menu)
   ────────────────────────────────────────── */
/* ── Drawer shell — slides in from the LEFT ── */
.nv3-drawer {
  position: fixed;
  top: 0; left: 0;
  width: min(300px, 88vw);
  height: 100%;
  z-index: 400;
  /* Deep dark — nearly opaque, warm blacks */
  background: rgba(8, 6, 4, 0.97);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border-right: 1px solid rgba(244, 240, 232, 0.07);
  display: flex;
  flex-direction: column;
  transform: translateX(-110%);
  transition: transform .38s cubic-bezier(.34, 1.56, .64, 1);
  overflow: hidden; /* clip the user-card gradient */
}
.nv3-drawer.is-open {
  transform: translateX(0);
  box-shadow: 8px 0 48px rgba(0, 0, 0, .65);
}

/* ── Backdrop ── */
.nv3-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  z-index: 390;
  display: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.nv3-drawer-backdrop.is-open { display: block; }

/* ── Close button (top-right) ── */
.nv3-drawer-close-btn {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(244, 240, 232, 0.07);
  border: 1px solid rgba(244, 240, 232, 0.1);
  color: rgba(244, 240, 232, 0.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.nv3-drawer-close-btn:hover {
  background: rgba(244, 240, 232, 0.12);
  color: var(--nv3-paper);
}

/* ── User card ── */
.nv3-drawer-user {
  /* Warm orange radial glow from top-left */
  background: linear-gradient(145deg, rgba(203, 54, 15, .18) 0%, rgba(8, 6, 4, 0) 55%);
  padding: 28px 20px 22px;
  border-bottom: 1px solid rgba(244, 240, 232, 0.07);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
/* Slightly larger avatar in drawer user card */
.nv3-drawer-user .nv3-avatar {
  width: 48px !important;
  height: 48px !important;
  font-size: 16px !important;
  flex-shrink: 0;
}
.nv3-drawer-user-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.nv3-drawer-user-name {
  color: var(--nv3-paper);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nv3-drawer-user-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nv3-drawer-tier-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.45);
  background: rgba(244, 240, 232, 0.07);
  border: 1px solid rgba(244, 240, 232, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}
.nv3-drawer-tier-pill--upgraded {
  color: var(--nv3-orange);
  background: rgba(203, 54, 15, .12);
  border-color: rgba(203, 54, 15, .25);
}

/* ── Nav section ── */
.nv3-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0; /* allow flex child to shrink and scroll */
  scrollbar-width: none;
}
.nv3-drawer-nav::-webkit-scrollbar { display: none; }

/* Section label */
.nv3-drawer-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.28);
  padding: 6px 12px 4px;
}

/* Badge inside drawer (push to right) */
.nv3-drawer-badge {
  margin-left: auto;
  font-size: 9px !important;
  min-width: 18px;
  height: 18px;
}

/* ── Nav items (drawer-specific overrides) ── */
.nv3-drawer .nv3-navitem {
  border-radius: var(--nv3-r-md) !important;
  padding: 10px 12px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: rgba(244, 240, 232, 0.55) !important;
  position: relative !important;
}
.nv3-drawer .nv3-navitem svg {
  width: 18px !important;
  height: 18px !important;
  opacity: .65;
  flex-shrink: 0 !important;
}
.nv3-drawer .nv3-navitem:hover {
  background: rgba(244, 240, 232, 0.06) !important;
  color: var(--nv3-paper) !important;
}
.nv3-drawer .nv3-navitem:hover svg { opacity: 1; }
.nv3-drawer .nv3-navitem.is-active {
  background: rgba(203, 54, 15, .1) !important;
  color: var(--nv3-orange) !important;
}
/* Active left-bar accent */
.nv3-drawer .nv3-navitem.is-active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--nv3-orange);
}
.nv3-drawer .nv3-navitem.is-active svg { opacity: 1; stroke: var(--nv3-orange) !important; }

/* Subtle variant (Creative Dashboard link) */
.nv3-drawer .nv3-navitem--subtle {
  color: rgba(244, 240, 232, 0.35) !important;
  font-size: 12.5px !important;
}

/* Danger variant (Sign out) — matches design-reference --rose */
.nv3-drawer .nv3-navitem--danger {
  color: #c45c6a !important;
}
.nv3-drawer .nv3-navitem--danger svg { stroke: #c45c6a !important; opacity: 1 !important; }
.nv3-drawer .nv3-navitem--danger:hover {
  background: rgba(196, 92, 106, 0.1) !important;
  color: #e07080 !important;
}
.nv3-drawer .nv3-navitem--danger:hover svg { stroke: #e07080 !important; }

/* ── Footer — pinned to bottom ── */
.nv3-drawer-footer {
  margin-top: auto;
  padding: 8px 12px calc(env(safe-area-inset-bottom, 0px) + 16px);
  border-top: 1px solid rgba(244, 240, 232, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

/* ──────────────────────────────────────────
   35b. NAV ITEM (sidebar + drawer — all screen sizes)
   ────────────────────────────────────────── */
.nv3-navitem {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 11px 13px !important;
  border-radius: var(--nv3-r-md) !important;
  color: var(--nv3-muted) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  width: 100% !important;
  text-align: left !important;
  transition: background var(--nv3-dur-fast), color var(--nv3-dur-fast);
  text-decoration: none !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  height: auto !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.nv3-navitem:hover { background: var(--nv3-pill-bg) !important; color: var(--nv3-paper) !important; }
.nv3-navitem svg { width: 16px !important; height: 16px !important; stroke: currentColor !important; fill: none !important; stroke-width: 2 !important; flex-shrink: 0 !important; display: block !important; }
.nv3-navitem .nv3-badge { margin-left: auto !important; }
.nv3-navitem.is-active { background: rgba(203, 54, 15, .12) !important; color: var(--nv3-orange) !important; }
.nv3-navitem.is-active svg { stroke: var(--nv3-orange) !important; }

/* ──────────────────────────────────────────
   36. DESKTOP LAYOUT
   Only applies at ≥ 960px. Mobile layout is default.
   ────────────────────────────────────────── */
@media (min-width: 960px) {

  /* Hide mobile-only elements */
  .nv3-tabbar { display: none !important; }
  .nv3-tabbar-pad { height: 0 !important; }
  .nv3-mobilebar { display: none !important; }
  .nv3-drawer-toggle { display: none; }

  /* Shell: sidebar + main flex row */
  .nv3-shell {
    display: flex;
    min-height: 100vh;
    position: relative;
  }

  /* Sidebar */
  .nv3-sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--nv3-sidebar-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--nv3-glass-border);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .nv3-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
  }

  .nv3-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin-bottom: 4px;
  }
  .nv3-sidebar-name {
    color: var(--nv3-paper);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.2px;
  }
  .nv3-sidebar-role {
    color: var(--nv3-muted);
    font-size: 11px;
  }

  .nv3-sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }

  /* Nav item — desktop only remnant (base styles moved outside media query) */

  .nv3-sidebar-divider {
    height: 1px;
    background: var(--nv3-line);
    margin: 8px 0;
  }

  .nv3-sidebar-foot {
    padding: 12px 0 0;
    font-size: 12.5px;
    color: var(--nv3-muted);
  }
  .nv3-sidebar-foot a { color: var(--nv3-muted); transition: color var(--nv3-dur-fast); }
  .nv3-sidebar-foot a:hover { color: var(--nv3-orange); }

  /* Main column */
  .nv3-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  /* Top bar */
  /* Mobile topbar — only visible at ≤959px */
  .nv3-mobile-topbar { display: none; }

  .nv3-topbar {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px;
    border-bottom: 1px solid var(--nv3-glass-border);
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 10, 7, .55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
  }
  .nv3-light .nv3-topbar { background: rgba(207, 200, 189, .55); }

  .nv3-topbar-search {
    flex: 1;
    max-width: 360px;
  }

  .nv3-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
  }

  /* Content area */
  .nv3-content {
    flex: 1;
    padding: 26px 28px;
  }

  /* Desktop content grid: 1fr 1fr 340px */
  .nv3-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 340px;
    grid-auto-rows: min-content;
    gap: 18px;
    align-items: start;
  }

  /* Grid column spans */
  .nv3-col-2     { grid-column: span 2; }
  .nv3-col-3     { grid-column: 1 / -1; }
  .nv3-col-rail  { grid-column: 3; }
  .nv3-row-2     { grid-row: span 2; }

  /* Two-column variant (no right rail) */
  .nv3-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
  }

  /* Show only on desktop */
  .nv3-desktop-only { display: block !important; }
  .nv3-mobile-only  { display: none !important; }
}

/* ──────────────────────────────────────────
   37. MOBILE LAYOUT (< 960px)
   ────────────────────────────────────────── */

/* Extend v2 tab bar to 769–959px range (v2 CSS only covers ≤768px) */
@media (min-width: 769px) and (max-width: 959px) {
  .noir-mobile-tabbar--trainee {
    position: fixed !important;
    bottom: 10px !important;
    left: 10px !important;
    right: 10px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    border-radius: 20px !important;
    background: rgba(14, 11, 8, 0.82) !important;
    border: 1px solid rgba(244, 240, 232, .1) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    padding: 6px 6px calc(max(env(safe-area-inset-bottom, 0px), 2px) + 6px) !important;
    z-index: 200 !important;
  }
  .noir-mobile-tabbar--trainee .noir-mtab {
    flex: 1 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: 22px auto !important;
    justify-items: center !important;
    align-content: center !important;
    row-gap: 3px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 6px 4px 5px !important;
    cursor: pointer !important;
  }
}

/* Hide the v2 tab bar at desktop */
@media (min-width: 960px) {
  .noir-mobile-tabbar--trainee { display: none !important; }
}

/* Burger → X animation for trainee drawer (v3 shell class pattern) */
#nv3-shell.is-open .noir-mtab-ico--burger span:nth-child(1) { width: 14px; transform: rotate(45deg) translate(4px, 4px); }
#nv3-shell.is-open .noir-mtab-ico--burger span:nth-child(2) { opacity: 0; }
#nv3-shell.is-open .noir-mtab-ico--burger span:nth-child(3) { width: 14px; transform: rotate(-45deg) translate(3px, -4px); }

@media (max-width: 959px) {
  .nv3-sidebar { display: none; }
  .nv3-topbar  { display: none; }

  /* Mobile topbar */
  /* Two-class specificity beats .nv3-mobile-only { display:block !important } */
  div.nv3-mobile-topbar.nv3-mobile-only {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 56px !important;
    padding: 0 20px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
    background: rgba(8, 6, 4, 0.88) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(244, 240, 232, 0.06) !important;
    flex-shrink: 0 !important;
  }
  div.nv3-mobile-topbar.nv3-mobile-only .nv3-mark {
    display: inline-block !important;
    flex-shrink: 0 !important;
    align-self: center !important;
    line-height: 0 !important;
    margin: 0 !important;
  }
  /* Override position:relative !important on .nv3-bell-btn */
  div.nv3-mobile-topbar.nv3-mobile-only .nv3-bell-btn {
    margin-left: auto !important;
    align-self: center !important;
    flex-shrink: 0 !important;
  }

  .nv3-shell {
    display: block;
  }

  .nv3-main { display: block; }

  .nv3-content {
    padding: 0 20px;
  }

  .nv3-grid, .nv3-grid-2col {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  /* Column span = full width on mobile */
  .nv3-col-2, .nv3-col-3, .nv3-col-rail { grid-column: unset; }

  .nv3-desktop-only { display: none !important; }
  .nv3-mobile-only  { display: block !important; }

  /* KPI stats row scrolls horizontally on mobile */
  .nv3-stats-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nv3-stats-row::-webkit-scrollbar { display: none; }
  .nv3-stats-row .nv3-glass.nv3-stat { min-width: 80px; }
}

@media (min-width: 960px) {
  .nv3-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }
}

/* ──────────────────────────────────────────
   38. PAGE-LEVEL LAYOUT HELPERS
   ────────────────────────────────────────── */

/* Greeting section */
.nv3-greeting {
  padding: 6px 0 0;
  margin-bottom: 18px;
}
.nv3-greeting-name {
  font-family: var(--nv3-font-serif);
  color: var(--nv3-paper);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.5px;
  line-height: 1.15;
}
.nv3-greeting-sub { color: var(--nv3-muted); font-size: 13px; margin-top: 3px; }
.nv3-greeting-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Section title (mobile page header) */
.nv3-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  margin-bottom: 18px;
}

/* Results score (quiz) */
.nv3-res-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
}
.nv3-res-icon {
  width: 72px; height: 72px;
  border-radius: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: rgba(110, 168, 50, .16);
}
.nv3-res-title {
  color: var(--nv3-paper);
  font-family: var(--nv3-font-serif);
  font-size: 24px;
  font-weight: 800;
}
.nv3-res-score {
  color: var(--nv3-lime);
  font-size: 32px;
  font-weight: 800;
  font-family: var(--nv3-font-serif);
  letter-spacing: -1px;
}

/* ──────────────────────────────────────────
   39. SECTION VISIBILITY (JS-driven)
   ────────────────────────────────────────── */
.nv3-section { display: block; }
.nv3-section.is-hidden { display: none; }

/* ──────────────────────────────────────────
   40. BACK BUTTON
   ────────────────────────────────────────── */
.nv3-back {
  width: 36px; height: 36px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--nv3-pill-bg);
  border: 1px solid var(--nv3-glass-border);
  color: var(--nv3-paper);
  cursor: pointer;
  flex-shrink: 0;
}
.nv3-back svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* ──────────────────────────────────────────
   41. TOAST / ALERT
   ────────────────────────────────────────── */
.nv3-alert {
  padding: 14px 16px;
  border-radius: var(--nv3-r-md);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.nv3-alert-success { background: rgba(110, 168, 50, .14); border: 1px solid rgba(110, 168, 50, .3); color: var(--nv3-lime); }
.nv3-alert-warn    { background: rgba(196, 168, 50, .14); border: 1px solid rgba(196, 168, 50, .3); color: var(--nv3-butter); }
.nv3-alert-error   { background: rgba(196, 92, 106, .14); border: 1px solid rgba(196, 92, 106, .3); color: var(--nv3-rose); }

/* ──────────────────────────────────────────
   42. CURRICULUM LIST
   ────────────────────────────────────────── */
.nv3-curriculum-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
}
.nv3-curriculum-row + .nv3-curriculum-row { border-top: 1px solid var(--nv3-line); }
.nv3-curriculum-row.is-done    .nv3-ico-sm { color: var(--nv3-lime); }
.nv3-curriculum-row.is-current .nv3-ico-sm { color: var(--nv3-orange); }
.nv3-curriculum-row.is-locked  .nv3-ico-sm { color: var(--nv3-muted); opacity: .6; }
.nv3-curriculum-title-locked { color: var(--nv3-muted); }

/* ──────────────────────────────────────────
   43. PROGRAM CARD (Programs list)
   ────────────────────────────────────────── */
.nv3-prog-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nv3-prog-title {
  color: var(--nv3-paper);
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.3;
}
.nv3-prog-desc { color: var(--nv3-muted); font-size: 12.5px; line-height: 1.5; }

/* ──────────────────────────────────────────
   44. COMMUNITY: GPILL (status + location)
   ────────────────────────────────────────── */
.nv3-gpill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11.5px;
  font-weight: 600;
}
.nv3-gpill-active {
  background: rgba(203, 54, 15, .12);
  border-color: rgba(203, 54, 15, .25);
  color: var(--nv3-orange);
}
.nv3-gpill-neutral {
  background: var(--nv3-pill-bg);
  border-color: var(--nv3-glass-border);
  color: var(--nv3-muted);
}

/* ══════════════════════════════════════════════════════════════
   Program Apply — full-screen view (native-app style)
   ══════════════════════════════════════════════════════════════ */
.nv3-apply-screen {
  position: fixed; inset: 0; z-index: 10000; /* above the mobile tab bar (z-9999) */
  background: var(--nv3-page-bg, #1c1712);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform var(--nv3-dur-med, .28s) var(--nv3-ease, ease);
  visibility: hidden;
}
.nv3-apply-screen.is-open { transform: translateX(0); visibility: visible; }

.nv3-apply-topbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 14px 16px;
  background: var(--nv3-page-bg, #1c1712);
  border-bottom: 1px solid var(--nv3-glass-border);
}
.nv3-apply-topbar-title { font-family: var(--nv3-font-serif, serif); font-size: 18px; font-weight: 800; color: var(--nv3-paper); }
.nv3-apply-screen .nv3-back { font-size: 26px; line-height: 1; }

.nv3-apply-form { max-width: 560px; margin: 0 auto; padding: 20px 18px 120px; }
.nv3-apply-progtitle { font-family: var(--nv3-font-serif, serif); font-size: 20px; font-weight: 800; color: var(--nv3-paper); margin-bottom: 6px; }

#nv3-apply-submit { margin-top: 24px; }

.nv3-apply-loading { display: flex; justify-content: center; padding: 60px 0; }

/* checkbox variant of nv3-opt-radio (square + checkmark) */
.nv3-opt-check { border-radius: 6px !important; }
.nv3-opt.is-selected .nv3-opt-check {
  background: var(--nv3-orange) !important; border-color: var(--nv3-orange) !important;
  position: relative;
}
.nv3-opt.is-selected .nv3-opt-check::after {
  content: '✓'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
}

/* sponsorship card */
.nv3-spon-card { padding: 16px; margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.nv3-spon-title { font-size: 15px; font-weight: 800; color: var(--nv3-paper); }
.nv3-spon-sub { font-size: 12.5px; color: var(--nv3-muted); margin-top: -6px; }
.nv3-spon-row { margin-bottom: 0 !important; }

/* error banner */
.nv3-banner {
  display: none; margin-bottom: 16px; padding: 12px 14px; border-radius: 10px;
  font-size: 13px; background: rgba(196,92,106,.12);
  border: 1px solid var(--nv3-rose, #c45c6a); color: #e6a3ad;
}
.nv3-banner.is-visible { display: block; }

/* required-field error highlight */
.nv3-field-bad.nv3-input, .nv3-field-bad.nv3-textarea { border-color: var(--nv3-rose, #c45c6a) !important; }
.nv3-field-bad.nv3-opt-group { outline: 1px solid var(--nv3-rose, #c45c6a); outline-offset: 4px; border-radius: 12px; }

/* spinner */
.nv3-spin {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(244,240,232,.35); border-top-color: var(--nv3-paper, #f4f0e8);
  border-radius: 50%; animation: nv3-rot .7s linear infinite; vertical-align: middle;
}
@keyframes nv3-rot { to { transform: rotate(360deg); } }

/* success state */
.nv3-apply-success { text-align: center; padding: 50px 20px; }
.nv3-apply-success-ico {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  background: rgba(110,168,50,.16); color: var(--nv3-lime, #8bbf5a);
  display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 800;
}
.nv3-apply-success-title { font-family: var(--nv3-font-serif, serif); font-size: 20px; font-weight: 800; color: var(--nv3-paper); margin-bottom: 6px; }
.nv3-apply-success-sub { font-size: 14px; color: var(--nv3-muted); }

/* ── Trainee onboarding checklist (home, brand-new newbie) ───── */
.nv3-onb-list { display: flex; flex-direction: column; gap: 8px; }
.nv3-onb-step {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: var(--nv3-r-md, 14px);
  background: var(--nv3-pill-bg); border: 1px solid var(--nv3-glass-border);
  cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color var(--nv3-dur-fast, .15s), background var(--nv3-dur-fast, .15s);
}
.nv3-onb-step:hover { border-color: rgba(203,54,15,.4); }
.nv3-onb-check {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
  border: 1.5px solid var(--nv3-muted); color: var(--nv3-muted); background: transparent;
}
.nv3-onb-step.is-done .nv3-onb-check {
  background: var(--nv3-lime, #8bbf5a); border-color: var(--nv3-lime, #8bbf5a); color: #14210a;
}
.nv3-onb-step-title { display: block; color: var(--nv3-paper); font-size: 14px; font-weight: 700; letter-spacing: -.1px; }
.nv3-onb-step.is-done .nv3-onb-step-title { color: var(--nv3-muted); text-decoration: line-through; }
.nv3-onb-arrow { flex: 0 0 auto; color: var(--nv3-muted); font-size: 22px; line-height: 1; }

/* ══════════════════════════════════════════════════════════════
   Community chat — full-screen conversation (channels + DMs)
   ══════════════════════════════════════════════════════════════ */
.nv3-chat-screen {
  position: fixed; inset: 0; z-index: 10000; /* above the mobile tab bar (z-9999) so the composer replaces it */
  background: var(--nv3-page-bg, #1c1712);
  display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden;
  transition: transform var(--nv3-dur-med, .28s) var(--nv3-ease, ease);
}
.nv3-chat-screen.is-open { transform: translateX(0); visibility: visible; }

.nv3-chat-topbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--nv3-glass-border);
  background: var(--nv3-page-bg, #1c1712);
}
.nv3-chat-screen .nv3-back { font-size: 26px; line-height: 1; flex: 0 0 auto; }
.nv3-chat-id { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.nv3-chat-avatar {
  flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--nv3-pill-bg); border: 1px solid var(--nv3-glass-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: var(--nv3-orange); overflow: hidden;
}
.nv3-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nv3-chat-name { font-size: 15px; font-weight: 800; color: var(--nv3-paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv3-chat-sub { font-size: 12px; color: var(--nv3-muted); }

.nv3-chat-messages {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 18px 16px; display: flex; flex-direction: column; gap: 12px;
  max-width: 680px; width: 100%; margin: 0 auto;
}
.nv3-chat-loading { margin: auto; }
.nv3-chat-empty { margin: auto; color: var(--nv3-muted); font-size: 13.5px; text-align: center; }

.nv3-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 80%; }
.nv3-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.nv3-msg-author { font-size: 12px; font-weight: 700; color: var(--nv3-paper2); margin: 0 0 4px 4px; }
.nv3-msg-role { color: var(--nv3-muted); font-weight: 500; }
.nv3-msg-bubble {
  padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.45;
  background: var(--nv3-pill-bg); border: 1px solid var(--nv3-glass-border);
  color: var(--nv3-paper); border-bottom-left-radius: 5px; word-break: break-word; white-space: pre-wrap;
}
.nv3-msg.is-mine .nv3-msg-bubble {
  background: var(--nv3-orange); border-color: var(--nv3-orange); color: #fff;
  border-bottom-left-radius: 16px; border-bottom-right-radius: 5px;
}
.nv3-msg-media { display: block; max-width: 220px; border-radius: 10px; margin-bottom: 4px; }
.nv3-msg-time { font-size: 10.5px; color: var(--nv3-muted); margin: 4px 6px 0; }

.nv3-chat-composer {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--nv3-glass-border); background: var(--nv3-page-bg, #1c1712);
  max-width: 680px; width: 100%; margin: 0 auto;
}
.nv3-chat-input {
  flex: 1; background: var(--nv3-pill-bg); border: 1px solid var(--nv3-glass-border);
  border-radius: var(--nv3-r-pill, 999px); padding: 12px 18px;
  color: var(--nv3-paper); font-size: 15px; font-family: inherit;
}
.nv3-chat-input:focus { outline: none; border-color: var(--nv3-orange); }
.nv3-chat-send {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--nv3-orange); border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.nv3-chat-send svg { fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* DM rows */
.nv3-dm-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--nv3-glass-border); transition: background var(--nv3-dur-fast, .15s); }
.nv3-dm-row:last-child { border-bottom: 0; }
.nv3-dm-row:hover { background: rgba(255,255,255,.03); }
.nv3-dm-av { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; background: var(--nv3-pill-bg); border: 1px solid var(--nv3-glass-border); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: var(--nv3-paper2); overflow: hidden; }
.nv3-dm-av-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.nv3-dm-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

/* Online strip */
.nv3-online-strip { display: flex; gap: 12px; overflow-x: auto; padding: 10px 2px 4px; -webkit-overflow-scrolling: touch; }
.nv3-online-pill { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 58px; background: none; border: 0; cursor: pointer; font-family: inherit; }
.nv3-online-av { position: relative; width: 50px; height: 50px; border-radius: 50%; background: var(--nv3-pill-bg); border: 1px solid var(--nv3-glass-border); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: var(--nv3-paper2); overflow: hidden; }
.nv3-online-av img { width: 100%; height: 100%; object-fit: cover; }
.nv3-online-av.is-online::after { content: ''; position: absolute; right: 1px; bottom: 1px; width: 12px; height: 12px; border-radius: 50%; background: var(--nv3-lime, #8bbf5a); border: 2px solid var(--nv3-page-bg, #1c1712); }
.nv3-online-name { font-size: 11px; color: var(--nv3-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58px; }

/* ══════════════════════════════════════════════════════════════
   Channel feed — Twitter-style posts (likes, views, replies, threads)
   ══════════════════════════════════════════════════════════════ */
.nv3-chat-messages.is-feed, .nv3-thread-body { gap: 0; }
.nv3-post {
  display: flex; gap: 12px; width: 100%; align-self: stretch;
  padding: 14px 4px; border-bottom: 1px solid var(--nv3-glass-border);
  cursor: pointer; transition: background var(--nv3-dur-fast, .15s);
}
.nv3-post:hover { background: rgba(255,255,255,.025); }
.nv3-post--parent, .nv3-post--reply { cursor: default; }
.nv3-post--parent:hover, .nv3-post--reply:hover { background: none; }
.nv3-post-av {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--nv3-pill-bg); border: 1px solid var(--nv3-glass-border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: var(--nv3-paper2); overflow: hidden;
}
.nv3-post-av img { width: 100%; height: 100%; object-fit: cover; }
.nv3-post--reply .nv3-post-av { flex-basis: 34px; width: 34px; height: 34px; font-size: 12px; }
.nv3-post-body { flex: 1; min-width: 0; }
.nv3-post-head { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.nv3-post-name { font-weight: 800; font-size: 14.5px; color: var(--nv3-paper); }
.nv3-post-role { font-size: 12.5px; color: var(--nv3-orange); font-weight: 600; }
.nv3-post-time { font-size: 12.5px; color: var(--nv3-muted); }
.nv3-post-text { font-size: 14.5px; line-height: 1.5; color: var(--nv3-paper); margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.nv3-post-media { display: block; max-width: 100%; border-radius: 12px; margin-top: 8px; border: 1px solid var(--nv3-glass-border); }
.nv3-post-actions { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.nv3-post-act {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; cursor: pointer; padding: 0;
  color: var(--nv3-muted); font-size: 13px; font-weight: 600; font-family: inherit;
  transition: color var(--nv3-dur-fast, .15s);
}
.nv3-post-act svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nv3-post-act:hover { color: var(--nv3-paper2); }
.nv3-post-like:hover { color: #e11d48; }
.nv3-post-like.is-liked { color: #e11d48; }
.nv3-post-like.is-liked svg { fill: #e11d48; stroke: #e11d48; }
.nv3-post-stat { display: inline-flex; align-items: center; gap: 6px; color: var(--nv3-muted); font-size: 13px; font-weight: 600; margin-left: auto; }
.nv3-post-stat svg { fill: none; stroke: currentColor; stroke-width: 2; }
.nv3-thread-screen { z-index: 10001; }
.nv3-thread-label { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--nv3-muted); padding: 14px 4px 8px; border-bottom: 1px solid var(--nv3-glass-border); }
.nv3-post--parent .nv3-post-text { font-size: 16px; }
