/* =========================================================
   NeuroAccess – Scoped School Design
   ONLY affects pages that have class="na-body"
   Safe for /desk
   ========================================================= */

.na-body {
  --na-green: #2D6A4F;
  --na-green-dark: #1B4332;
  --na-green-soft: #52B788;
  --na-mint: #B7E4C7;
  --na-peach: #FFD6A5;
  --na-cream: #FFF9F0;
  --na-cream-2: #FFF3E6;
  --na-card: #FFFFFF;
  --na-text: #2D2A26;
  --na-text-soft: #5C574F;
  --na-border: rgba(45, 106, 79, 0.10);
  --na-shadow: 0 10px 28px rgba(45, 106, 79, 0.08);
  --na-shadow-hover: 0 16px 36px rgba(45, 106, 79, 0.14);
  --na-radius: 22px;
  --na-side-w: 268px;
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", system-ui, -apple-system, sans-serif;

  font-family: var(--font-body);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(183, 228, 199, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 20%, rgba(255, 214, 165, 0.25) 0%, transparent 45%),
    var(--na-cream);
  color: var(--na-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.na-body *,
.na-body *::before,
.na-body *::after {
  box-sizing: border-box;
}

/* ---------- SHELL ---------- */
.na-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ---------- SIDEBAR ---------- */
.na-side {
  width: var(--na-side-w);
  min-width: var(--na-side-w);
  background: #fff;
  border-right: 1px solid var(--na-border);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  box-shadow: 4px 0 24px rgba(45, 106, 79, 0.04);
}

/* Larger NeuroAccess logo – 2× size */
.na-side .logo-box img {
  width: 220px !important;
  height: 160px !important;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.15);
}

.na-side .logo-box {
  gap: 16px;
  padding: 8px 10px;
  margin-bottom: 24px;
}

.na-side .logo-box span {
  font-size: 1.35rem;
  font-weight: 700;
}



.na-side .logo-box:hover {
  background: var(--na-cream-2);
}

.na-side .logo-box img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.12);
}

.na-side .logo-box span {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.na-side nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.na-side nav a {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--na-text-soft);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.18s ease;
}

.na-side nav a i {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: var(--na-cream-2);
  color: var(--na-green);
  font-size: 0.95rem;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.na-side nav a:hover {
  background: rgba(45, 106, 79, 0.06);
  color: var(--na-green-dark);
}

.na-side nav a:hover i {
  background: var(--na-mint);
  transform: scale(1.05);
}

.na-side nav a.active {
  background: rgba(45, 106, 79, 0.10);
  color: var(--na-green-dark);
  font-weight: 600;
}

.na-side nav a.active i {
  background: var(--na-green);
  color: #fff;
}

.na-side .desk-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-top: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--na-cream-2), #fff);
  text-decoration: none;
  color: var(--na-text);
  border: 1px solid var(--na-border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.na-side .desk-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--na-shadow);
}

.na-side .desk-link b { display: block; font-size: 0.9rem; }
.na-side .desk-link small { display: block; font-size: 0.75rem; color: var(--na-text-soft); margin-top: 2px; }
.na-side .desk-link i:last-child { margin-left: auto; opacity: 0.45; font-size: 0.8rem; }

/* ---------- MAIN ---------- */
.na-main {
  flex: 1;
  min-width: 0;
  padding: 0 0 90px;
}

/* ---------- TOPBAR ---------- */
.na-body .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--na-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.na-body .topbar small {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--na-green);
  font-weight: 700;
  text-transform: uppercase;
}

.na-body .topbar b {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--na-green-dark);
}

.na-body .topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.na-body #themeBtn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--na-border);
  background: #fff;
  color: var(--na-green);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.18s ease;
}

.na-body #themeBtn:hover {
  background: var(--na-mint);
  transform: rotate(-8deg);
}

.na-body .desk-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--na-green);
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(45, 106, 79, 0.25);
  transition: all 0.18s ease;
}

.na-body .desk-btn:hover {
  background: var(--na-green-dark);
  transform: translateY(-1px);
}

/* ---------- HERO ---------- */
.na-body .hero {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 44px 32px 36px;
  max-width: 1180px;
}

.na-body .hero-text .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--na-mint), #D8F3DC);
  color: var(--na-green-dark);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(45, 106, 79, 0.08);
}

.na-body .hero-text h1 {
  font-family: var(--font-head);
  font-size: clamp(1.95rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  font-weight: 700;
  color: var(--na-green-dark);
  margin-bottom: 14px;
  letter-spacing: -0.025em;
}

.na-body .hero-text p {
  font-size: 1.08rem;
  line-height: 1.6;
  color: var(--na-text-soft);
  max-width: 520px;
  margin-bottom: 28px;
}

.na-body .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.na-body .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.na-body .btn.primary {
  background: var(--na-green);
  color: #fff;
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.28);
}

.na-body .btn.primary:hover {
  background: var(--na-green-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(45, 106, 79, 0.32);
}

.na-body .btn.secondary {
  background: #fff;
  color: var(--na-green-dark);
  border: 1.5px solid var(--na-border);
}

.na-body .btn.secondary:hover {
  border-color: var(--na-green-soft);
  background: var(--na-cream-2);
  transform: translateY(-2px);
}

.na-body .hero-logo {
  background: #fff;
  border-radius: 28px;
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--na-shadow);
  border: 1px solid var(--na-border);
  position: relative;
  overflow: hidden;
}

.na-body .hero-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(183, 228, 199, 0.4), transparent 60%);
  pointer-events: none;
}

.na-body .hero-logo img {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  object-fit: cover;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(45, 106, 79, 0.18);
  position: relative;
  z-index: 1;
}

.na-body .hero-logo strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--na-green-dark);
  position: relative;
  z-index: 1;
}

.na-body .hero-logo span {
  display: block;
  font-size: 0.88rem;
  color: var(--na-text-soft);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}

/* ---------- FEATURES ---------- */
.na-body .features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  padding: 8px 32px 48px;
  max-width: 1180px;
}

.na-body .card {
  background: var(--na-card);
  border-radius: var(--na-radius);
  padding: 26px 22px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--na-border);
  box-shadow: 0 6px 18px rgba(45, 106, 79, 0.05);
  transition: all 0.22s ease;
  position: relative;
  overflow: hidden;
}

.na-body .card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--na-green-soft), var(--na-mint));
  opacity: 0;
  transition: opacity 0.22s ease;
}

.na-body .card:hover {
  transform: translateY(-5px) scale(1.015);
  box-shadow: var(--na-shadow-hover);
  border-color: rgba(45, 106, 79, 0.18);
}

.na-body .card:hover::after { opacity: 1; }

.na-body .card i {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.25rem;
  margin-bottom: 16px;
  background: var(--na-cream-2);
  color: var(--na-green);
  transition: all 0.22s ease;
}

.na-body .card:nth-child(1) i { background: #D8F3DC; color: #2D6A4F; }
.na-body .card:nth-child(2) i { background: #FFE8CC; color: #D97706; }
.na-body .card:nth-child(3) i { background: #FCE7F3; color: #BE185D; }
.na-body .card:nth-child(4) i { background: #DBEAFE; color: #1D4ED8; }
.na-body .card:nth-child(5) i { background: #EDE9FE; color: #6D28D9; }
.na-body .card:nth-child(6) i { background: #FEF3C7; color: #B45309; }

.na-body .card:hover i {
  transform: scale(1.08) rotate(-3deg);
}

.na-body .card h3 {
  font-family: var(--font-head);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--na-green-dark);
  margin-bottom: 8px;
}

.na-body .card p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--na-text-soft);
}

/* ---------- CALM SPACE ---------- */
.na-body .calm-section {
  padding: 12px 32px 70px;
  max-width: 1180px;
}

.na-body .section-head {
  margin-bottom: 22px;
}

.na-body .section-head h2 {
  font-family: var(--font-head);
  font-size: 1.75rem;
  color: var(--na-green-dark);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.na-body .section-head h2 i {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--na-mint), #95D5B2);
  color: var(--na-green-dark);
  font-size: 1.1rem;
}

.na-body .section-head p {
  color: var(--na-text-soft);
  max-width: 560px;
  line-height: 1.55;
  font-size: 1.02rem;
}

.na-body .sensory-toolkit {
  background: #0f172a;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  min-height: 500px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
  border: 3px solid #1e293b;
}

.na-body .st-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.na-body .st-controls select,
.na-body .st-btn {
  padding: 9px 15px;
  border-radius: 12px;
  border: none;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 0.86rem;
  font-family: var(--font-body);
  cursor: pointer;
}

.na-body .st-controls label {
  color: #94a3b8;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.7);
  padding: 6px 10px;
  border-radius: 10px;
}

.na-body .st-controls input[type="range"] {
  width: 78px;
  accent-color: #52B788;
}

.na-body #st-canvas {
  display: block;
  width: 100%;
  height: 500px;
  touch-action: manipulation;
}

.na-body .st-status {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  text-align: center;
  color: #64748b;
  font-size: 0.88rem;
  pointer-events: none;
}

/* ---------- YARA ---------- */
.na-body .yara-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px 10px 10px;
  background: #fff;
  border: 2px solid var(--na-mint);
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(45, 106, 79, 0.18);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.na-body .yara-fab:hover {
  transform: translateY(-3px) scale(1.03);
}

.na-body .yara-fab img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--na-mint);
}

.na-body .yara-fab span {
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--na-text-soft);
  text-align: left;
}

.na-body .yara-fab b {
  color: var(--na-green-dark);
  font-size: 1rem;
  font-family: var(--font-head);
}

.na-body .yara-panel {
  position: fixed;
  bottom: 102px;
  right: 28px;
  width: min(390px, calc(100vw - 28px));
  max-height: 72vh;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.16);
  border: 2px solid var(--na-mint);
  display: flex;
  flex-direction: column;
  z-index: 95;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.96);
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.na-body .yara-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.na-body .yara-panel header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--na-border);
  background: linear-gradient(135deg, #F0FFF4, #FFF9F0);
}

.na-body .yara-panel header img {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--na-mint);
}

.na-body .yara-panel header b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--na-green-dark);
}

.na-body .yara-panel header small {
  font-size: 0.76rem;
  color: var(--na-text-soft);
}

.na-body #yaraClose {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: rgba(45, 106, 79, 0.08);
  color: var(--na-green-dark);
  cursor: pointer;
  font-size: 1.1rem;
}

.na-body .yara-body {
  padding: 14px 16px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.na-body #yaraStudent {
  width: 100%;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1.5px solid var(--na-border);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: #fff;
}

.na-body .chat {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 290px;
}

.na-body .chat .bot,
.na-body .chat .user {
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 90%;
}

.na-body .chat .bot {
  background: var(--na-cream-2);
  color: var(--na-text);
  align-self: flex-start;
  border-bottom-left-radius: 6px;
}

.na-body .chat .user {
  background: var(--na-green);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 6px;
}

.na-body .yara-panel footer {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--na-border);
}

.na-body #yaraQuestion {
  flex: 1;
  resize: none;
  border-radius: 14px;
  border: 1.5px solid var(--na-border);
  padding: 11px 13px;
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.na-body #yaraSend {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: none;
  background: var(--na-green);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .na-shell { flex-direction: column; }

  .na-side {
    width: 100%;
    min-width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--na-border);
  }

  .na-side nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .na-side .desk-link { display: none; }

  .na-body .hero {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }

  .na-body .features,
  .na-body .calm-section {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 560px) {
  .na-body .hero-text h1 { font-size: 1.7rem; }
  .na-body #st-canvas { height: 400px; }
  .na-body .sensory-toolkit { min-height: 400px; }
}