/* ─────────────────────────────────────────────────────────────────────────────
   NexPrep — Main Stylesheet
   Design: Medical-grade clarity with confident authority.
   Palette: Deep navy + clinical teal + warm off-white.
   Typography: Sora (UI) + DM Serif Display (headings) + JetBrains Mono (code/scores)
───────────────────────────────────────────────────────────────────────────── */

/* ── Design tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Brand colors */
  --navy:        #0d1b2a;
  --navy-mid:    #1a2f45;
  --navy-soft:   #243b55;
  --teal:        #0ea5a0;
  --teal-light:  #14c4be;
  --teal-pale:   #e0f7f6;
  --cream:       #f8f6f1;
  --cream-mid:   #ede9e0;
  --white:       #ffffff;

  /* Semantic */
  --color-success: #16a34a;
  --color-danger:  #dc2626;
  --color-warning: #d97706;
  --color-info:    #2563eb;

  /* Text */
  --text-primary:   #0d1b2a;
  --text-secondary: #445566;
  --text-muted:     #778899;
  --text-on-dark:   #e8f4f3;

  /* Surfaces */
  --surface-0: #ffffff;
  --surface-1: #f8f6f1;
  --surface-2: #ede9e0;
  --surface-dark: #0d1b2a;

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-ui:      'Sora', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* Spacing scale */
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(13,27,42,.06), 0 1px 2px rgba(13,27,42,.04);
  --shadow-md:  0 4px 16px rgba(13,27,42,.10), 0 1px 4px rgba(13,27,42,.06);
  --shadow-lg:  0 12px 40px rgba(13,27,42,.14), 0 4px 12px rgba(13,27,42,.08);

  /* Transitions */
  --t-fast:   150ms ease;
  --t-normal: 250ms ease;
  --t-slow:   400ms ease;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--surface-0);
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
  position: relative;
  left: 0;
  margin: 0;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--teal-light); }
button { cursor: pointer; font-family: var(--font-ui); }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 400;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: 1.25rem; font-family: var(--font-ui); font-weight: 600; }
h5 { font-size: 1.1rem; font-family: var(--font-ui); font-weight: 600; }
p { margin-bottom: var(--sp-4); }
.nex-eyebrow {
  font-family: var(--font-ui);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.nex-container { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-6); width: 100%; }
.nex-container--narrow { max-width: 780px; }
.nex-container--wide   { max-width: 1440px; }
@media (max-width: 480px) {
  .nex-container { padding: 0 16px; }
}
.nex-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); }
.nex-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-6); }
.nex-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-6); }
@media (max-width: 900px) { .nex-grid-3,.nex-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .nex-grid-2,.nex-grid-3,.nex-grid-4 { grid-template-columns: 1fr; } }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.nex-btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: .9rem; font-weight: 600; font-family: var(--font-ui);
  transition: all var(--t-normal);
  border: 2px solid transparent;
  white-space: nowrap;
}
.nex-btn--primary {
  background: var(--teal); color: var(--white);
  border-color: var(--teal);
}
.nex-btn--primary:hover {
  background: var(--teal-light); border-color: var(--teal-light);
  color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.nex-btn--outline {
  background: transparent; color: var(--teal); border-color: var(--teal);
}
.nex-btn--outline:hover { background: var(--teal); color: var(--white); }
.nex-btn--dark {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.nex-btn--dark:hover { background: var(--navy-mid); color: var(--white); }
.nex-btn--ghost {
  background: transparent; color: var(--text-secondary);
  border-color: var(--cream-mid);
}
.nex-btn--ghost:hover { background: var(--surface-1); color: var(--text-primary); }
.nex-btn--sm { padding: 8px 18px; font-size: .8rem; }
.nex-btn--lg { padding: 16px 40px; font-size: 1rem; }
.nex-btn[disabled] { opacity: .5; pointer-events: none; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.nex-card {
  background: var(--surface-0);
  border: 1px solid var(--cream-mid);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-normal), transform var(--t-normal);
}
.nex-card:hover { box-shadow: var(--shadow-md); }
.nex-card--hover:hover { transform: translateY(-3px); }
.nex-card--dark {
  background: var(--navy-mid); border-color: var(--navy-soft);
  color: var(--text-on-dark);
}
.nex-card--teal { background: var(--teal-pale); border-color: var(--teal); }

/* ── Badges / Pills ─────────────────────────────────────────────────────────── */
.nex-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: .72rem; font-weight: 600; font-family: var(--font-ui);
  text-transform: uppercase; letter-spacing: .04em;
}
.nex-badge--teal    { background: var(--teal-pale); color: #0a6e6b; }
.nex-badge--navy    { background: var(--navy); color: var(--teal-light); }
.nex-badge--success { background: #dcfce7; color: #15803d; }
.nex-badge--danger  { background: #fee2e2; color: #b91c1c; }
.nex-badge--warning { background: #fef3c7; color: #92400e; }
.nex-badge--gray    { background: var(--surface-2); color: var(--text-secondary); }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.nex-header {
  position: sticky; top: 0; z-index: 1000;
  background: linear-gradient(135deg, #0a1628 0%, #0d1b2a 60%, #0f2235 100%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(14,165,160,.18);
  box-shadow: 0 1px 0 rgba(14,165,160,.08), 0 4px 24px rgba(0,0,0,.25);
}

/* Top accent line */
.nex-header::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--teal) 30%, var(--teal-light) 60%, transparent 100%);
  opacity: .7;
}

.nex-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-8); height: 72px; max-width: 1440px; margin: 0 auto;
  gap: 16px;
}

/* ── Logo ── */
.nex-logo {
  display: flex; align-items: center; gap: var(--sp-3);
  text-decoration: none; flex-shrink: 0;
}
.nex-logo__mark {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--teal) 0%, #0b8a86 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.15rem; color: var(--white);
  box-shadow: 0 0 0 1px rgba(14,165,160,.4), 0 4px 12px rgba(14,165,160,.25);
  transition: box-shadow var(--t-normal), transform var(--t-normal);
}
.nex-logo:hover .nex-logo__mark {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(14,165,160,.6), 0 6px 18px rgba(14,165,160,.35);
}
.nex-logo__text {
  display: flex; flex-direction: column; gap: 1px;
}
.nex-logo__name {
  font-family: var(--font-display); font-size: 1.45rem;
  color: var(--white); letter-spacing: -.02em; line-height: 1;
}
.nex-logo__name span { color: var(--teal-light); }
.nex-logo__tagline {
  font-size: .62rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .12em; color: rgba(14,165,160,.65); line-height: 1;
}

/* ── Nav ── */
.nex-nav { display: flex; align-items: center; }
.nex-nav__list {
  display: flex; align-items: center; gap: 2px;
  list-style: none; margin: 0; padding: 0;
}
.nex-nav__list li a {
  color: rgba(232,244,243,.65);
  font-size: .9rem; font-weight: 500;
  padding: 7px 16px; border-radius: var(--radius-pill);
  transition: all .15s; display: block; white-space: nowrap;
  letter-spacing: .01em;
}
.nex-nav__list li a:hover {
  color: var(--white);
  background: rgba(255,255,255,.07);
}
.nex-nav__list li a.current-menu-item {
  color: var(--teal-light);
  background: rgba(14,165,160,.12);
  font-weight: 600;
}

/* ── Header right: badge + actions ── */
.nex-header__right { display: flex; align-items: center; gap: 12px; }
/* Mobile-right is hidden on desktop — only visible on mobile via dashboard.css */
.nex-header__mobile-right { display: none; }

/* NCLEX pill badge */
.nex-header__badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(14,165,160,.08);
  border: 1px solid rgba(14,165,160,.2);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: .7rem; font-weight: 700;
  color: var(--teal-light); letter-spacing: .06em;
  white-space: nowrap; text-transform: uppercase;
}
.nex-header__badge::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-light);
  box-shadow: 0 0 6px var(--teal-light);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.7); }
}

/* Auth button group */
.nex-header__actions { display: flex; align-items: center; gap: 8px; }
.nex-header__actions .nex-btn--ghost {
  color: rgba(232,244,243,.7); border-color: rgba(255,255,255,.15);
  padding: 8px 18px; font-size: .85rem;
}
.nex-header__actions .nex-btn--ghost:hover {
  color: #fff; background: rgba(255,255,255,.08);
}
.nex-header__actions .nex-btn--primary {
  padding: 9px 20px; font-size: .85rem; font-weight: 700;
  background: linear-gradient(135deg, var(--teal) 0%, #0b8a86 100%);
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(14,165,160,.3);
}
.nex-header__actions .nex-btn--primary:hover {
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--teal) 100%);
  box-shadow: 0 4px 20px rgba(14,165,160,.45);
  transform: translateY(-1px);
}

/* Logged-in user pill */
.nex-header__user-pill {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(14,165,160,.2);
  border-radius: 999px; padding: 5px 14px 5px 5px;
  text-decoration: none; transition: all .2s;
  cursor: pointer;
}
.nex-header__user-pill:hover {
  background: rgba(14,165,160,.1);
  border-color: rgba(14,165,160,.4);
}
.nex-header__avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0b8a86);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
  flex-shrink: 0; font-family: var(--font-ui);
}
.nex-header__user-info {
  display: flex; flex-direction: column; gap: 1px;
}
.nex-header__username {
  font-size: .82rem; font-weight: 600; color: #fff; line-height: 1.1;
}
.nex-header__plan {
  font-size: .65rem; color: var(--teal-light);
  font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}
.nex-header__logout {
  display: flex; align-items: center; gap: 6px;
  color: rgba(232,244,243,.4); font-size: .82rem; font-weight: 500;
  padding: 7px 14px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.08);
  text-decoration: none; transition: all .15s; white-space: nowrap;
}
.nex-header__logout:hover {
  color: #fca5a5; background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.2);
}

/* Mobile nav toggle */
.nex-nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: var(--sp-2);
}
.nex-nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all var(--t-normal);
}
@media (max-width: 900px) {
  .nex-header__badge { display: none; }
@media (max-width: 1100px) {
  .nex-header__badge { display: none; }
}
}
@media (max-width: 768px) {
  .nex-nav-toggle { display: flex; }
  .nex-nav { display: none; }
  .nex-nav.is-open {
    display: block;
    position: absolute; top: 72px; left: 0; right: 0;
    background: #0a1628;
    border-top: 1px solid rgba(14,165,160,.15);
    padding: var(--sp-4);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }
  .nex-nav__list { flex-direction: column; align-items: flex-start; gap: var(--sp-2); }
  .nex-nav__list li a { padding: 10px 14px; width: 100%; }
  .nex-header__inner { padding: 0 var(--sp-5); }
}

/* ── Hero section ────────────────────────────────────────────────────────────── */
.nex-hero {
  background: var(--navy);
  padding: var(--sp-20) 0 var(--sp-16);
  position: relative; overflow: hidden;
  width: 100%;
}
.nex-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(14,165,160,.12), transparent);
  pointer-events: none;
}
.nex-hero__inner {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center; gap: var(--sp-16);
}
.nex-hero__eyebrow { margin-bottom: var(--sp-4); }
.nex-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: var(--sp-6);
}
.nex-hero__title em { color: var(--teal-light); font-style: italic; }
.nex-hero__subtitle {
  font-size: 1.1rem; color: rgba(232,244,243,.75);
  margin-bottom: var(--sp-8); max-width: 480px;
}
.nex-hero__actions { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.nex-hero__stats {
  display: flex; gap: var(--sp-8); margin-top: var(--sp-10);
  padding-top: var(--sp-8);
  border-top: 1px solid rgba(255,255,255,.1);
}
.nex-hero__stat-num {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 500;
  color: var(--teal-light);
}
.nex-hero__stat-label { font-size: .8rem; color: rgba(232,244,243,.6); margin-top: 2px; }
.nex-hero__visual { display: flex; justify-content: center; align-items: center; }

@media (max-width: 900px) {
  .nex-hero { padding: var(--sp-12) 0 var(--sp-10); }
  .nex-hero__inner { grid-template-columns: 1fr; }
  .nex-hero__visual { display: none; }
}
@media (max-width: 480px) {
  .nex-hero { padding: 48px 0 40px; }
  .nex-hero__title { font-size: clamp(2rem, 8vw, 2.8rem); }
  .nex-hero__subtitle { font-size: .95rem; max-width: 100%; }
  .nex-hero__actions {
    flex-direction: column; align-items: stretch; gap: 10px;
  }
  .nex-hero__actions .nex-btn {
    text-align: center; width: 100%;
  }
  .nex-hero__stats { gap: var(--sp-6); flex-wrap: wrap; }
  .nex-hero__stat-num { font-size: 1.5rem; }
}

/* ── Mock exam card (hero visual) ────────────────────────────────────────────── */
.nex-mock-card {
  background: var(--navy-mid);
  border: 1px solid rgba(14,165,160,.3);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  width: 420px; max-width: 100%;
  box-shadow: var(--shadow-lg);
}
.nex-mock-card__header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--sp-6);
}
.nex-mock-card__label { font-size: .75rem; font-weight: 600; color: var(--teal-light); letter-spacing: .08em; text-transform: uppercase; }
.nex-mock-card__timer { font-family: var(--font-mono); font-size: .9rem; color: rgba(232,244,243,.7); }
.nex-mock-card__q { font-size: .95rem; color: var(--text-on-dark); line-height: 1.6; margin-bottom: var(--sp-6); }
.nex-mock-card__options { display: flex; flex-direction: column; gap: var(--sp-2); }
.nex-mock-card__opt {
  background: rgba(14,165,160,.08);
  border: 1px solid rgba(14,165,160,.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: .875rem; color: rgba(232,244,243,.8);
  display: flex; align-items: flex-start; gap: var(--sp-3);
  transition: all var(--t-fast);
}
.nex-mock-card__opt:hover {
  background: rgba(14,165,160,.16); border-color: var(--teal);
  color: var(--white);
}
.nex-mock-card__opt.is-selected { background: var(--teal); border-color: var(--teal); color: var(--white); }
.nex-mock-card__opt.is-correct  { background: rgba(22,163,74,.2); border-color: #16a34a; }
.nex-mock-card__opt.is-wrong    { background: rgba(220,38,38,.15); border-color: #dc2626; }
.nex-opt-key {
  min-width: 22px; height: 22px;
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}

/* ── Feature section ─────────────────────────────────────────────────────────── */
.nex-section { padding: var(--sp-20) 0; }
.nex-section--alt { background: var(--surface-1); }
.nex-section--dark { background: var(--navy); }
.nex-section__header { text-align: center; margin-bottom: var(--sp-12); max-width: 600px; margin-left: auto; margin-right: auto; }
.nex-feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-6); }
@media (max-width: 900px) { .nex-feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .nex-feature-grid { grid-template-columns: 1fr; } }
.nex-feature-icon {
  width: 48px; height: 48px;
  background: var(--teal-pale);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
  font-size: 1.4rem;
}
.nex-feature-title { font-size: 1rem; font-weight: 600; font-family: var(--font-ui); margin-bottom: var(--sp-2); }
.nex-feature-text  { font-size: .875rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Pricing section ─────────────────────────────────────────────────────────── */
.nex-pricing-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: var(--sp-5);
  align-items: start;
}
@media (max-width: 1100px) { .nex-pricing-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .nex-pricing-grid { grid-template-columns: 1fr; } }
.nex-plan {
  border: 2px solid var(--cream-mid);
  border-radius: var(--radius-xl);
  padding: var(--sp-8);
  background: var(--surface-0);
  position: relative;
  transition: all var(--t-normal);
}
.nex-plan:hover { border-color: var(--teal); box-shadow: var(--shadow-md); }
.nex-plan--featured {
  border-color: var(--teal);
  background: var(--navy);
  color: var(--text-on-dark);
}
.nex-plan--featured h4,
.nex-plan--featured .nex-plan__price,
.nex-plan--featured .nex-plan__period { color: var(--text-on-dark); }
.nex-plan--featured .nex-plan__feature { color: rgba(232,244,243,.8); }
.nex-plan__badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: var(--white);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 14px; border-radius: var(--radius-pill);
}
.nex-plan__name { font-size: .8rem; font-weight: 600; color: var(--teal); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-3); }
.nex-plan__price { font-family: var(--font-mono); font-size: 2.8rem; font-weight: 500; line-height: 1; }
.nex-plan__period { font-size: .8rem; color: var(--text-muted); margin-top: 4px; margin-bottom: var(--sp-6); }
.nex-plan__divider { border: none; border-top: 1px solid var(--cream-mid); margin: var(--sp-5) 0; }
.nex-plan--featured .nex-plan__divider { border-color: rgba(255,255,255,.1); }
.nex-plan__features { margin-bottom: var(--sp-6); }
.nex-plan__feature {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  font-size: .875rem; color: var(--text-secondary); margin-bottom: var(--sp-3);
}
.nex-plan__feature-icon { color: var(--teal); flex-shrink: 0; font-weight: 700; margin-top: 2px; }
.nex-plan__feature-icon.off { color: var(--text-muted); }

/* ── Testimonials ─────────────────────────────────────────────────────────────── */
.nex-testimonial {
  background: var(--surface-0);
  border: 1px solid var(--cream-mid);
  border-radius: var(--radius-xl);
  padding: var(--sp-7);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.nex-testimonial:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.nex-testimonial__stars { color: #f59e0b; font-size: 1rem; margin-bottom: var(--sp-3); letter-spacing: 2px; }
.nex-testimonial__text {
  font-size: .95rem; line-height: 1.7; color: var(--text-primary);
  margin-bottom: var(--sp-5); font-style: italic; flex: 1;
}
.nex-testimonial__author-row {
  display: flex; align-items: center; gap: 12px;
  padding-top: var(--sp-4); border-top: 1px solid var(--cream-mid);
}
.nex-testimonial__avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #0b8a86);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; color: #fff; flex-shrink: 0;
}
.nex-testimonial__name {
  font-size: .875rem; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.nex-testimonial__passed {
  font-size: .65rem; font-weight: 700; background: #dcfce7; color: #15803d;
  padding: 2px 7px; border-radius: 20px; letter-spacing: .04em;
}
.nex-testimonial__meta { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.nex-testimonial__author { font-size: .85rem; font-weight: 600; color: var(--text-secondary); }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.nex-form-group { margin-bottom: var(--sp-5); }
.nex-label {
  display: block; font-size: .875rem; font-weight: 500;
  color: var(--text-secondary); margin-bottom: var(--sp-2);
}
.nex-input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--cream-mid);
  border-radius: var(--radius-md);
  font-family: var(--font-ui); font-size: .9rem;
  color: var(--text-primary); background: var(--surface-0);
  transition: border-color var(--t-fast);
}
.nex-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,165,160,.12); }
.nex-select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--cream-mid);
  border-radius: var(--radius-md);
  font-family: var(--font-ui); font-size: .9rem;
  color: var(--text-primary); background: var(--surface-0);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23778899' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  cursor: pointer;
}
.nex-select:focus { outline: none; border-color: var(--teal); }

/* ── Progress bars ────────────────────────────────────────────────────────────── */
.nex-progress { height: 8px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.nex-progress__fill {
  height: 100%; border-radius: var(--radius-pill);
  background: var(--teal);
  transition: width .6s ease;
}
.nex-progress__fill--success { background: var(--color-success); }
.nex-progress__fill--danger  { background: var(--color-danger); }
.nex-progress__fill--warning { background: var(--color-warning); }

/* ── Alert boxes ─────────────────────────────────────────────────────────────── */
.nex-alert {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: .9rem;
  display: flex; gap: var(--sp-3); align-items: flex-start;
  border-left: 4px solid;
}
.nex-alert--success { background: #f0fdf4; border-color: #16a34a; color: #15803d; }
.nex-alert--danger  { background: #fef2f2; border-color: #dc2626; color: #b91c1c; }
.nex-alert--warning { background: #fffbeb; border-color: #d97706; color: #92400e; }
.nex-alert--info    { background: #eff6ff; border-color: #2563eb; color: #1d4ed8; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.nex-footer {
  background: var(--navy);
  padding: var(--sp-16) 0 var(--sp-8);
  border-top: 1px solid rgba(14,165,160,.15);
  /* Must always span full page width, never trapped in a grid column */
  width: 100%;
  display: block;
  clear: both;
  position: relative;
  z-index: 1;
  /* Break out of any parent grid */
  grid-column: 1 / -1 !important;
}
.nex-footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-10); margin-bottom: var(--sp-12);
}
@media (max-width: 900px) { .nex-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .nex-footer__grid { grid-template-columns: 1fr; } }
.nex-footer__brand-desc { font-size: .875rem; color: rgba(232,244,243,.6); margin-top: var(--sp-4); line-height: 1.7; }
.nex-footer__heading { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-light); margin-bottom: var(--sp-4); font-family: var(--font-ui); }
.nex-footer__links { display: flex; flex-direction: column; gap: var(--sp-2); }
.nex-footer__links a { font-size: .875rem; color: rgba(232,244,243,.65); transition: color var(--t-fast); }
.nex-footer__links a:hover { color: var(--teal-light); }
.nex-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: var(--sp-6);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--sp-4);
}
.nex-footer__copy { font-size: .8rem; color: rgba(232,244,243,.4); }

/* ── Utilities ────────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-2  { margin-top: var(--sp-2); } .mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); } .mt-8  { margin-top: var(--sp-8); }
.mb-4  { margin-bottom: var(--sp-4); } .mb-8 { margin-bottom: var(--sp-8); }
.flex  { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: var(--sp-2); } .gap-4 { gap: var(--sp-4); } .gap-6 { gap: var(--sp-6); }
.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.nex-spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--cream-mid);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Paywall gate ─────────────────────────────────────────────────────────────── */
.nex-gate {
  text-align: center; padding: var(--sp-16) var(--sp-8);
  background: var(--surface-1); border-radius: var(--radius-xl);
  border: 2px dashed var(--cream-mid);
}
.nex-gate__title { font-size: 1.4rem; margin-bottom: var(--sp-3); }
.nex-gate__text  { color: var(--text-secondary); margin-bottom: var(--sp-6); }

/* ── Hide WordPress admin bar for all non-admin visitors ─────────────────────
   Belt-and-suspenders: PHP show_admin_bar(false) handles it server-side,
   this CSS handles any edge cases where it still loads client-side.      */
#wpadminbar,
#wp-admin-bar-root-default,
.admin-bar .nex-header { margin-top: 0 !important; }

/* Admin users on frontend — push content below admin bar */
.admin-bar .nex-header { top: var(--wp-admin--admin-bar--height, 32px) !important; }

/* Non-admin users — hide completely */
body:not(.admin-bar) #wpadminbar { display: none !important; }

/* Global safety: ensure script tags never render as visible text.
   This is a standard browser default but Android Chrome sometimes
   shows wp_localize_script CDATA output as visible text. */
script {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}
