/* ==========================================================================
   NepaEducation Design System  (public site)
   --------------------------------------------------------------------------
   Stack: Laravel Blade + Bootstrap 4.1 (loaded before this file).
   Rules:
     1. Components never use raw colours — only the semantic tokens below.
     2. New looks = new variant classes (.btn-*, .nx-card--*, .nx-icon--*),
        never inline style overrides in Blade.
     3. Spacing follows an 8px scale (--space-*).
     4. Motion uses transform/opacity only and honours prefers-reduced-motion.

   Palette — taken directly from the NepaEducation logo (logo.svg):
     #34449C royal blue   → Primary   : trust, focus, technology
     #242062 deep indigo  → Navy      : premium, calm backdrop for hero & footer
     #333366 indigo       → Foreground: wordmark colour, used for headings
     #6664AD periwinkle   → Glow      : highlights / gradients on dark
     #D32027 brand red    → Accent    : energy, urgency, calls-to-action
     (#B31F24 / #E71E25 are the red's hover/bright shades)
   Harmony: complementary (indigo 231° ↔ red 358°).
   All text/background pairs below meet WCAG AA (≥ 4.5:1 for body text).
   ========================================================================== */

/* :root tokens live in nepa-tokens.css (loaded before this file) */

/* ==========================================================================
   Base
   ========================================================================== */
body.nx {
  font-family: var(--font-sans);
  color: hsl(var(--text));
  background: hsl(var(--background));
  font-size: 16px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* Base element styles use :where() → zero specificity, so every component
   rule (e.g. headings on dark surfaces) always wins. Never raise these. */
:where(body.nx) :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
  font-family: inherit; color: hsl(var(--foreground)); font-weight: 700; letter-spacing: -.01em;
}
:where(body.nx) :where(a) { color: hsl(var(--primary)); transition: var(--transition-fast); }
:where(body.nx) :where(a:hover) { color: hsl(var(--primary-hover)); text-decoration: none; }

/* ---- Contrast contract ----------------------------------------------------
   .nx-on-dark  : any dark surface (hero, page hero, CTA, footer) → light text
   .nx-on-light : any light surface (cards, forms, sections)      → dark text
   Components below apply these pairs; never put --foreground/--text on a
   --navy/--primary background, nor --on-dark on a white/--surface background. */
.nx-hero, .nx-page-hero, .nx-cta, .nx-footer { color: hsl(var(--on-dark-muted)); }
.nx-hero :where(h1, h2, h3, h4, h5, h6, strong),
.nx-page-hero :where(h1, h2, h3, h4, h5, h6, strong),
.nx-cta :where(h1, h2, h3, h4, h5, h6, strong),
.nx-footer :where(h1, h2, h3, h4, h5, h6, strong) { color: hsl(var(--primary-foreground)); }
.nx-hero :where(p, li, span, small), .nx-page-hero :where(p, li, span, small),
.nx-cta :where(p, li, span, small) { color: inherit; }
.nx-hero :where(a:not(.btn)), .nx-page-hero :where(a:not(.btn)),
.nx-cta :where(a:not(.btn)), .nx-footer :where(a:not(.btn)) { color: hsl(var(--primary-glow)); }
/* Light cards placed inside dark surfaces reset back to dark text */
.nx-hero .form-box, .nx-hero .nx-auth-card { color: hsl(var(--text)); }
.nx-hero .form-box :where(h1, h2, h3, h4, h5, h6, strong, label),
.nx-hero .nx-auth-card :where(h1, h2, h3, h4, h5, h6, strong, label) { color: hsl(var(--foreground)); }
.nx-hero .form-box :where(p, span, small, li, div), .nx-hero .nx-auth-card :where(p, span, small, li, div) { color: inherit; }
.nx-hero .form-box :where(a:not(.btn)), .nx-hero .nx-auth-card :where(a:not(.btn)) { color: hsl(var(--primary)); }
body.nx .text-muted { color: hsl(var(--muted)) !important; }
body.nx .site-wrap { overflow: visible; }

/* Visible keyboard focus everywhere */
.nx a:focus-visible, .nx button:focus-visible, .nx .btn:focus-visible,
.nx [tabindex]:focus-visible, .nx .nav-link:focus-visible {
  outline: 0; box-shadow: var(--focus-ring); border-radius: var(--radius-sm);
}

/* Skip link */
.nx-skip { position: absolute; left: -9999px; top: var(--space-1); z-index: 2000; background: hsl(var(--background)); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); }
.nx-skip:focus { left: var(--space-2); }

/* Utilities */
.nx-gap-1 { gap: var(--space-1); }
.nx-gap-2 { gap: var(--space-2); }
.nx-narrow { max-width: 880px; }
@media (min-width: 768px) { .d-md-grid { display: grid !important; } }

/* ==========================================================================
   Buttons — variants
   ========================================================================== */
.nx .btn {
  border-radius: var(--radius); font-weight: 600; padding: .62rem 1.15rem; font-size: .95rem;
  transition: var(--transition-smooth); border-width: 1px;
}
.nx .btn:active { transform: translateY(1px); }
.nx .btn:disabled, .nx .btn.disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.nx .btn-primary            { background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.nx .btn-primary:hover,
.nx .btn-primary:focus      { background: hsl(var(--primary-hover)); border-color: hsl(var(--primary-hover)); color: hsl(var(--primary-foreground)); box-shadow: var(--shadow-glow); }
.nx .btn-outline-primary    { color: hsl(var(--primary)); border-color: hsl(var(--input-border)); background: hsl(var(--background)); }
.nx .btn-outline-primary:hover { background: hsl(var(--primary-soft)); color: hsl(var(--primary-hover)); border-color: hsl(var(--primary)); }
.nx .btn-hero               { background: hsl(var(--background)); color: hsl(var(--navy)); border-color: transparent; }
.nx .btn-hero:hover         { color: hsl(var(--navy)); transform: translateY(-2px) scale(1.02); box-shadow: var(--shadow-lg); }
.nx .btn-ghost-dark         { color: hsl(var(--primary-foreground)); border-color: hsl(0 0% 100% / .4); background: transparent; }
.nx .btn-ghost-dark:hover   { background: hsl(0 0% 100% / .12); color: hsl(var(--primary-foreground)); }
.nx .btn-accent             { background: hsl(var(--accent)); border-color: hsl(var(--accent)); color: hsl(var(--accent-foreground)); }
.nx .btn-accent:hover,
.nx .btn-accent:focus       { background: hsl(var(--accent-hover)); border-color: hsl(var(--accent-hover)); color: hsl(var(--accent-foreground)); box-shadow: 0 8px 22px hsl(var(--accent) / .30); }
.nx .btn-google {
  display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%;
  background: hsl(var(--background)); color: hsl(var(--foreground)); border-color: hsl(var(--border));
}
.nx .btn-google:hover { background: hsl(var(--surface)); color: hsl(var(--foreground)); border-color: hsl(var(--input-border)); }
.nx .btn-google .fa-google { color: #ea4335; } /* Google brand mark colour (exception) */

/* ==========================================================================
   Forms
   ========================================================================== */
.nx .form-control {
  height: auto; min-height: 46px; border-radius: var(--radius); border: 1px solid hsl(var(--input-border));
  padding: .6rem .9rem; font-size: .95rem; color: hsl(var(--foreground)); background: hsl(var(--background));
  box-shadow: none; transition: var(--transition-fast);
}
.nx textarea.form-control { min-height: 120px; }
.nx .form-control::placeholder { color: hsl(var(--muted) / .8); }
.nx .form-control:focus { border-color: hsl(var(--primary)); box-shadow: var(--focus-ring); }
.nx .form-control.border-danger { border-color: hsl(var(--danger)) !important; box-shadow: 0 0 0 4px hsl(var(--danger) / .12); }
.nx label { font-weight: 600; font-size: .88rem; color: hsl(var(--foreground)); margin-bottom: .35rem; }
.nx .custom-control-label { font-weight: 500; color: hsl(var(--text)); }
.nx .custom-control-input:checked ~ .custom-control-label::before { background: hsl(var(--primary)); border-color: hsl(var(--primary)); }
.nx .divider-text { display: flex; align-items: center; gap: .75rem; color: hsl(var(--muted)); font-size: .82rem; margin: var(--space-2) 0; }
.nx .divider-text::before, .nx .divider-text::after { content: ""; flex: 1; height: 1px; background: hsl(var(--border)); }
.nx .alert { border-radius: var(--radius); border: 0; }
.nx .alert-success { background: hsl(var(--success-soft)); color: hsl(var(--success)); }
.nx .alert-danger  { background: hsl(var(--danger-soft));  color: hsl(var(--danger)); }
.nx .alert-primary { background: hsl(var(--primary-soft)); color: hsl(var(--primary-hover)); }

/* ==========================================================================
   Navbar
   ========================================================================== */
.nx-nav {
  position: sticky; top: 0; z-index: 1030;
  background: hsl(var(--background) / .92);
  backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid hsl(var(--border));
  transition: box-shadow .3s var(--ease);
}
.nx-nav::before { content: ""; display: block; height: 3px; background: var(--gradient-brand-bar); }
.nx-nav.is-scrolled { box-shadow: var(--shadow-md); }
.nx-nav .navbar-brand img { height: 42px; width: auto; }
.nx-nav .nav-link {
  color: hsl(var(--text)) !important; font-weight: 600; font-size: .94rem;
  padding: .5rem .85rem !important; border-radius: var(--radius-sm); transition: var(--transition-fast);
}
.nx-nav .nav-link:hover, .nx-nav .nav-item.active > .nav-link { color: hsl(var(--primary)) !important; background: hsl(var(--primary-soft)); }
.nx-nav .dropdown-menu { border: 1px solid hsl(var(--border)); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: .4rem; }
.nx-nav .dropdown-item { border-radius: var(--radius-sm); font-weight: 500; padding: .45rem .8rem; }
.nx-nav .dropdown-item:hover { background: hsl(var(--primary-soft)); color: hsl(var(--primary)); }
.nx-nav .navbar-toggler { border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: .4rem .65rem; color: hsl(var(--foreground)); }
.nx-nav .nav-cta { display: flex; gap: var(--space-1); }
.nx-nav .nav-cta .btn { padding: .5rem 1rem; }
@media (max-width: 991.98px) {
  .nx-nav .navbar-collapse { padding: var(--space-2) 0 var(--space-1); }
  .nx-nav .nav-cta { margin-top: var(--space-1); }
  .nx-nav .nav-cta .btn { flex: 1; }
}

/* ==========================================================================
   Hero (home / login / register)
   ========================================================================== */
.nx-hero { position: relative; overflow: hidden; color: hsl(var(--on-dark)); background: var(--gradient-hero); padding: var(--space-10) 0 var(--space-12); }
.nx-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(hsl(0 0% 100%) 1px, transparent 1px); background-size: 22px 22px;
}
.nx-hero .container { position: relative; z-index: 1; }
.nx-hero h1 { color: hsl(var(--primary-foreground)); font-size: var(--fs-hero); line-height: 1.12; font-weight: 800; margin-bottom: var(--space-2); }
.nx-hero h1 .hl { color: hsl(var(--primary-glow)); position: relative; white-space: nowrap; }
.nx-hero h1 .hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .12em; border-radius: 4px;
  background: hsl(var(--accent)); opacity: .9;
}
.nx-hero .lead { color: hsl(var(--on-dark-muted)); font-size: 1.12rem; max-width: 34rem; }
.nx-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: hsl(var(--primary-glow)); background: hsl(0 0% 100% / .08);
  border: 1px solid hsl(0 0% 100% / .14); padding: .35rem .8rem; border-radius: 999px; margin-bottom: var(--space-2);
}
.nx-eyebrow .fa { color: hsl(var(--accent)); }
.nx-hero-points { list-style: none; padding: 0; margin: var(--space-3) 0 0; gap: .7rem; }
.nx-hero-points li { display: flex; align-items: center; gap: .7rem; color: hsl(var(--on-dark)); font-weight: 500; }
.nx-hero-points .fa {
  width: 28px; height: 28px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--primary-glow) / .16); color: hsl(var(--primary-glow)); font-size: .9rem;
}
.nx-hero-stats { flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-4); }
.nx-hero-stats strong { display: block; color: hsl(var(--primary-foreground)); font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.nx-hero-stats span { font-size: .85rem; color: hsl(var(--on-dark-muted)); }
.nx-hero-orb {
  position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -120px; pointer-events: none;
  background: radial-gradient(circle, hsl(var(--primary-glow) / .25), transparent 70%);
}

/* Auth card */
.nx-auth-card, .nx .form-box {
  background: hsl(var(--background)); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg);
  padding: var(--space-4); color: hsl(var(--text)); border: 0;
}
.nx-auth-card h3, .nx .form-box h3 { font-size: 1.4rem; margin-bottom: .25rem; }
.nx-auth-card .sub { color: hsl(var(--muted)); font-size: .92rem; margin-bottom: var(--space-2); }
.nx #signup-form .form-group { margin-bottom: .7rem; }
.nx .pwstrength_viewport_progress .progress { height: 8px; border-radius: var(--radius-sm); }
@media (max-width: 575.98px) { .nx-auth-card, .nx .form-box { padding: var(--space-3); } }

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */
.nx-page-hero { background: var(--gradient-page); color: hsl(var(--on-dark-muted)); padding: var(--space-6) 0 var(--space-8); position: relative; overflow: hidden; }
.nx-page-hero h1 { color: hsl(var(--primary-foreground)); font-size: var(--fs-h1); font-weight: 800; margin: .25rem 0 .5rem; }
.nx-page-hero p { margin: 0; max-width: 40rem; color: hsl(var(--on-dark-muted)); }
.nx-crumbs { font-size: .85rem; color: hsl(var(--on-dark-muted)); }
.nx-crumbs a { color: hsl(var(--primary-glow)) !important; }
.nx-crumbs .sep { margin: 0 .45rem; opacity: .6; }

/* ==========================================================================
   Sections
   ========================================================================== */
.nx-section { padding: var(--space-10) 0; }
.nx-section--alt { background: hsl(var(--surface)); }
.nx-section--flush-top { padding-top: 0; }
.nx-section-head { max-width: 40rem; margin: 0 auto var(--space-6); text-align: center; }
.nx-section-head--left { text-align: left; margin-left: 0; margin-bottom: var(--space-3); }
.nx-section-head .kicker { color: hsl(var(--accent)); font-weight: 700; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.nx-section-head h2 { font-size: var(--fs-h2); margin: .4rem 0 .6rem; }
.nx-section-head p { color: hsl(var(--muted)); margin: 0; }

/* ==========================================================================
   Cards — variants
   ========================================================================== */
.nx-card {
  background: hsl(var(--background)); border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg);
  padding: var(--space-3); box-shadow: var(--shadow-md); height: 100%; transition: var(--transition-smooth);
}
.nx-card--interactive:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: hsl(var(--primary) / .25); }
.nx-card--flat { box-shadow: none; }
.nx-card h3, .nx-card h4 { font-size: 1.12rem; margin: 0 0 .45rem; }
.nx-card p { color: hsl(var(--muted)); margin: 0; font-size: .95rem; }

.nx-icon {
  width: 52px; height: 52px; border-radius: var(--radius-lg); display: inline-flex; align-items: center; justify-content: center;
  background: hsl(var(--primary-soft)); color: hsl(var(--primary)); font-size: 1.35rem; margin-bottom: var(--space-2);
  transition: var(--transition-smooth);
}
.nx-card--interactive:hover .nx-icon { transform: scale(1.08) rotate(-4deg); }
.nx-icon--accent  { background: hsl(var(--accent-soft));  color: hsl(var(--accent-strong)); }
.nx-icon--success { background: hsl(var(--success-soft)); color: hsl(var(--success)); }
.nx-icon--danger  { background: hsl(var(--danger-soft));  color: hsl(var(--danger)); }
.nx-icon--violet  { background: hsl(var(--violet-soft));  color: hsl(var(--violet)); }
.nx-icon--info    { background: hsl(var(--info-soft));    color: hsl(var(--info)); }

.nx-step { position: relative; padding-left: 64px; }
.nx-step .num {
  position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%;
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-weight: 800;
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-glow);
}
.nx-step h4 { font-size: 1.08rem; margin-bottom: .3rem; }
.nx-step p { color: hsl(var(--muted)); margin: 0; }

.nx-cta {
  background: var(--gradient-primary); color: hsl(var(--on-dark)); border-radius: var(--radius-xl);
  padding: var(--space-6); box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.nx-cta::before {
  content: ""; position: absolute; width: 320px; height: 320px; right: -80px; bottom: -160px; border-radius: 50%;
  background: hsl(0 0% 100% / .08); pointer-events: none;
}
.nx-cta h2 { color: hsl(var(--primary-foreground)); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: .5rem; }
.nx-cta p { margin: 0; color: hsl(var(--on-dark)); }

.nx-prose { color: hsl(var(--text)); font-size: 1.04rem; line-height: 1.8; }
.nx-prose p { margin-bottom: var(--space-2); }
.nx-figure { border-radius: var(--radius-xl); background: hsl(var(--primary-soft)); padding: var(--space-4); }
.nx-figure img { width: 100%; height: auto; }

/* Contact */
.nx-contact-item { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-2) 0; border-bottom: 1px solid hsl(var(--border)); }
.nx-contact-item:last-child { border-bottom: 0; padding-bottom: 0; }
.nx-contact-item .nx-icon { margin: 0; flex: 0 0 46px; width: 46px; height: 46px; font-size: 1.1rem; }
.nx-contact-item small { display: block; color: hsl(var(--muted)); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.nx-contact-item span, .nx-contact-item a { color: hsl(var(--foreground)); font-weight: 600; }
.nx-map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid hsl(var(--border)); box-shadow: var(--shadow-md); }
.nx-map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* Syllabus */
.nx-list-link {
  display: flex; align-items: center; gap: var(--space-2); background: hsl(var(--background));
  border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); padding: var(--space-2) var(--space-3);
  color: hsl(var(--foreground)) !important; font-weight: 600; transition: var(--transition-smooth); height: 100%;
}
.nx-list-link:hover { border-color: hsl(var(--primary) / .35); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.nx-list-link .idx {
  flex: 0 0 40px; height: 40px; border-radius: var(--radius); background: hsl(var(--primary-soft)); color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.nx-list-link .fa-chevron-right { margin-left: auto; color: hsl(var(--muted)); transition: var(--transition-fast); }
.nx-list-link:hover .fa-chevron-right { transform: translateX(4px); color: hsl(var(--primary)); }
.nx-tree { list-style: none; padding-left: 0; margin: 0; }
.nx-tree .nx-tree { padding-left: 1.4rem; border-left: 2px solid hsl(var(--border)); margin: .35rem 0 .35rem .5rem; }
.nx-tree li { padding: .25rem 0; }
.nx-tree .lvl1 { font-weight: 700; color: hsl(var(--foreground)); font-size: 1.05rem; }
.nx-tree .lvl2 { font-weight: 600; color: hsl(var(--text)); }
.nx-tree .lvl3 { color: hsl(var(--muted)); font-size: .95rem; font-weight: 400; }
.nx-tree .no { color: hsl(var(--primary)); font-weight: 700; margin-right: .4rem; }
.nx-subject { border: 1px solid hsl(var(--border)); border-radius: var(--radius-lg); padding: var(--space-3); background: hsl(var(--background)); margin-bottom: var(--space-2); }

/* Media cards (notices / books / gallery) */
.nx-media-card {
  display: flex; flex-direction: column; background: hsl(var(--background)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); height: 100%; transition: var(--transition-smooth);
}
.nx-media-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.nx-media-card .thumb { aspect-ratio: 16 / 10; background-color: hsl(var(--primary-soft)); background-position: center; background-size: cover; }
.nx-media-card .body { padding: var(--space-3); display: flex; flex-direction: column; flex: 1; }
.nx-media-card .body p { color: hsl(var(--muted)); font-size: .95rem; flex: 1; }
.nx-empty { text-align: center; padding: var(--space-8) var(--space-3); border: 2px dashed hsl(var(--border)); border-radius: var(--radius-lg); color: hsl(var(--muted)); }
.nx-empty .fa { font-size: 2.2rem; color: hsl(var(--muted) / .6); margin-bottom: .8rem; display: block; }

/* Team / testimonials */
.nx-team img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: var(--space-2); border: 4px solid hsl(var(--primary-soft)); }
.nx-quote .fa-quote-left { color: hsl(var(--primary) / .3); font-size: 1.8rem; margin-bottom: .6rem; }
.nx-quote .who { display: flex; align-items: center; gap: .75rem; margin-top: var(--space-2); }
.nx-quote .who img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* Legal documents */
.nx-doc {
  max-width: 900px; margin: calc(-1 * var(--space-4)) auto var(--space-8); position: relative; z-index: 2;
  padding: clamp(20px, 5vw, 48px); background: hsl(var(--background)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); color: hsl(var(--text)); line-height: 1.75;
}
.nx-doc h2 { margin: var(--space-4) 0 10px; font-size: 1.3rem; }
.nx-doc h2:first-of-type { margin-top: var(--space-1); }
.nx-doc h3 { margin: 20px 0 var(--space-1); font-size: 1.05rem; }
.nx-doc p { margin: 9px 0 14px; }
.nx-doc ul, .nx-doc ol { padding-left: 1.4rem; margin: var(--space-1) 0 var(--space-2); }
.nx-doc li { margin: 5px 0; }
.nx-doc a { overflow-wrap: anywhere; }
.nx-doc .updated { color: hsl(var(--muted)); font-size: .95rem; padding-bottom: var(--space-2); border-bottom: 1px solid hsl(var(--border)); margin-bottom: var(--space-3); }
.nx-doc .contact { padding: var(--space-2) var(--space-3); margin-top: 18px; background: hsl(var(--primary-soft)); border-radius: var(--radius); }
.nx-doc .note { padding: 12px var(--space-2); background: hsl(var(--accent-soft)); border-left: 4px solid hsl(var(--accent)); border-radius: var(--radius-sm); color: hsl(var(--foreground)); }

/* ==========================================================================
   Footer
   ========================================================================== */
.nx-footer { background: hsl(var(--navy)); color: hsl(var(--on-dark-muted)); padding: var(--space-8) 0 0; font-size: .95rem; }
.nx-footer h5 { color: hsl(var(--primary-foreground)); font-size: .95rem; font-weight: 700; margin-bottom: var(--space-2); letter-spacing: .02em; }
.nx-footer a { color: hsl(var(--on-dark)) !important; }
.nx-footer a:hover { color: hsl(var(--primary-foreground)) !important; text-decoration: underline; }
.nx-footer ul { list-style: none; padding: 0; margin: 0; }
.nx-footer li { margin-bottom: .55rem; }
.nx-footer .brand img { height: 44px; margin-bottom: var(--space-2); }
.nx-footer .about { max-width: 22rem; }
.nx-footer .contact li { display: flex; gap: .65rem; }
.nx-footer .contact .fa { color: hsl(var(--primary-glow)); margin-top: .3rem; width: 16px; }
.nx-footer-bottom { border-top: 1px solid hsl(0 0% 100% / .12); margin-top: var(--space-6); padding: var(--space-3) 0; font-size: .87rem; }
.nx-footer-bottom .legal a { margin-left: 1.1rem; }

/* ==========================================================================
   Motion library
   ========================================================================== */
/* 1. Entrance */
@keyframes nx-fade-in-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes nx-fade-in    { from { opacity: 0; } to { opacity: 1; } }
.nx-animate-in        { animation: nx-fade-in-up .7s var(--ease) both; }
.nx-animate-in.delay-1 { animation-delay: .08s; }
.nx-animate-in.delay-2 { animation-delay: .16s; }
.nx-animate-in.delay-3 { animation-delay: .24s; }
/* Scroll-reveal (toggled by JS in master layout) */
.nx-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.nx-reveal.is-visible { opacity: 1; transform: none; }
/* 2. Hover/interaction — see .nx-card--interactive, .btn-hero, .nx-list-link */
/* 3. Ambient */
@keyframes nx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.nx-float { animation: nx-float 6s ease-in-out infinite; }
/* 4. Attention (use sparingly) */
@keyframes nx-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.nx-pulse { animation: nx-pulse 2s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .nx-reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Responsive
   Breakpoints follow Bootstrap 4: 576 / 768 / 992 / 1200 (mobile-first)
   ========================================================================== */
@media (max-width: 767.98px) {
  .nx-hero { padding: var(--space-6) 0 var(--space-8); }
  .nx-section { padding: var(--space-8) 0; }
  .nx-cta { padding: var(--space-4) var(--space-3); }
  .nx-footer-bottom .legal a { margin: 0 .6rem; display: inline-block; }
}

/* Neutralise legacy theme pieces that fight the new layout */
.nx .intro-section, .nx .slide-1 { min-height: 0 !important; height: auto !important; }
.nx .site-mobile-menu { display: none; }
.nx .swal-button { border-radius: var(--radius); background: hsl(var(--primary)); }

/* Contrast fixes: alerts rendered inside dark hero keep their own dark-on-tint text */
.nx-hero .alert, .nx-hero .alert a, .nx-hero .alert .close { color: inherit; }
.nx-hero .alert-success { color: hsl(var(--success)); }
.nx-hero .alert-danger  { color: hsl(var(--danger)); }
.nx-hero .alert-primary { color: hsl(var(--primary-hover)); }
.nx .form-control::placeholder { color: hsl(var(--muted)); opacity: 1; }

/* ---- Google sign-in: primary auth method ---- */
.nx .btn-google--primary {
  min-height: 54px; font-size: 1.02rem; font-weight: 700; gap: .75rem;
  background: hsl(var(--primary)); border-color: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-glow);
}
.nx .btn-google--primary:hover, .nx .btn-google--primary:focus {
  background: hsl(var(--primary-hover)); border-color: hsl(var(--primary-hover)); color: hsl(var(--primary-foreground));
  transform: translateY(-1px);
}
.nx .btn-google--primary .g-mark {
  width: 32px; height: 32px; border-radius: 50%; background: hsl(var(--background));
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px;
}
.nx .btn-google--primary span:last-child { color: hsl(var(--primary-foreground)); }
.nx .nx-google-hint { text-align: center; font-size: .82rem; color: hsl(var(--muted)) !important; margin: .55rem 0 0; }
.nx .nx-google-hint .fa { color: hsl(var(--accent)); }
.nx .nx-email-toggle { color: hsl(var(--muted)) !important; font-weight: 600; font-size: .9rem; margin-top: var(--space-1); text-decoration: none; }
.nx .nx-email-toggle:hover { color: hsl(var(--primary)) !important; }
.nx .nx-email-toggle .fa { transition: var(--transition-fast); }
.nx .nx-email-toggle[aria-expanded="true"] .fa { transform: rotate(180deg); }


/* ==========================================================================
   Spacing system (8px scale) — public site
   ========================================================================== */
.nx .btn { padding: 10px var(--space-2); line-height: 1.25; }
.nx .btn-lg { padding: 14px var(--space-3); font-size: 1rem; }
.nx .btn-sm { padding: 6px 12px; }
.nx .btn-google--primary { padding: 10px var(--space-2); }
.nx .form-group { margin-bottom: var(--space-2); }
.nx .form-control { padding: 10px 14px; }
.nx .form-row > [class*="col"] { padding-left: 6px; padding-right: 6px; }
.nx .form-row { margin-left: -6px; margin-right: -6px; }
.nx .divider-text { margin: var(--space-3) 0 var(--space-2); }
.nx .alert { padding: 12px var(--space-2); }
.nx-nav .navbar { padding: 12px 0; }
.nx-nav .navbar-nav .nav-item + .nav-item { margin-left: 4px; }
.nx-card h3, .nx-card h4 { margin-bottom: var(--space-1); }
.nx-icon { margin-bottom: var(--space-2); }
.nx-section-head { margin-bottom: var(--space-6); }
.nx-step + .nx-step { margin-top: var(--space-3); }
.nx-hero-points li + li { margin-top: 0; }
.nx-footer li { margin-bottom: var(--space-1); }
.nx-footer .brand img { margin-bottom: var(--space-2); }
/* row gutters: cards in grids get consistent vertical rhythm */
.nx-section .row > [class*="col"].mb-4 { margin-bottom: var(--space-3) !important; }
@media (max-width: 767.98px) {
  .nx-hero { padding: var(--space-6) 0 var(--space-8); }
  .nx-page-hero { padding: var(--space-4) 0 var(--space-6); }
  .nx-section { padding: var(--space-8) 0; }
  .nx-card, .nx-auth-card, .nx .form-box { padding: var(--space-3) var(--space-2); }
  .nx-doc { padding: var(--space-3) var(--space-2); }
  .nx-cta { padding: var(--space-4) var(--space-3); }
  .nx-section-head { margin-bottom: var(--space-4); }
}
