/* Skeleton Loader for Gallery Images */
.gallery-skeleton {
  width: 100%;
  aspect-ratio: 1/1;
  background: #ececec;
  border-radius: 12px;
  display: block;
}

/* ============================================================
   SESA Design System — Refined Organic Professional
   Fonts: Fraunces (display) + DM Sans (body)
   Palette: Deep Forest Green + Warm Gold + Ivory
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Manrope:wght@300;400;500;600;700&display=swap');

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  /* Forest Green scale — anchored to #1b4332 */
  --green-900: #022818;
  --green-800: #1b4332;
  --green-700: #2d5a44;
  --green-600: #426652;
  --green-500: #579672;
  --green-400: #94d5ad;
  --green-100: #e8f5ed;
  --green-50:  #f2faf5;

  /* Aged Gold scale — anchored to Stitch #C5A059 */
  --gold-700:  #775a19;
  --gold-500:  #c5a059;
  --gold-400:  #d4b87a;
  --gold-300:  #fbbf24;
  --gold-200:  #e9d2a3;
  --gold-100:  #f7edd8;
  --gold-50:   #fdf8ef;

  /* Surface hierarchy — tonal layering, no harsh white */
  --ivory:     #fafaf3;   /* page background */
  --white:     #ffffff;   /* elevated cards on ivory */
  --surface-low:    #f4f4ed;  /* sections, inset areas */
  --surface-mid:    #eeeee7;  /* card containers */
  --surface-high:   #e8e9e2;  /* deeper nesting */

  --gray-900:  #1a1c18;
  --gray-700:  #414843;
  --gray-500:  #727973;
  --gray-300:  #c1c8c1;
  --gray-200:  #e3e3dc;
  --gray-100:  #f4f4ed;

  --red-600:   #ba1a1a;
  --red-100:   #ffdad6;
  --success:        #166534;
  --success-bg:     #dcfce7;
  --warning:        #92400e;
  --warning-bg:     #fef3c7;
  --amber-600: #c5a059;   /* unified to gold — no separate amber */
  --amber-100: #f7edd8;
  --blue-600:  #2563eb;   /* kept for functional states only */
  --blue-100:  #dbeafe;

  /* Border-radius — Stitch uses subtle corners, no pills on buttons */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;  /* badges/pills only */

  /* Ambient shadows tinted with Forest Green (per DESIGN.md) */
  --shadow-sm:  0 1px 3px rgba(2,40,24,.06), 0 1px 2px rgba(2,40,24,.04);
  --shadow-md:  0 4px 16px rgba(2,40,24,.08), 0 1px 4px rgba(2,40,24,.04);
  --shadow-lg:  0 12px 40px rgba(2,40,24,.1), 0 2px 8px rgba(2,40,24,.05);
  --shadow-xl:  0 20px 50px rgba(2,40,24,.08);

  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  /* Navbar height used to offset page content */
  --navbar-height: 60px;
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Mobile Tap Highlight & Press Feedback ──────────────── */
/* Remove the default blue/grey webkit tap highlight on all devices */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Restore natural press feedback for all interactive elements */
a,
button,
.btn,
.tab-item,
.quiz-option,
.test-card,
.nav-dropdown a,
.guide-nav-item,
.crisis-option,
.stat-card,
.a2hs-btn-install,
.a2hs-btn-later,
.admin-tab {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* eliminates 300ms tap delay */
}

/* Buttons and links: scale-down on press for tactile feedback */
a:active:not(.btn):not(.tab-item),
.btn:active,
.guide-nav-item:active,
.a2hs-btn-install:active,
.a2hs-btn-later:active,
.admin-tab:active {
  transform: scale(0.97);
  opacity: 0.88;
}

/* Tab bar items: subtle scale */
.tab-item:active {
  transform: scale(0.93);
  opacity: 0.75;
}

/* Quiz options: background shift instead of scale */
.quiz-option:active {
  background: var(--green-50);
  border-color: var(--green-400);
}

/* Test cards */
.test-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-sm);
  transition-duration: 140ms;
  transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Crisis options */
.crisis-option:active {
  background: var(--green-50);
  border-color: var(--green-400);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--gray-900);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* prevent any overflowing element from shifting the page */
}
html { overflow-x: hidden; max-width: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }

/* ─── Layout Utilities ───────────────────────────────────── */
.container      { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-sm   { max-width: 640px;  margin: 0 auto; padding: 0 24px; }
.container-md   { max-width: 860px;  margin: 0 auto; padding: 0 24px; }

/* ─── App Shell ──────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
/* Offset fixed navbar so content starts below it */
.app-layout > main {
  padding-top: var(--navbar-height);
  animation: pageIn 0.18s ease-out;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Hero pages pull up into the navbar zone — hero itself adds the offset via padding */
.has-page-hero .app-layout > main { padding-top: 0; }

/* ─── Top Navbar ─────────────────────────────────────────── */
/*
  FIX 1: always position:fixed — no more layout-jump on scroll.
  FIX 4: solid green by default so inner pages (ivory bg) stay readable.
  .transparent modifier applied only on landing page over the dark hero.
  .scrolled re-applies solid bg + shadow after user scrolls past 40px.
*/

.hero-section {
  position: relative; /* ADD this if not already there */
}

.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  text-decoration: none;
  z-index: 10;
}

@media (max-width: 768px) {
  .scroll-indicator {
    bottom: calc(60px + env(safe-area-inset-bottom) + 16px);
  }
}

.scroll-indicator:hover {
  color: #fff;
}

.navbar {
  background: var(--green-800);
  color: #fff;
  position: fixed;
  top: 0; left: 0; right: 0;
  box-shadow: var(--shadow-md);
  border: none; outline: none;
  margin-bottom: 0;
  z-index: 100;
  padding-bottom: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.navbar.transparent { background: transparent; box-shadow: none; }
.navbar.scrolled    { background: var(--green-800); box-shadow: var(--shadow-md); }

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: var(--navbar-height);
  max-width: 1180px;
  margin: 0 auto;
}
.navbar-brand { display: flex; align-items: center; gap: 10px; }
.navbar-logo  { width: 36px; height
  
  : 36px; border-radius: 50%; object-fit: cover; }
.navbar-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--gold-200);
  letter-spacing: .02em;
}
.navbar-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.navbar-links a {
  color: rgba(255,255,255,.82);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}
.navbar-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.navbar-links a.active {
  color: var(--gold-200);
  background: rgba(255,255,255,.12);
}
.navbar-links a.active:hover { color: var(--gold-200); }
.navbar-links .btn-nav-logout {
  color: rgba(255,255,255,.7);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  margin-left: 4px;
  font-size: 0.9rem;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.navbar-links .btn-nav-logout:hover {
  color: #fff;
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
}


.nav-dropdown {
  pointer-events: none;
}

.nav-dropdown.open {
  pointer-events: auto;
}

.auth-page::before,
.auth-page::after {
  pointer-events: none;
}

.auth-page {
  position: relative;
  z-index: 0;
}
/* FIX 3: Hamburger now exists in DOM; hidden on desktop via CSS */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Page Hero ──────────────────────────────────────────── */
/* ─── Page Hero (retired) ────────────────────────────────── */
/* The full-bleed green banner has been replaced by .page-context */
.page-hero { display: none; }

/* ─── Page Context (greeting card above content) ────────── */
.page-context {
  background: var(--green-800);
  border-radius: var(--radius-lg);
  padding: 24px 24px 20px;
  margin-top: 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
/* Subtle decorative circle — depth without noise */
.page-context::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(212, 163, 54, 0.08);
  top: -80px;
  right: -60px;
  pointer-events: none;
}
.page-context h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold-200);
  margin-bottom: 4px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  position: relative;
}
.page-context p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  position: relative;
}
/* Back link inside page-context (student history) */
.page-context a.back-link {
  display: inline-block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}
.page-context a.back-link:hover { color: #fff; }
@media (max-width: 480px) {
  .page-context {
    padding: 20px 18px 18px;
    margin-top: 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
  }
  .page-context h1 { font-size: 1.2rem; }
}

/* ─── Cards ──────────────────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.card-body { padding: 28px; }
.card-header {
  padding: 20px 28px 16px;
  border-bottom: 1px solid var(--gray-100);
  margin-bottom: 20px;
}
.card-header h2, .card-header h3 { font-family: var(--font-display); font-weight: 600; color: var(--green-800); }

/* ─── Stat Cards ─────────────────────────────────────────── */
/* Mobile-first: 2 cols on small screens, auto-fit on larger */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 600px) {
  .stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media (min-width: 600px) {
  .alert-detail-text { display:inline !important; }
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 18px 16px 16px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--green-500);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card.gold { border-top-color: var(--gold-500); }
.stat-card.teal { border-top-color: #0891b2; }
.stat-card.red  { border-top-color: var(--red-600); }
.stat-icon {
  font-size: 1.15rem;
  line-height: 1;
  margin-bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--green-50);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-card.gold .stat-icon { background: var(--gold-100); }
.stat-card.teal .stat-icon { background: #e0f2fe; }
.stat-card.red  .stat-icon { background: var(--red-100); }
.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-800);
  line-height: 1.1;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--gray-700);
  font-weight: 500;
  line-height: 1.3;
}
@media (max-width: 480px) {
  .stat-value { font-size: 1.35rem; }
  .stat-card { padding: 14px 14px 12px; }
  .stat-icon { width: 30px; height: 30px; font-size: 1rem; margin-bottom: 10px; }
}

/* Score Arrow Indicators */
.score-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; margin-left: 8px;
  padding: 2px 8px; border-radius: var(--radius-sm);
}
.score-arrow.arrow-up   { color: #fff; background: #10b981; box-shadow: 0 0 12px rgba(16,185,129,.6), 0 0 24px rgba(16,185,129,.3); }
.score-arrow.arrow-down { color: #fff; background: #ef4444; box-shadow: 0 0 12px rgba(239,68,68,.6), 0 0 24px rgba(239,68,68,.3); }

/* ─── Test Cards Grid ────────────────────────────────────── */
/* Mobile-first: single column, expands on wider screens */
.test-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 540px) {
  .test-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
.test-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
@media (hover:hover) and (pointer:fine) {
  .test-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); border-color:var(--green-100); }
  .test-card:hover .test-card-image img { transform: scale(1.05); }
}

/* Image section */
.test-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--green-50);
  flex-shrink: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.test-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

/* Content section */
.test-card-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.test-card-content h3 { font-family:var(--font-display); font-size:0.95rem; font-weight:600; color:var(--green-800); margin-bottom:6px; line-height:1.35; }
.test-card-content p  { font-size:0.82rem; color:var(--gray-700); margin-bottom:14px; line-height:1.5; flex:1; }

@media (max-width:480px) { .test-card-image { height:120px; } }
.test-card-icon { font-size:2rem; margin-bottom:12px; display:block; }
.test-card h3 { font-family:var(--font-display); font-size:1rem; font-weight:600; color:var(--green-800); margin-bottom:8px; line-height:1.35; }
.test-card p { font-size:0.84rem; color:var(--gray-700); margin-bottom:14px; line-height:1.5; }
.test-card-meta { display:flex; align-items:center; justify-content:space-between; }
.test-card-count { font-size:0.78rem; background:var(--green-50); color:var(--green-700); padding:3px 10px; border-radius:var(--radius-full); font-weight:600; }
.test-card-arrow { color:var(--green-500); font-size:1.1rem; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 14px 32px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.9rem; cursor: pointer; border: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  line-height: 1; text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.btn:active { transform:scale(0.97); }
.btn-primary       { background:var(--green-900); color:#fff; }
.btn-primary:hover { background:var(--green-700); box-shadow:0 4px 14px rgba(2,40,24,.25); }
.btn-gold          { background:var(--gold-500); color:var(--green-900); font-weight:700; }
.btn-gold:hover    { background:var(--gold-700); color:#fff; }
.btn-outline       { background:transparent; color:var(--green-900); border:2px solid var(--green-900); }
.btn-outline:hover { background:var(--surface-low); }
.btn-ghost { color:var(--gray-700); border: 2px solid var(--gray-300); }
.btn-ghost:hover { background: var(--surface-low); border-color: var(--gray-400); }
.btn-danger        { background:var(--red-600); color:#fff; }
.btn-danger:hover  { background:#93000a; }
.btn-sm    { padding:8px 14px; font-size:0.82rem; border-radius:var(--radius-sm); }
.btn-lg    { padding:14px 32px; font-size:1rem; border-radius:var(--radius-md); }
.btn-xl    { padding:16px 40px; font-size:1.05rem; border-radius:var(--radius-md); }
.btn-block { width:100%; }
.btn-secondary       { background:var(--green-100); color:var(--green-700); border:1.5px solid var(--green-200); }
.btn-secondary:hover { background:var(--green-50); border-color:var(--green-400); }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom:18px; }
.form-label { display:block; font-weight:600; font-size:0.875rem; color:var(--gray-700); margin-bottom:6px; }
.form-control {
  width:100%; padding:12px 0;
  border:none; border-bottom:2px solid var(--gray-300);
  border-radius:0;
  background:transparent; color:var(--gray-900);
  transition:border-color var(--transition);
  outline:none;
}
.form-control:focus { border-color:#C5A059; box-shadow:none; outline:none; }
.auth-page .form-control { height: 44px; border-radius: 0; }
.auth-page textarea.form-control { height: auto; }
.form-control.is-invalid { border-color:var(--red-600); }
.form-control::placeholder { color:var(--gray-300); }
.form-control-icon { position:relative; }
.form-control-icon .form-control { padding-right:42px; }
.form-control-icon .icon { position:absolute; right:14px; top:50%; transform:translateY(-50%); color:var(--gray-300); pointer-events:none; }
textarea.form-control { resize:vertical; min-height:110px; }
select.form-control { cursor:pointer; }
.form-error { font-size:0.8rem; color:var(--red-600); margin-top:4px; }
.form-hint  { font-size:0.8rem; color:var(--gray-500); margin-top:4px; }

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--ivory) inset !important;
  -webkit-text-fill-color: var(--gray-900) !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ─── Flash Messages ─────────────────────────────────────── */
/* FIX: constrained to viewport so 380px toast can't overflow a 375px phone */
.flash-stack {
  position: fixed; top: calc(72px + env(safe-area-inset-top));
  right: 16px; left: 16px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
@media (min-width: 480px) {
  .flash-stack { left: auto; width: 380px; max-width: calc(100vw - 32px); }
}
.flash-toast {
  --toast-accent: transparent;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(2,40,24,.12);
  border-left: 3px solid var(--toast-accent);
  box-shadow: 0 10px 30px rgba(2,40,24,.14);
  font-size: .9rem; font-weight: 500; line-height: 1.45;
  color: #166534;
  cursor: pointer;
  pointer-events: auto;
  opacity: 1; transform: translateX(0);
  transition:
    transform 260ms cubic-bezier(.23,1,.32,1),
    opacity 260ms cubic-bezier(.23,1,.32,1);
}
@starting-style {
  .flash-toast { opacity: 0; transform: translateX(24px); }
}
/* Severity icon badge */
.flash-toast::before {
  content: ''; display: none;
  align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 12px; font-weight: 800; line-height: 1;
  flex-shrink: 0;
}
.flash-toast.success::before {
  display: inline-flex; content: '✓';
  color: #34d399; background: rgba(52,211,153,.16);
}
.flash-toast.error::before,
.flash-toast.danger::before {
  display: inline-flex; content: '✕';
  color: #f87171; background: rgba(248,113,113,.16);
}
.flash-toast.warning::before {
  display: inline-flex; content: '!';
  color: #fbbf24; background: rgba(251,191,36,.16);
}
.flash-toast.info::before {
  display: inline-flex; content: 'i';
  color: #93c5fd; background: rgba(147,197,253,.16);
}
.flash-toast.success        { --toast-accent: #34d399; }
.flash-toast.error,
.flash-toast.danger         { --toast-accent: #f87171; }
.flash-toast.warning        { --toast-accent: #fbbf24; }
.flash-toast.info           { --toast-accent: #93c5fd; }
.flash-toast span { flex: 1; min-width: 0; }

/* Close button */
.flash-toast__close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  border: none; border-radius: 8px; background: none;
  color: rgba(22,101,52,.4);
  font-size: 18px; line-height: 1; cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}
.flash-toast__close:hover {
  color: #166534;
  background: rgba(22,101,52,.08);
}

/* Stagger stacked toasts on enter */
.flash-stack .flash-toast:nth-child(2) { transition-delay: 50ms; }
.flash-stack .flash-toast:nth-child(3) { transition-delay: 100ms; }
.flash-stack .flash-toast:nth-child(4) { transition-delay: 150ms; }

@media (prefers-reduced-motion: reduce) {
  .flash-toast {
    transform: none !important;
    transition: opacity 150ms ease !important;
  }
  .flash-stack .flash-toast { transition-delay: 0ms !important; }
  .pulse-dot,
  .crisis-btn,
  .score-arrow,
  .scroll-indicator { animation: none !important; box-shadow: none !important; }
}

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrapper { overflow-x:auto; border-radius:var(--radius-md); }
.table { width:100%; border-collapse:collapse; font-size:0.875rem; }
.table th { background:var(--green-50); color:var(--green-800); font-weight:600; padding:12px 16px; text-align:left; white-space:nowrap; border-bottom:2px solid var(--green-100); }
.table td { padding:11px 16px; border-bottom:1px solid var(--gray-100); vertical-align:middle; }
.table tbody tr:hover { background:var(--ivory); }
.table tbody tr:last-child td { border-bottom:none; }
.td-actions { white-space:nowrap; width:1%; }
.td-actions > div { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }


/* Stacked card layout on mobile — activates the data-label attributes */
@media (max-width:600px) {
  .table thead { display:none; }
  .table, .table tbody { display:block; width:100%; }
  .table tr {
    display:block;
    border-bottom:2px solid var(--gray-100);
    padding:8px 0;
  }
  .table tr:last-child { border-bottom:none; }
  .table td {
    display:flex; align-items:baseline; gap:10px;
    border-bottom:none; padding:4px 16px; font-size:0.85rem;
  }
  .table td::before {
    content:attr(data-label);
    font-weight:600; font-size:0.72rem; color:var(--gray-500);
    text-transform:uppercase; letter-spacing:.04em;
    flex-shrink:0; min-width:76px;
  }
  .td-actions { padding-top:8px; padding-bottom:4px; }
  .td-actions::before { display:none; }

  /* Full-width empty state cells — override flex back to block */
  .table td.td-empty-state {
    display: block !important;
    padding: 0 !important;
    border: none !important;
  }
  .table td.td-empty-state::before { display: none !important; }

  /* Secondary cells are hidden by default on mobile */
  .table td.td-secondary { display:none; }
  .table tr.row-expanded td.td-secondary { display:flex; }

  /* The expand toggle button injected by JS */
  .row-expand-btn {
    display:flex; align-items:center; gap:5px;
    margin:6px 16px 2px;
    background:none; border:none; cursor:pointer;
    font-size:0.72rem; font-weight:600; color:var(--gray-500);
    text-transform:uppercase; letter-spacing:.04em; padding:0;
  }
  .row-expand-btn .expand-chevron {
    display:inline-block; transition:transform 0.2s;
    font-style:normal; font-size:0.65rem;
  }
  .table tr.row-expanded .row-expand-btn .expand-chevron { transform:rotate(180deg); }

  /* Guide tables stay as normal tables (they have their own layout) */
  .guide-table-wrap .table thead { display:table-header-group !important; }
  .guide-table-wrap .table { display:table !important; width:100% !important; }
  .guide-table-wrap .table tbody { display:table-row-group !important; }
  .guide-table-wrap .table tr { display:table-row !important; border-bottom:none !important; padding:0 !important; }
  .guide-table-wrap .table td { display:table-cell !important; width:auto !important; padding:8px 10px !important; font-size:0.78rem !important; }
  .guide-table-wrap .table td::before { display:none !important; }
}

/* ─── Empty State Container (rich / full-width) ──────────── */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: 56px 32px;
  background: var(--green-50);
  border: 1.5px solid var(--green-100);
  border-radius: var(--radius-lg);
  text-align: center;
  box-sizing: border-box;
  width: 100%;
}
.empty-state-container .esc-icon {
  font-size: 5rem;
  color: var(--green-800);
  opacity: 0.12;
  margin-bottom: 24px;
  line-height: 1;
  transition: opacity 0.3s ease;
}
.empty-state-container:hover .esc-icon { opacity: 0.2; }
.empty-state-container .esc-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--green-800);
  margin: 0 0 10px;
  line-height: 1.25;
}
.empty-state-container .esc-subtitle {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--gray-500);
  max-width: 400px;
  margin: 0 auto 28px;
  line-height: 1.6;
}
.empty-state-container .esc-divider {
  width: 40px;
  height: 3px;
  background: var(--gold-500);
  border-radius: var(--radius-full);
  margin: 0 auto 28px;
  opacity: 0.6;
}
@media (max-width: 600px) {
  .empty-state-container {
    min-height: 240px;
    padding: 40px 20px;
  }
  .empty-state-container .esc-icon { font-size: 3.5rem; margin-bottom: 18px; }
  .empty-state-container .esc-title { font-size: 1.2rem; }
  .empty-state-container .esc-subtitle { font-size: 0.86rem; }
}

/* ─── Badges ─────────────────────────────────────────────── */
.badge { display:inline-flex; align-items:center; padding:3px 10px; border-radius:var(--radius-full); font-size:0.75rem; font-weight:600; white-space:nowrap; }
.badge-green { background:var(--green-100); color:var(--green-700); }
.badge-gold  { background:var(--gold-100);  color:var(--gold-700);  }
.badge-red   { background:var(--red-100);   color:var(--red-600);   }
.badge-gray  { background:var(--gray-100);  color:var(--gray-700);  }
.badge-amber { background:var(--amber-100); color:var(--amber-600); }
.badge-blue  { background:var(--blue-100);  color:var(--blue-600);  }

/* ─── Stage badges ───────────────────────────────────────── */
.stage-normal   { background:#d1fae5; color:#065f46; }
.stage-mild     { background:var(--amber-100); color:#78350f; }
.stage-elevated { background:#ffedd5; color:#9a3412; }
.stage-clinical { background:var(--red-100); color:#7f1d1d; }

/* ─── Recent Results — horizontal scroll cards (home page) ── */
.recent-results-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.recent-results-scroll::-webkit-scrollbar { display: none; }
.recent-result-card {
  flex-shrink: 0;
  width: 148px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  background: var(--white);
  padding: 12px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
}
.recent-result-bar {
  height: 3px;
  border-radius: 2px;
  width: 100%;
  margin-bottom: 2px;
}
.recent-result-bar--normal   { background: #10b981; }
.recent-result-bar--mild     { background: #f59e0b; }
.recent-result-bar--elevated { background: #f97316; }
.recent-result-bar--clinical { background: #dc2626; }
.recent-result-title {
  font-size: 0.69rem;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.35;
}
.recent-result-score {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-800);
  line-height: 1;
}
.recent-result-score span {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 400;
}
.recent-result-bottom {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 6px;
  border-top: 1px solid var(--gray-100);
}
.recent-result-date { font-size: 0.65rem; color: var(--gray-400); }
.recent-result-more {
  flex-shrink: 0;
  width: 100px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--gray-200);
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: var(--gray-400);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  padding: 12px 8px;
  transition: border-color var(--transition), color var(--transition);
}
.recent-result-more:hover { border-color: var(--green-400); color: var(--green-700); }
.recent-results-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 10px auto 0;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--green-50);
  color: var(--gray-500);
  font-size: 0.72rem;
  font-weight: 600;
}
.recent-results-hint .fa-arrow-right { font-size: 0.62rem; }

@media (min-width: 768px) {
  .recent-results-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
  }
  .recent-result-card {
    width: calc(25% - 8px);
  }
  .recent-result-more {
    width: calc(25% - 8px);
    min-height: 130px;
  }
  .recent-results-hint {
    display: none;
  }
}

/* ─── Progress Bar ───────────────────────────────────────── */
.progress-wrap  { display:flex; align-items:center; gap:12px; margin-bottom:24px; }
.progress-track { flex:1; height:8px; background:var(--gray-100); border-radius:var(--radius-full); overflow:hidden; }
.progress-fill  { height:100%; background:var(--green-500); border-radius:var(--radius-full); transition:width 0.4s ease; }
.progress-label { font-size:0.82rem; font-weight:600; color:var(--green-600); min-width:40px; text-align:right; }

/* ─── Auth Pages ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  background: var(--ivory);
  position: relative;
  overflow: hidden;
}
.auth-page::before {
  content: none;
}
.auth-page::after {
  content: none;
}

.auth-page-brand {
  width: 42%;
  flex-shrink: 0;
  background: #022818;
  padding: 56px 48px ;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}
.auth-page-brand::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 56px solid rgba(201, 146, 26, 0.13);
  pointer-events: none;
}
.auth-page-brand::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 40px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.auth-page-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}
.auth-page-brand-logo img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.15);
}
.auth-page-brand-sesa {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: #C5A059;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.auth-page-brand-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
  font-style: italic;
  position: relative;
  border-left: 3px solid #C5A059;
  padding-left: 20px;
}
.auth-page-brand-quote em { color: #C5A059; font-style: normal; }
.auth-page-brand-quote em {
  color: var(--gold-400);
  font-style: normal;
}
.auth-page-brand-quote::before {
  content: none;
}
.auth-page-brand-org {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
}

.auth-page-brand-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-300, #fcd34d);
  margin-bottom: 8px;
}

.auth-page-brand-headline {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin: 0 0 12px;
}

.auth-page-brand-body {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
  margin-bottom: 20px;
}

.auth-page-brand-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-page-brand-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.auth-page-brand-list li i {
  color: var(--gold-300, #fcd34d);
  width: 16px;
  flex-shrink: 0;
}

.auth-page-brand-info-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin-top: 16px;
}

.auth-page-brand-info-box i {
  color: var(--gold-300, #fcd34d);
  margin-top: 2px;
  flex-shrink: 0;
}

.auth-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 48px 56px;
  background: var(--iv);
  animation: authCardIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 0;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.06);
  max-width: none;
  width: 100%;
  margin-right: 0;
  position: relative;
  z-index: 1;
  align-self: stretch;
}
.auth-card > * {
  width: 100%;
  max-width: 480px;
}

@media (max-width: 768px) {
  .auth-page {
    flex-direction: column;
    background: var(--ivory);
  }
  .auth-page-brand {
    width: 38%;
    padding: 40px 32px;
    min-height: auto;
  }
  .auth-page-brand-quote {
    font-size: 1.1rem;
  }
  .auth-page-brand::after,
  .auth-page-brand::before {
    display: none;
  }
  .auth-card {
    padding: 36px 24px 40px;
    align-items: stretch;
  }
  .auth-card > * {
    max-width: 100%;
  }
}
@media (max-width: 600px) {
  .auth-page {
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    align-items: stretch;
    background: var(--white);
  }
  .auth-page::before {
    display: none;
  }
  .auth-page-brand {
    width: 100%;
    min-height: 0;
    padding: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 20px;
    background: #022818;
  }
  .auth-page-brand-logo {
    margin-bottom: 0;
  }
  .auth-page-brand-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255,255,255,.2);
  }
  .auth-page-brand-sesa {
    font-size: 1rem;
    letter-spacing: 0.15em;
  }
  .auth-page-brand-quote,
  .auth-page-brand-tagline,
  .auth-page-brand-headline,
  .auth-page-brand-body,
  .auth-page-brand-info-box,
  .auth-page-brand-list {
    display: none;
  }
  .auth-page-brand-org {
    border-top: none;
    padding-top: 0;
    font-size: 0.6rem;
  }
  .auth-card {
    margin-right: 0;
    border-radius: 0;
    min-height: calc(100vh - 56px);
    box-shadow: none;
    max-width: 100%;
    padding: 32px 24px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .auth-card .auth-wordmark,
  .auth-card .auth-org {
    display: none;
  }
  .auth-card .auth-logo-area {
    margin-bottom: 20px;
  }
  .auth-title {
    font-size: 1.6rem;
  }
}

@keyframes authCardIn { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:translateY(0)} }
.auth-logo-area { text-align:left; margin-bottom:28px; }
.auth-logo { width:68px; height:68px; border-radius:50%; object-fit:cover; margin:0 auto 10px; box-shadow:var(--shadow-md); }
.auth-org      { font-size:0.78rem; color:var(--gray-500); font-weight:500; text-transform:uppercase; letter-spacing:.08em; }
.auth-title    { font-family:'Playfair Display', Georgia, serif; font-size:2rem; font-weight:700; color:#022818; margin:8px 0 4px; letter-spacing:-0.02em; }
.auth-subtitle { font-size:0.88rem; color:var(--gray-500); }
.auth-divider  { text-align:center; margin:18px 0; position:relative; }
.auth-divider::before { content:''; position:absolute; top:50%; left:0; right:0; height:1px; background:var(--gray-300); }
.auth-divider span { position:relative; background:var(--white); padding:0 12px; font-size:0.8rem; color:var(--gray-500); }

/* ─── Auth Page Improvements ─────────────────────────────── */
/* Add these rules to the existing ── Auth Pages ── section  */

/* auth-card is now the right panel — see .auth-page above */

/* Wider card for signup / school signup (more fields) */
.auth-card--wide {
  max-width: none;
}
/* School portal — gold left border on the brand panel */
.auth-page--school .auth-page-brand {
  border-bottom: 3px solid var(--gold-500);
}
@media (min-width: 769px) {
  .auth-page--school .auth-page-brand {
    border-bottom: none;
    border-right: 3px solid var(--gold-500);
  }
}
@media (max-width: 600px) {
  .auth-page--school .auth-page-brand {
    border-bottom: none;
    border-right: none;
    border-bottom: 2px solid var(--gold-500);
  }
}



/* ─── Wordmark (replaces logo image) ────────────────────── */
.auth-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.auth-wordmark-sesa {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--green-800);
  letter-spacing: -0.02em;
  line-height: 1;
}
.auth-wordmark-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C5A059;
  flex-shrink: 0;
  margin-bottom: 4px; /* optically align with baseline */
}

/* School portal variant — adds a small tag below */
.auth-wordmark--school {
  flex-direction: column;
  gap: 2px;
  align-items: center;
}
.auth-wordmark-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-600, var(--gold-700));
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  border-radius: var(--radius-full);
  padding: 2px 10px;
}

/* ─── Footer links area ──────────────────────────────────── */
.auth-footer-links {
  text-align: left;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-footer-links p {
  font-size: 0.85rem;
  color: var(--gray-500);
}
.auth-footer-links a {
  color: #C5A059;
  font-weight: 600;
  transition: color var(--transition);
}
.auth-footer-links a:hover { color: #775A19; }

/* ─── Two-column field grid ──────────────────────────────── */
.auth-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 400px) {
  .auth-two-col { grid-template-columns: 1fr; }
}

/* ─── Notice / info box ──────────────────────────────────── */
.auth-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--gold-50);
  border-left: 3px solid var(--gold-500);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  font-size: 0.83rem;
  color: var(--gold-700);
  line-height: 1.5;
}
.auth-notice i { margin-top: 2px; flex-shrink: 0; }


/* ─── Landing Page ───────────────────────────────────────── */
.landing-page { overflow-x:hidden; }
.landing-nav {
  position:fixed; top:0; left:0; right:0; z-index:100;
  padding:16px 20px;
  display:flex; align-items:center; justify-content:space-between;
  transition:background var(--transition), box-shadow var(--transition);
}
@media (min-width:600px) { .landing-nav { padding:16px 40px; } }
.landing-nav.scrolled { background:var(--green-800); box-shadow:var(--shadow-md); }
.landing-nav-brand {
  display:flex; align-items:center; gap:10px;
  font-family:var(--font-display); font-size:1.15rem;
  color:#fff; font-weight:600;
}
.landing-nav-brand img { width:36px; height:36px; border-radius:50%; }
.landing-nav-links { display:flex; gap:8px; flex-wrap:wrap; }
@media (max-width:768px) { .landing-nav-links { display:none; } }

.hero-section {
  min-height:100vh;
  background: var(--green-900);
  display:flex; align-items:center; justify-content:center;
  padding:100px 20px 60px;
  position:relative; overflow:hidden;
}
@media (min-width:600px) { .hero-section { padding:100px 40px 60px; } }
.hero-bg-circle { position:absolute; border-radius:50%; opacity:.06; }
.hero-bg-circle.c1 { width:700px; height:700px; background:var(--gold-400); top:-200px; right:-200px; }
.hero-bg-circle.c2 { width:500px; height:500px; background:var(--green-400); bottom:-200px; left:-150px; }
.hero-bg-circle.c3 { width:300px; height:300px; background:var(--gold-200); top:30%; left:40%; }
.hero-content { position:relative; z-index:1; max-width:700px; text-align:center; color:#fff; animation:heroIn 0.9s ease; }
@keyframes heroIn { from{opacity:0;transform:translateY(32px)} to{opacity:1;transform:translateY(0)} }
.hero-eyebrow {
  display: inline-block;
  background: rgba(212,163,54,.2);
  color: var(--gold-200);
  border: 1px solid rgba(212,163,54,.3);
  padding: 5px 16px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}


.hero-title { font-family:var(--font-display); font-size:clamp(2rem,5vw,3.6rem); font-weight:700; line-height:1.1; margin-bottom:20px; color:#fff; }
.hero-title em { color:var(--gold-400); font-style:italic; }
.hero-subtitle { font-size:1.05rem; color:rgba(255,255,255,.80); margin-bottom:36px; max-width:540px; margin-right:auto; }
.hero-actions { display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.hero-actions .btn-primary       { background:var(--gold-500); color:var(--green-900); font-size:1rem; font-weight:700; }
.hero-actions .btn-primary:hover { background:var(--gold-700); color:#fff; }
.hero-actions .btn-outline       { color:#fff; border-color:rgba(255,255,255,.4); font-size:1rem; }
.hero-actions .btn-outline:hover { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.7); }

.features-section { padding:50px 20px; background:var(--ivory); }
@media (min-width:768px) { .features-section { padding:80px 40px; } }
.section-label { text-align:center; font-size:0.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.12em; color:var(--green-600); margin-bottom:10px; }
.section-title { font-family:var(--font-display); font-size:clamp(1.6rem,3vw,2.2rem); font-weight:600; color:var(--green-800); text-align:center; margin-bottom:48px; }
.feature-grid { display:grid; grid-template-columns:1fr; gap:20px; max-width:1000px; margin:0 auto; }
@media (min-width:540px) { .feature-grid { grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:24px; } }
.feature-item { background:var(--surface-low); border-radius:var(--radius-lg); padding:28px; box-shadow:none; text-align:center; transition:transform var(--transition),box-shadow var(--transition); border:1px solid rgba(2,40,24,.06); }
.feature-item:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); }
.feature-icon { width:56px; height:56px; background:var(--ivory); border-radius:var(--radius-md); display:flex; align-items:center; justify-content:center; font-size:1.5rem; margin:0 auto 16px; }
.feature-item h3 { font-family:var(--font-display); font-size:1.05rem; font-weight:700; color:var(--green-900); margin-bottom:8px; }
.feature-item p  { font-size:0.875rem; color:var(--gray-500); line-height:1.65; }

.landing-footer { background:var(--green-900); color:rgba(255,255,255,.6); text-align:center; padding:30px 24px; font-size:0.85rem; }

/* ─── GES Alignment Banner (landing page) ─────────────────── */
.ges-banner {
  background: var(--green-900, #022818);
  padding: 64px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ges-banner::before {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: var(--gold-400, #fecf44);
  opacity: 0.04;
  top: -200px; right: -150px;
  pointer-events: none;
}
.ges-banner::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: var(--green-600, #1a3e2c);
  opacity: 0.4;
  bottom: -120px; left: -80px;
  pointer-events: none;
}
.ges-banner-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.ges-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(254,207,68,.12);
  border: 1.5px solid rgba(254,207,68,.35);
  border-radius: var(--radius-full);
  padding: 5px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold-400, #fecf44);
  margin-bottom: 20px;
}
.ges-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}
.ges-banner p {
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto;
}
.ges-banner-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
.ges-banner-cta .btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,.5);
  color: #fff;
  background: rgba(255,255,255,.07);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.ges-banner-cta .btn-outline-white:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.8);
}
@media (min-width: 768px) {
  .ges-banner { padding: 90px 40px; }
}
.landing-footer strong { color:rgba(255,255,255,.9); }

/* ─── Section helpers ──────────────────────────────────── */
.section-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: var(--gray-500);
  max-width: 560px;
  margin: -30px auto 40px;
  line-height: 1.65;
}
.landing-section { padding: 60px 20px; background: var(--ivory); }
.landing-section--alt { padding: 60px 20px; background: var(--green-50, #f0faf4); }
@media (min-width: 768px) {
  .landing-section, .landing-section--alt { padding: 90px 40px; }
}

/* feature-item card variant (Invisible Barriers section) */
.feature-item--card {
  border-left: 3px solid var(--green-300, #6ee7b7);
  background: var(--white);
  text-align: left;
}
.feature-item--card .feature-icon { margin: 0 0 14px; }

/* ─── GES Banner CTA ───────────────────────────────────── */
.ges-banner-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

/* ─── Assessment 6-Dimensions Grid ────────────────────── */
.assessment-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 540px) {
  .assessment-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
}
.assessment-item {
  background: var(--white);
  border-left: 4px solid var(--gold-500, #eab308);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.assessment-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.assessment-item h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 6px;
}
.assessment-item p {
  font-size: 0.85rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 12px;
}
.assessment-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold-700, #a16207);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.assessment-badge i { color: var(--gold-500, #eab308); }

/* ─── Full-width landing footer ───────────────────────── */
.landing-footer-full {
  background: var(--green-900, #022818);
  color: rgba(255,255,255,.65);
  padding: 60px 24px 40px;
  font-size: 0.88rem;
}
.landing-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .landing-footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; }
}
.landing-footer-brand p {
  font-size: 0.85rem;
  line-height: 1.65;
  max-width: 300px;
  margin-bottom: 10px;
}
.landing-footer-copy { font-size: 0.75rem; opacity: 0.6; }
.landing-footer-disclaimer { font-size: 0.72rem; opacity: 0.45; margin-top: 4px; }
.landing-footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-400, #fecf44);
  margin-bottom: 14px;
}
.landing-footer-col a,
.landing-footer-col p {
  display: block;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.landing-footer-col a:hover { color: #fff; }

/* ─── Test / Quiz Pages ──────────────────────────────────── */
.quiz-layout { min-height:100vh; background:var(--green-800); padding:0; }
.quiz-header-bar { padding:20px 24px; display:flex; align-items:center; justify-content:space-between; }
.quiz-header-bar .brand { display:flex; align-items:center; gap:10px; color:rgba(255,255,255,.9); }
.quiz-header-bar .brand img  { width:32px; height:32px; border-radius:50%; }
.quiz-header-bar .brand span { font-family:var(--font-display); font-size:1rem; font-weight:600; color:var(--gold-200); }
.quiz-back-link { color:rgba(255,255,255,.6); font-size:0.85rem; display:flex; align-items:center; gap:5px; }
.quiz-back-link:hover { color:#fff; }
.quiz-card-wrapper { max-width:680px; margin:0 auto; padding:0; border-radius: none; }
@media (min-width:480px) { .quiz-card-wrapper { padding:0 20px 60px; } }
.quiz-card     { background:var(--white); 
   box-shadow:var(--shadow-xl); overflow:hidden; }
@media (min-width:1024px) { .quiz-card { border-radius:var(--radius-xl); } }
.quiz-card-top { background:var(--green-800); padding:22px 20px 16px; color:#fff; }
@media (min-width:480px) { .quiz-card-top { padding:28px 32px 20px; } }
.quiz-test-name  { font-size:0.78rem; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:var(--gold-200); margin-bottom:4px; }
.quiz-q-counter  { font-family:var(--font-display); font-size:1.3rem; font-weight:600; margin-bottom:14px; }
.quiz-card-body  { padding:22px 20px; }
@media (min-width:480px) { .quiz-card-body { padding:28px 32px; } }
.quiz-card-body .btn          { flex:1; min-width:140px; max-width:100%; }
.quiz-result-actions .btn     { flex:1; min-width:140px; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.quiz-question-text { font-family:var(--font-display); font-size:1.15rem; font-weight:600; color:var(--green-800); line-height:1.55; margin-bottom:28px; }
@media (min-width:480px) { .quiz-question-text { font-size:1.2rem; } }
.quiz-options  { display:flex; flex-direction:column; gap:10px; }
.quiz-option {
  display:flex; align-items:center; gap:14px; padding:16px 20px;
  border:2px solid var(--gray-100); border-radius:var(--radius-md);
  cursor:pointer; transition:border-color var(--transition),background var(--transition),box-shadow var(--transition); position:relative;
}
.quiz-option:hover   { border-color:var(--green-300); background:var(--green-50); box-shadow:0 2px 8px rgba(61,139,88,.08); }
.quiz-option.selected { border-color:var(--green-500); background:var(--green-50); box-shadow:0 2px 12px rgba(61,139,88,.14); }
.quiz-option input[type=radio] { display:none; }
.quiz-option-dot { width:22px; height:22px; border:2px solid var(--gray-300); border-radius:50%; flex-shrink:0; display:flex; align-items:center; justify-content:center; transition:var(--transition); }
.quiz-option.selected .quiz-option-dot { border-color:var(--green-500); background:var(--green-500); }
.quiz-option.selected .quiz-option-dot::after { content:''; width:7px; height:7px; background:#fff; border-radius:50%; }
.quiz-option-label { font-weight:500; font-size:0.95rem; }
.quiz-nav { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-top:1px solid var(--gray-100); }
@media (min-width:480px) { .quiz-nav { padding:20px 32px; } }
.quiz-footer-note { text-align:center; padding:16px 24px 24px; font-size:0.78rem; color:var(--gray-500); line-height:1.6; }

/* ─── Result Page ────────────────────────────────────────── */
.result-card { max-width:680px; margin:0 auto; }
.result-score-ring { width:120px; height:120px; border-radius:50%; border:7px solid rgba(255,255,255,0.25); display:flex; flex-direction:column; align-items:center; justify-content:center; margin:0 auto 24px; background:rgba(255,255,255,0.12); box-shadow:0 0 0 3px rgba(255,255,255,0.08); }
.result-score-num   { font-family:var(--font-display); font-size:2.4rem; font-weight:700; color:#fff; line-height:1; }
.result-score-denom { font-size:0.75rem; color:var(--gray-500); }
.result-stage-badge { display:inline-block; padding:8px 24px; border-radius:var(--radius-full); font-weight:700; font-size:0.95rem; margin-bottom:16px; }
.result-message { font-size:0.97rem; color:var(--gray-700); line-height:1.7; margin-bottom:20px; padding:18px 20px; background:var(--ivory); border-radius:var(--radius-md); border-left:4px solid var(--green-500); box-shadow:inset 0 1px 3px rgba(0,0,0,0.04); }
.result-breakdown { font-size:0.85rem; color:var(--gray-500); margin-bottom:24px; }

/* ─── Psychoeducation / Intervention Cards (result page) ── */
.psycho-card {
  background: var(--green-50);
  border: 1.5px solid var(--green-100);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin-bottom: 20px;
  text-align: left;
  box-shadow: 0 2px 8px rgba(61,139,88,0.07);
}
.psycho-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.psycho-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.psycho-card li {
  font-size: 0.875rem;
  color: var(--gray-700);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.psycho-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green-500);
  font-weight: 700;
}

/* Intervention banner — Elevated stage */
.intervention-elevated {
  display: none;
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}
/* Intervention banner — Clinical stage */
.intervention-clinical {
  background: #fef2f2;
  border: 2px solid var(--red-600);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 20px 0;
  text-align: left;
}
.intervention-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}
.intervention-elevated .intervention-title { color: #92400e; }
.intervention-clinical .intervention-title { color: #7f1d1d; }
.intervention-body { font-size: 0.85rem; margin-bottom: 12px; line-height: 1.6; }
.intervention-elevated .intervention-body { color: #78350f; }
.intervention-clinical .intervention-body { color: #991b1b; }
.intervention-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.intervention-actions a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.85rem;
  transition: opacity 0.15s, transform 0.15s;
}
.intervention-actions a:active { transform: scale(0.97); }
.intervention-actions a:hover { opacity: 0.88; }
.btn-call-counsellor { background: var(--green-700); color: #fff; }
.btn-call-helpline   { background: var(--red-600);   color: #fff; }

/* ─── Admin Dashboard ────────────────────────────────────── */
.admin-tabs { display:flex; gap:2px; border-bottom:2px solid var(--gray-100); margin-bottom:24px; overflow-x:auto; padding-bottom:0; }
.admin-tab {
  padding:8px 14px; border-radius:var(--radius-sm) var(--radius-sm) 0 0;
  font-weight:600; font-size:0.82rem; color:var(--gray-500);
  cursor:pointer; white-space:nowrap; border:none; background:none;
  border-bottom:2px solid transparent; margin-bottom:-2px;
  transition:color var(--transition);
}
@media (min-width:768px) { .admin-tabs { gap:4px; } .admin-tab { padding:10px 20px; font-size:0.875rem; } }
.admin-tab.active, .admin-tab:hover { color:var(--green-700); }
.admin-tab.active { border-bottom-color:var(--green-600); }
.admin-tab-panel        { display:none; }
.admin-tab-panel.active { display:block; }

/* ─── Search Box ─────────────────────────────────────────── */
.search-box { display:flex; align-items:center; gap:8px; background:var(--white); border:1.5px solid var(--gray-300); border-radius:var(--radius-md); padding:8px 14px; width:100%; max-width:100%; }
.search-box input { border:none; outline:none; width:100%; font-size:0.875rem; color:var(--gray-900); }
.search-box svg { color:var(--gray-300); flex-shrink:0; }

/* ─── Page Sections ──────────────────────────────────────── */
.section { padding:32px 0; }
.section-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:20px; }
.section-head h2, .section-head h3 { font-family:var(--font-display); font-size:1.2rem; color:var(--green-800); }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state { text-align:center; padding:48px 24px; color:var(--gray-500); }
.empty-state-icon { font-size:2.5rem; margin-bottom:12px; opacity:0.7; color:var(--gray-400); }
.empty-state .btn { display: inline-block; margin-top: 16px; }
.empty-state p { font-size:0.9rem; }

/* ─── Mobile Nav Dropdown ────────────────────────────────── */
.nav-dropdown {
  visibility:hidden; pointer-events:none;
  position:absolute; top:calc(100% + 6px); right:16px; min-width:200px;
  background:var(--white); border-radius:14px; border:0.5px solid var(--gray-200);
  box-shadow:0 8px 24px rgba(0,0,0,.10); overflow:hidden; z-index:300;
  transform-origin:top right; transform:scale(0.95) translateY(-4px); opacity:0;
  transition:transform 0.18s ease,opacity 0.18s ease,visibility 0s linear 0.18s;
}
.nav-dropdown.open {
  visibility:visible; pointer-events:auto;
  transform:scale(1) translateY(0); opacity:1;
  transition:transform 0.18s ease,opacity 0.18s ease,visibility 0s linear 0s;
}
@media (max-width:768px) {
  .nav-dropdown { position:fixed; top:60px; right:12px; left:12px; z-index:10000; isolation:isolate; border-radius:16px; min-width:unset; }
}
.nav-dropdown a { display:block; padding:11px 16px; font-size:0.88rem; font-weight:500; color:var(--green-800); border-bottom:0.5px solid var(--gray-100); transition:background var(--transition); text-decoration:none; }
.nav-dropdown a:last-child { border-bottom:none; }
.nav-dropdown a:hover { background:var(--gray-100); }
.nav-dropdown a.btn-nav-logout { color:var(--red-600); }
.nav-dropdown a.btn-nav-logout:hover { background:rgba(220,38,38,.05); }

/* ─── Nav Dropdown Header (title + close button row) ────── */
.nav-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--gray-100);
}
.nav-dropdown-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-500);
}
.nav-dropdown-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  font-size: 0.9rem;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  line-height: 1;
}
.nav-dropdown-close:hover { background: var(--gray-100); color: var(--gray-900); }

/* ─── Body/Page utility helpers ──────────────────────────── */
/* Pages that override full_page block need explicit top offset */
.quiz-layout { padding-top: 0; } /* quiz has its own header bar */

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width:768px) {
  .navbar-links { display:none; }
  .landing-nav .hamburger { display:flex; }
  .navbar .hamburger { display:flex; }
  .page-hero h1 { font-size:1.5rem; }
}
@media (max-width:480px) {
  /* FIX: 100% width — no more 390px cap clipping sub-390 phones */
  .container, .container-sm, .container-md { padding:0 16px; max-width:100%; }
  .btn-xl { padding:14px 28px; font-size:0.95rem; }
}

/* ─── Add to Home Screen Banner ─────────────────────────── */
.a2hs-banner { position:fixed; bottom:0; left:0; right:0; z-index:9999; animation:slideUp 0.35s cubic-bezier(0.32,0.72,0,1); }
.a2hs-sheet { background:var(--white); border-radius:20px 20px 0 0; box-shadow:0 -4px 32px rgba(0,0,0,.12); padding:12px 20px 32px; max-width:520px; margin:0 auto; position:relative; }
.a2hs-handle { width:36px; height:4px; background:var(--gray-200); border-radius:2px; margin:0 auto 20px; }
.a2hs-btn-dismiss { position:absolute; top:16px; right:16px; background:var(--gray-100); border:none; width:28px; height:28px; border-radius:50%; font-size:0.72rem; cursor:pointer; color:var(--gray-500); transition:background var(--transition); display:flex; align-items:center; justify-content:center; }
.a2hs-btn-dismiss:hover { background:var(--gray-200); color:var(--gray-700); }
.a2hs-row { display:flex; align-items:center; gap:14px; margin-bottom:18px; }
.a2hs-icon img { width:52px; height:52px; border-radius:14px; object-fit:cover; flex-shrink:0; box-shadow:0 2px 8px rgba(0,0,0,.12); }
.a2hs-text { flex:1; display:flex; flex-direction:column; gap:3px; }
.a2hs-text strong { font-size:1rem; font-weight:700; color:var(--green-800); }
.a2hs-text span   { font-size:0.82rem; color:var(--gray-500); line-height:1.4; }
.a2hs-actions { display:flex; gap:10px; }
/* FIX: removed duplicate color:var(--gold-300) that was immediately overridden */
.a2hs-btn-install { flex:1; background:var(--green-800); color:#fff; border:none; padding:12px; border-radius:12px; font-weight:700; font-size:0.9rem; cursor:pointer; transition:background var(--transition); font-family:inherit; }
.a2hs-btn-install:hover { background:var(--green-700); }
.a2hs-btn-later { padding:12px 18px; border-radius:12px; background:var(--gray-100); border:none; font-size:0.9rem; font-weight:600; color:var(--gray-500); cursor:pointer; transition:background var(--transition); font-family:inherit; }
.a2hs-btn-later:hover { background:var(--gray-200); }
@media (max-width:480px) {
  .a2hs-sheet { padding:12px 16px 28px; border-radius:16px 16px 0 0; }
  .a2hs-icon img { width:44px; height:44px; border-radius:11px; }
  .a2hs-text strong { font-size:0.92rem; }
  .a2hs-text span   { font-size:0.78rem; }
  .a2hs-btn-install, .a2hs-btn-later { font-size:0.84rem; padding:11px 12px; }
}
@media (max-width:360px) { .a2hs-actions { flex-direction:column; } .a2hs-btn-later { text-align:center; } }
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }

/* ─── Crisis Help Button ─────────────────────────────────── */
.crisis-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 150;
  display: flex; align-items: center; gap: 8px;
  background: var(--red-600); color: #fff;
  border-radius: var(--radius-full); padding: 10px 18px 10px 14px;
  box-shadow: 0 4px 20px rgba(220,38,38,.4);
  cursor: pointer; user-select: none; font-weight: 600; font-size: 0.875rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, padding 0.2s ease;
}
/* On desktop: shrink to icon-only, expand on hover */
@media (min-width: 769px) {
  .crisis-btn { padding: 10px 14px; }
  .crisis-btn-label { width: 0; overflow: hidden; opacity: 0; transition: width 0.2s ease, opacity 0.2s ease; white-space: nowrap; }
  .crisis-btn:hover { padding: 10px 18px 10px 14px; }
  .crisis-btn:hover .crisis-btn-label { width: auto; opacity: 1; }
}
/* On mobile: sit above the bottom tab bar */
@media (max-width: 768px) {
  .crisis-btn { bottom: calc(68px + env(safe-area-inset-bottom) + 12px); right: 16px; }
}
@media (hover:hover) and (pointer:fine) {
  .crisis-btn:hover { transform:scale(1.05); box-shadow:0 6px 28px rgba(220,38,38,.55); }
}
.crisis-btn-icon  { font-size:1.1rem; line-height:1; }
.crisis-btn-label { white-space:nowrap; }

/* ─── Crisis Modal Overlay ───────────────────────────────── */
.crisis-modal { position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,.55); display:flex; align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(3px); }
.crisis-modal-box { background:var(--white); border-radius:var(--radius-xl); padding:32px 28px 28px; max-width:420px; width:100%; box-shadow:var(--shadow-xl); position:relative; animation:crisis-modal-in 0.2s ease; }
@keyframes crisis-modal-in { from{opacity:0;transform:translateY(16px) scale(.97)} to{opacity:1;transform:translateY(0) scale(1)} }
.crisis-modal-close { position:absolute; top:14px; right:16px; background:var(--gray-100); border:none; border-radius:50%; width:30px; height:30px; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:0.8rem; color:var(--gray-500); transition:background 0.15s; }
.crisis-modal-close:hover { background:var(--gray-300); }
.crisis-modal-header { text-align:center; margin-bottom:24px; }
.crisis-modal-emoji  { font-size:2.5rem; display:block; margin-bottom:8px; }
.crisis-modal-title  { font-family:var(--font-display); font-size:1.35rem; color:var(--green-800); margin-bottom:6px; }
.crisis-modal-sub    { font-size:0.875rem; color:var(--gray-500); line-height:1.5; }
.crisis-modal-options { display:flex; flex-direction:column; gap:10px; margin-bottom:20px; }
.crisis-option { display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:var(--radius-md); border:1.5px solid var(--gray-200); background:var(--gray-100); text-decoration:none; color:var(--gray-900); transition:border-color 0.15s,background 0.15s; }
.crisis-option:hover { border-color:var(--green-400); background:var(--green-50); }
.crisis-option--primary { background:var(--green-100); border-color:var(--green-400); }
.crisis-option--primary:hover { background:var(--green-100); border-color:var(--green-600); }
.crisis-option--soft { cursor:default; }
.crisis-option--soft:hover { border-color:var(--gray-200); background:var(--gray-100); }
.crisis-option-icon   { font-size:1.5rem; flex-shrink:0; }
.crisis-option strong { display:block; font-size:0.875rem; font-weight:700; margin-bottom:2px; }
.crisis-option span   { font-size:0.78rem; color:var(--gray-500); line-height:1.4; }
.crisis-modal-footer  { text-align:center; font-size:0.78rem; color:var(--gray-500); font-style:italic; }
@media (max-width:480px) { .crisis-btn { padding:10px 16px; } .crisis-btn-icon { font-size:1rem; } .crisis-modal-box { padding:24px 20px 20px; } }

/* ─── Bottom Tab Bar ─────────────────────────────────────── */
.bottom-tab-bar { display:none; }
@media (max-width:768px) {
  .bottom-tab-bar {
    display:flex; position:fixed; bottom:0; left:0; right:0;
    height:60px; background:var(--white);
    border-top:1px solid var(--gray-200);
    box-shadow:0 -2px 12px rgba(0,0,0,.07); z-index:200; align-items:stretch;
  }
  main { padding-top: 0px !important; padding-bottom:68px; }
}
.tab-item {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  text-decoration:none; color:var(--gray-500); font-size:0.65rem; font-weight:600;
  letter-spacing:.02em; text-transform:uppercase; padding:6px 4px;
  border:none; background:none; cursor:pointer; transition:color 0.15s ease;
  -webkit-tap-highlight-color:transparent; position:relative;
}
.tab-item:hover, .tab-item.active { color: var(--green-700); }
.tab-item.active i {
  position: relative;
  z-index: 1;
}
.tab-item.active i::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 28px;
  background: var(--green-50);
  border-radius: 14px;
  z-index: -1;
}
.tab-item.tab-logout       { color:var(--gray-300); }
.tab-item.tab-logout:hover { color:#dc2626; }
.tab-icon  { font-size:1.2rem; line-height:1; width:1.2rem; text-align:center; }
.tab-label { font-size:0.62rem; line-height:1; }

/* Safe area inset for iPhone home indicator */
@supports (padding-bottom:env(safe-area-inset-bottom)) {
  .bottom-tab-bar { padding-bottom:env(safe-area-inset-bottom); height:calc(60px + env(safe-area-inset-bottom)); }
  @media (max-width:768px) { main { padding-bottom:calc(68px + env(safe-area-inset-bottom)); } }
}

/* ─── School Guide Page ──────────────────────────────────── */
/* Add to the bottom of main.css                              */

/* Quick nav pills at top */
.guide-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.guide-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--green-700);
  transition: background var(--transition), border-color var(--transition),
              transform var(--transition);
  text-decoration: none;
}
.guide-nav-item:hover {
  background: var(--green-50);
  border-color: var(--green-400);
  transform: translateY(-2px);
}
.guide-nav-item i { color: var(--green-500); }

/* Section wrapper */
.guide-section {
  padding: 8px;
  margin-bottom: 32px;
  scroll-margin-top: 80px;
}
@media (max-width: 480px) { .guide-section { padding: 16px 10px; } }

/* Section header with icon */
.guide-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--gray-100);
}
.guide-section-header h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 4px;
}
.guide-section-header p {
  font-size: 0.9rem;
  color: var(--gray-500);
}
.guide-section-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--green-100);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.guide-section-icon--gold { background: var(--gold-100); color: var(--gold-700); }
.guide-section-icon--teal { background: #e0f2fe; color: #0369a1; }
.guide-section-icon--red  { background: var(--red-100); color: var(--red-600); }

/* Steps */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.guide-steps::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: var(--green-100);
}
.guide-step {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  position: relative;
}
.guide-step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--white);
}
.guide-step-body h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 4px;
}
.guide-step-body p {
  font-size: 0.875rem;
  color: var(--gray-600, var(--gray-700));
  line-height: 1.65;
}

/* Download box */
.guide-download-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--gold-50);
  border: 2px solid var(--gold-200);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 28px;
}
.guide-download-box strong { font-size: 1rem; color: var(--green-800); }
.guide-download-box p { font-size: 0.85rem; color: var(--gray-500); margin-top: 2px; }

/* Subsection title */
.guide-subsection-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
  margin: 24px 0 12px;
}

/* Info / warning / contact boxes */
.guide-info-box,
.guide-warning-box,
.guide-contact-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-top: 24px;
  font-size: 0.875rem;
  line-height: 1.6;
}
.guide-info-box    { background: var(--blue-100);   color: #1e3a5f; border-left: 4px solid var(--blue-600); }
.guide-warning-box { background: var(--amber-100);  color: #78350f; border-left: 4px solid var(--amber-600); }
.guide-contact-box { background: var(--green-50);   color: var(--green-800); border-left: 4px solid var(--green-500); }
.guide-info-box i,
.guide-warning-box i,
.guide-contact-box i { font-size: 1.2rem; margin-top: 2px; flex-shrink: 0; }
.guide-info-box strong,
.guide-warning-box strong,
.guide-contact-box strong { display: block; margin-bottom: 4px; font-size: 0.925rem; }

/* Two column method cards */
.guide-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 540px) { .guide-two-col { grid-template-columns: 1fr; } }
.guide-method-card {
  background: var(--ivory);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px;
}
.guide-method-icon {
  font-size: 1.5rem;
  color: var(--green-600);
  margin-bottom: 10px;
}
.guide-method-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--green-800);
  margin-bottom: 8px;
}
.guide-method-card p {
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.65;
}

/* FAQ accordion-style */
.guide-faq { display: flex; flex-direction: column; gap: 8px; }
.guide-faq-item {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.guide-faq-q {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-800);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  gap: 10px;
}
.guide-faq-q i { color: var(--green-500); font-size: 0.75rem; }
.guide-faq-a {
  padding: 12px 18px 14px 42px;
  font-size: 0.875rem;
  color: var(--gray-700);
  line-height: 1.65;
  background: var(--white);
}

/* Inline code style */
.guide-table-wrap code,
.guide-faq-a code,
.guide-step-body code,
.guide-info-box code {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.82em;
  font-family: monospace;
  color: var(--green-700);
}

/* Table wrapper inside guide */
.guide-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.guide-table-wrap table,
.guide-table-wrap thead,
.guide-table-wrap tbody,
.guide-table-wrap tr,
.guide-table-wrap th,
.guide-table-wrap td {
  display: revert !important;
}
.guide-table-wrap td::before {
  display: none !important;
}
@media (max-width: 480px) {
  .guide-nav {
    gap: 8px;
  }
  .guide-nav-item {
    padding: 8px 12px;
    font-size: 0.78rem;
    gap: 6px;
  }
  .guide-section-header {
    flex-direction: column;
    gap: 10px;
  }
  .guide-step {
    gap: 12px;
  }
  .guide-steps::before {
    left: 15px;
  }
  .guide-step-num {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
  .guide-download-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }
  .guide-two-col {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .guide-section {
    overflow: hidden;
  }
  .guide-section-header h2 {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .guide-step-body p,
  .guide-step-body h3 {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .guide-faq-q,
  .guide-faq-a {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .guide-info-box,
  .guide-warning-box,
  .guide-contact-box {
    overflow-wrap: break-word;
    word-break: break-word;
    padding: 12px 14px;
  }
}

.app-layout {
  overflow-x: hidden;
  width: 100%;
}

.app-layout > main {
  overflow-x: hidden;
  width: 100%;
}