/* ── PathfinderEDU — Full Design System ─────────────────────────────────────
   Warm cream / sage / gold editorial palette.
   Playfair Display (headings) + DM Sans (body).
   Two themes: default (marketing + counselor portal) and .student-theme (lighter AI chat).
   ─────────────────────────────────────────────────────────────────────────── */

/* ── 1. Root Tokens ────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:       #FAF8F4;   /* Warm cream page background */
  --sf:       #FFFFFF;   /* Card surface */
  --sf2:      #F4F2EE;   /* Secondary surface */
  --sf3:      #EDE9E2;   /* Tertiary / dividers */

  /* Text */
  --ink:      #0D1117;   /* Primary text */
  --ink-soft: #3A3F4A;   /* Body text */
  --ink-muted:#6B7280;   /* Muted / labels */

  /* Brand greens */
  --sage:        #2D6A4F;   /* Primary CTA, active nav, links */
  --sage-mid:    #40916C;   /* Hover state */
  --sage-light:  #52B788;   /* Progress, badges */
  --sage-pale:   #D8F3DC;   /* Tint backgrounds */
  --sage-xpale:  #F0FBF3;   /* Very light tint */

  /* Accent gold */
  --gold:        #C9A84C;   /* Accent / AI insight / warnings */
  --gold-mid:    #B8942A;   /* Hover */
  --gold-pale:   #FFF8E7;   /* Tint */

  /* Danger */
  --rd:          #DC3545;
  --rd-pale:     #FDECEA;

  /* Borders */
  --border:      rgba(13,17,23,0.08);
  --border-dark: rgba(13,17,23,0.14);
  --border-sage: rgba(45,106,79,0.20);

  /* Shadows */
  --shadow-xs: 0 1px 3px rgba(13,17,23,0.06);
  --shadow-sm: 0 2px 8px rgba(13,17,23,0.08), 0 1px 2px rgba(13,17,23,0.04);
  --shadow-md: 0 4px 16px rgba(13,17,23,0.10), 0 2px 4px rgba(13,17,23,0.06);
  --shadow-lg: 0 8px 32px rgba(13,17,23,0.12), 0 4px 8px rgba(13,17,23,0.06);
  --shadow-sage: 0 4px 16px rgba(45,106,79,0.20);

  /* Typography */
  --fd: 'Playfair Display', Georgia, serif;   /* Display / headings */
  --fm: 'DM Sans', system-ui, sans-serif;     /* Body / UI */

  /* Layout */
  --nav: 68px;
  --max: 1280px;
  --max-sm: 860px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;

  /* Transitions */
  --t: 0.18s ease;
  --t-slow: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--fm);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sage); text-decoration: none; }
a:hover { color: var(--sage-mid); }
button { font-family: var(--fm); cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: var(--fm); }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-family: var(--fd); font-weight: 700; line-height: 1.2; }

/* ── 3. Page SPA System ────────────────────────────────────────────────────── */
.page { display: none; min-height: calc(100vh - var(--nav)); }
.page.active { display: block; }
.page, nav, .modal-overlay { position: relative; z-index: 1; }

/* ── 4. Navigation ─────────────────────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  height: var(--nav);
  background: rgba(250,248,244,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 8px;
  z-index: 900;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}
.nav-logo-mark {
  width: 34px;
  height: 34px;
  background: var(--sage);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  font-family: var(--fd);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.nav-logo-text {
  font-family: var(--fd);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.nav-logo-text span { color: var(--sage); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background var(--t), color var(--t);
  white-space: nowrap;
}
.nav-btn:hover { background: var(--sf2); color: var(--ink); }
.nav-btn.active { color: var(--sage); background: var(--sage-xpale); }

.nav-drop { position: relative; }
.nav-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 220px;
  box-shadow: var(--shadow-md);
  z-index: 100;
}
.nav-drop.open .nav-drop-menu { display: block; }
.nav-drop-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--t);
}
.nav-drop-item:hover { background: var(--sf2); }
.nav-drop-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.nav-drop-label { font-size: 0.875rem; font-weight: 600; color: var(--ink); display: block; }
.nav-drop-desc { font-size: 0.78rem; color: var(--ink-muted); display: block; margin-top: 1px; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}
.nav-cta {
  padding: 8px 18px;
  background: var(--sage);
  color: #fff !important;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}
.nav-cta:hover {
  background: var(--sage-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sage);
}
.nav-profile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sf2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background var(--t);
  position: relative;
}
.nav-profile:hover { background: var(--sf3); }
.nav-profile-drop {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow-md);
}
.nav-profile.open .nav-profile-drop { display: block; }
.nav-profile-item {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--t);
}
.nav-profile-item:hover { background: var(--sf2); color: var(--ink); }
.nav-profile-item.danger:hover { background: var(--rd-pale); color: var(--rd); }
.nav-profile-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  margin-left: auto;
}
.hb-line {
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.hamburger.open .hb-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .hb-line:nth-child(2) { opacity: 0; }
.hamburger.open .hb-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Portal sidebar nav */
.portal-layout {
  display: flex;
  min-height: calc(100vh - var(--nav));
}
.portal-sidebar {
  width: 240px;
  background: #0D1117;
  border-right: none;
  padding: 20px 12px;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav);
  height: calc(100vh - var(--nav));
  overflow-y: auto;
}
.portal-sidebar-section { margin-bottom: 20px; }
.portal-sidebar-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.3);
  padding: 0 8px 6px;
  display: block;
}
/* Sidebar school context block */
.sidebar-school-context {
  padding: 12px 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-school-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2px;
}
.sidebar-school-meta {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  transition: background var(--t), color var(--t);
  margin-bottom: 2px;
}
.sidebar-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.85); }
.sidebar-item.active { background: rgba(45,106,79,0.25); color: var(--sage-light); font-weight: 600; }
.sidebar-item-icon { font-size: 1rem; flex-shrink: 0; }
.sidebar-badge {
  margin-left: auto;
  background: var(--sage-light);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.portal-main {
  flex: 1;
  padding: 28px 32px;
  min-width: 0;
}
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.portal-title {
  font-family: var(--fd);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
.portal-subtitle { font-size: 0.875rem; color: var(--ink-muted); margin-top: 2px; }

/* ── 5. Layout Utilities ───────────────────────────────────────────────────── */
.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}
.container-sm {
  max-width: var(--max-sm);
  margin: 0 auto;
  padding: 0 28px;
}
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 100px 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-sm { gap: 8px; }
.flex-gap { gap: 16px; }
.flex-gap-lg { gap: 24px; }
.flex-wrap { flex-wrap: wrap; }

/* ── 6. Typography ─────────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--sage);
  font-family: var(--fm);
}
.eyebrow-gold { color: var(--gold); }

.h-display {
  font-family: var(--fd);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}
.h-hero {
  font-family: var(--fd);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}
.h-section {
  font-family: var(--fd);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.h-card {
  font-family: var(--fd);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.text-lead { font-size: 1.1rem; line-height: 1.7; color: var(--ink-soft); }
.text-body { font-size: 0.9375rem; line-height: 1.65; color: var(--ink-soft); }
.text-sm { font-size: 0.8125rem; color: var(--ink-muted); }
.text-xs { font-size: 0.75rem; color: var(--ink-muted); }
.text-muted { color: var(--ink-muted); }
.text-sage { color: var(--sage); }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }

.italic-serif { font-family: var(--fd); font-style: italic; }
.highlight { color: var(--sage); }
.highlight-gold { color: var(--gold); }

/* ── 7. Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--fm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t), border-color var(--t);
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn:active:not(:disabled) { transform: scale(0.98); }

.btn-primary {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}
.btn-primary:hover:not(:disabled) {
  background: var(--sage-mid);
  border-color: var(--sage-mid);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sage);
}

.btn-secondary {
  background: transparent;
  color: var(--sage);
  border-color: var(--sage);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--sage-xpale);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--border-dark);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--sf2);
  color: var(--ink);
}

.btn-danger {
  background: var(--rd);
  color: #fff;
  border-color: var(--rd);
}
.btn-danger:hover:not(:disabled) { background: #c0392b; }

.btn-gold {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-gold:hover:not(:disabled) { background: var(--gold-mid); transform: translateY(-1px); }

.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-xl { padding: 16px 36px; font-size: 1.0625rem; border-radius: var(--radius); }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

/* ── 8. Cards & Surfaces ───────────────────────────────────────────────────── */
.card {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-sm { padding: 16px; }
.card-lg { padding: 32px; }
.card-hover {
  transition: transform var(--t), box-shadow var(--t);
  cursor: pointer;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.card-sage-border { border-color: var(--border-sage); }
.card-gold-border { border-left: 3px solid var(--gold); }

.surface { background: var(--sf2); border-radius: var(--radius); padding: 20px; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ── 9. Badges & Pills ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.badge-sage { background: var(--sage-pale); color: var(--sage); }
.badge-gold { background: var(--gold-pale); color: #92700a; }
.badge-red { background: var(--rd-pale); color: var(--rd); }
.badge-gray { background: var(--sf2); color: var(--ink-muted); border: 1px solid var(--border); }
.badge-ink { background: var(--ink); color: #fff; }
.badge-dot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── 10. Forms ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.form-label-required::after { content: ' *'; color: var(--rd); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-family: var(--fm);
  font-size: 0.9375rem;
  color: var(--ink);
  background: var(--sf);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(45,106,79,0.10);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.8125rem; color: var(--ink-muted); margin-top: 4px; }
.form-error { font-size: 0.8125rem; color: var(--rd); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.toggle-group { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.toggle-label { font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); }
.toggle-desc { font-size: 0.8rem; color: var(--ink-muted); }
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--sf3);
  border-radius: 11px;
  transition: background var(--t);
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  left: 3px;
  top: 3px;
  transition: transform var(--t);
  box-shadow: var(--shadow-xs);
}
.toggle input:checked + .toggle-slider { background: var(--sage); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── 11. Data Tables ───────────────────────────────────────────────────────── */
.table-wrapper {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead tr {
  background: var(--sf2);
  border-bottom: 1px solid var(--border);
}
.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--sf2); }
.data-table .td-name { font-weight: 600; color: var(--ink); }
.data-table .td-actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.table-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sf2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  flex: 1;
  max-width: 300px;
}
.table-search input {
  border: none;
  background: transparent;
  font-size: 0.875rem;
  color: var(--ink);
  outline: none;
  width: 100%;
}

/* ── 12. Metric Cards ──────────────────────────────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.metric-card {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.metric-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-muted); margin-bottom: 8px; }
.metric-value { font-family: var(--fd); font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1; margin-bottom: 6px; }
.metric-delta {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-delta.up { color: var(--sage); }
.metric-delta.down { color: var(--rd); }

/* ── 13. Progress Bars ─────────────────────────────────────────────────────── */
.progress-bar {
  height: 8px;
  background: var(--sf2);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--sage-light);
  border-radius: 4px;
  transition: width 0.6s ease;
}
.progress-bar-fill.gold { background: var(--gold); }
.progress-bar-lg { height: 12px; border-radius: 6px; }
.progress-labeled {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.progress-labeled .label { font-size: 0.8125rem; font-weight: 500; color: var(--ink-soft); }
.progress-labeled .value { font-size: 0.8125rem; font-weight: 700; color: var(--ink); }

/* ── 14. Student Assessment Interface ─────────────────────────────────────── */
.assessment-layout {
  display: flex;
  height: calc(100vh - var(--nav));
  overflow: hidden;
}
.chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  min-width: 0;
}
.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sf);
  flex-shrink: 0;
}
.chat-progress-steps {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-step {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sf3);
  transition: background var(--t);
}
.chat-step.active { background: var(--sage); }
.chat-step.done { background: var(--sage-light); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
}
.chat-msg.ai { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.chat-msg.ai .chat-bubble {
  background: var(--sf2);
  border-radius: 4px 16px 16px 16px;
}
.chat-msg.user .chat-bubble {
  background: var(--sage);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}
.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--sf2);
  border-radius: 4px 16px 16px 16px;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-muted);
  animation: bounce 1.4s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
  40% { transform: scale(1.1); opacity: 1; }
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--sf);
  flex-shrink: 0;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.chat-textarea {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius);
  font-family: var(--fm);
  font-size: 0.9375rem;
  resize: none;
  outline: none;
  background: var(--sf);
  color: var(--ink);
  max-height: 120px;
  overflow-y: auto;
  transition: border-color var(--t);
}
.chat-textarea:focus { border-color: var(--sage); }
.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t), transform var(--t);
  border: none;
}
.chat-send-btn:hover { background: var(--sage-mid); transform: scale(1.05); }

.profile-panel {
  width: 340px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 20px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.profile-panel-section {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.profile-panel-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.keyword-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.keyword-chip {
  padding: 4px 10px;
  background: var(--sage-pale);
  color: var(--sage);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}
.cluster-bars { display: flex; flex-direction: column; gap: 10px; }
.cluster-bar-item { }
.cluster-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cluster-bar-label { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); }
.cluster-bar-pct { font-size: 0.8rem; font-weight: 700; color: var(--ink); }

/* ── 15. Marketing — Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 5% 0%, rgba(45,106,79,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 95% 80%, rgba(201,168,76,0.07) 0%, transparent 55%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}
.hero-eyebrow { margin-bottom: 16px; }
.hero-title { margin-bottom: 20px; }
.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
}
.hero-trust-dot { color: var(--ink-muted); }

/* Hero visual — AI chat preview card */
.hero-visual {
  position: relative;
}
.hero-card {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.hero-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.hero-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.hero-card-name { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.hero-card-role { font-size: 0.75rem; color: var(--ink-muted); }
.hero-card-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--sage);
  font-weight: 600;
}
.hero-card-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-chat-msg { margin-bottom: 12px; }
.hero-chat-ai {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.hero-chat-ai-bubble {
  background: var(--sf2);
  border-radius: 4px 12px 12px 12px;
  padding: 10px 14px;
  font-size: 0.8375rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 85%;
}
.hero-chat-user-bubble {
  background: var(--sage);
  color: #fff;
  border-radius: 12px 4px 12px 12px;
  padding: 10px 14px;
  font-size: 0.8375rem;
  line-height: 1.5;
  margin-left: auto;
  max-width: 80%;
}
.hero-profile-preview {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.hero-profile-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-profile-chip {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.hero-profile-chip.health { background: #D8F3DC; color: #1B4332; }
.hero-profile-chip.stem { background: #EDE0FF; color: #5B21B6; }
.hero-profile-chip.biz { background: var(--gold-pale); color: #92700A; }

/* Floating badge on hero card */
.hero-float-badge {
  position: absolute;
  bottom: -16px;
  left: -20px;
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  white-space: nowrap;
}
.hero-float-badge-icon { font-size: 1.2rem; }

/* ── 16. Marketing — Stats Bar ─────────────────────────────────────────────── */
.stats-bar {
  background: var(--sage);
  padding: 28px 0;
}
.stats-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
}
.stat-item {
  text-align: center;
  padding: 0 20px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-right: none; }
.stat-number {
  font-family: var(--fd);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.8125rem; color: rgba(255,255,255,0.75); }

/* ── 17. Marketing — Features Grid ────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-sage);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--sage-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-icon.gold-bg { background: var(--gold-pale); }
.feature-title { font-family: var(--fd); font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.feature-desc { font-size: 0.875rem; color: var(--ink-muted); line-height: 1.6; }

/* ── 18. Marketing — How It Works ─────────────────────────────────────────── */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step-item { text-align: center; }
.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-family: var(--fd);
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.step-title { font-family: var(--fd); font-size: 1.1rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.step-desc { font-size: 0.875rem; color: var(--ink-muted); line-height: 1.6; }

/* ── 19. Marketing — Pricing Cards ────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 960px; margin: 0 auto; }
.pricing-card {
  background: var(--sf);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: transform var(--t), box-shadow var(--t);
}
.pricing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.pricing-card.featured {
  border-color: var(--sage);
  box-shadow: var(--shadow-sage);
}
.pricing-featured-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sage);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}
.pricing-plan { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: 8px; }
.pricing-price {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 4px;
  line-height: 1;
}
.pricing-amount {
  font-family: var(--fd);
  font-size: 3rem;
  font-weight: 700;
  color: var(--ink);
}
.pricing-unit { font-size: 0.875rem; color: var(--ink-muted); padding-bottom: 8px; }
.pricing-billing { font-size: 0.8125rem; color: var(--ink-muted); margin-bottom: 20px; }
.pricing-features { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.pricing-feature::before { content: '✓'; color: var(--sage); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

/* ── 20. Marketing — Privacy Badge ────────────────────────────────────────── */
.privacy-section {
  background: var(--ink);
  color: #fff;
  padding: 60px 0;
}
.privacy-badge-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 10px 18px;
  margin-bottom: 20px;
}
.privacy-badge-icon { font-size: 1.3rem; }
.privacy-badge-label { font-size: 0.875rem; font-weight: 700; color: rgba(255,255,255,0.95); }
.privacy-points { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.privacy-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.85);
}
.privacy-check { color: #52B788; font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.privacy-vs {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 24px;
}
.privacy-vs-title { font-size: 0.875rem; font-weight: 700; color: rgba(255,255,255,0.5); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.privacy-vs-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.875rem;
}
.privacy-vs-item:last-child { border-bottom: none; }
.privacy-vs-x { color: #f05d78; font-size: 1rem; flex-shrink: 0; }
.privacy-vs-text-muted { color: rgba(255,255,255,0.45); }

/* ── 21. CTA Band ──────────────────────────────────────────────────────────── */
.cta-band {
  background: var(--sage);
  padding: 60px 0;
  text-align: center;
}
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.8); margin-bottom: 28px; }
.btn-white {
  background: #fff;
  color: var(--sage);
  border-color: #fff;
}
.btn-white:hover:not(:disabled) { background: rgba(255,255,255,0.9); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.btn-outline-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover:not(:disabled) { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ── 22. Footer ────────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.65);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--sage);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--fd);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-tagline { font-size: 0.875rem; line-height: 1.6; color: rgba(255,255,255,0.5); max-width: 260px; }
.footer-col-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: 14px; }
.footer-link {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 8px;
  transition: color var(--t);
  cursor: pointer;
}
.footer-link:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8125rem;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-leap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
}
.leap-logo-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: #080e1c;
  border: 1px solid rgba(0,230,118,0.2);
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Inter', var(--fm);
  color: #00e676;
  text-decoration: none;
}

/* ── 23. Modals ────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,17,23,0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  overflow-y: auto;
  padding: 40px 20px;
  align-items: flex-start;
  justify-content: center;
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 540px;
  position: relative;
  animation: slideUp 0.2s ease;
}
.modal-lg { max-width: 720px; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--sf2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--ink-muted);
  transition: background var(--t);
  border: none;
}
.modal-close:hover { background: var(--sf3); color: var(--ink); }
.modal-title { font-family: var(--fd); font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.modal-subtitle { font-size: 0.875rem; color: var(--ink-muted); margin-bottom: 24px; }

/* ── 24. Toast ─────────────────────────────────────────────────────────────── */
#pf-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: rgba(255,255,255,0.9);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
}
#pf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#pf-toast.success { background: var(--sage); }
#pf-toast.error { background: var(--rd); }

/* ── 25. Demo Banner ───────────────────────────────────────────────────────── */
.demo-banner {
  background: var(--gold-pale);
  border-bottom: 2px solid var(--gold);
  padding: 8px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #92700a;
}
.demo-banner-icon { font-size: 1rem; }

/* ── 26. Empty States ──────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-muted);
}
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state-title { font-family: var(--fd); font-size: 1.2rem; color: var(--ink-soft); margin-bottom: 6px; }
.empty-state-desc { font-size: 0.875rem; max-width: 340px; margin: 0 auto 20px; }

/* ── 27. Skeleton Loading ──────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--sf2) 25%, var(--sf3) 50%, var(--sf2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.wide { width: 80%; }
.skeleton-text.short { width: 40%; }

/* ── 28. Student Theme (lighter AI interface) ──────────────────────────────── */
.student-theme {
  --bg:      #FAF8F4;
  --sf:      #FFFFFF;
  --sf2:     #F4F2EE;
  --sf3:     #EDE9E2;
  --s-ai-bubble: #F4F2EE;
  --s-user-bubble: var(--sage);
}
.student-theme .chat-msg.ai .chat-bubble { background: var(--s-ai-bubble); }
.student-theme .chat-msg.user .chat-bubble { background: var(--s-user-bubble); }

/* ── 29. Animations ────────────────────────────────────────────────────────── */
.a1, .a2, .a3, .a4, .a5 {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s forwards;
}
.a1 { animation-delay: 0.05s; }
.a2 { animation-delay: 0.12s; }
.a3 { animation-delay: 0.20s; }
.a4 { animation-delay: 0.28s; }
.a5 { animation-delay: 0.38s; }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeUp 0.4s ease forwards; }

/* ── 30. Utility Classes ───────────────────────────────────────────────────── */
.mt-0 { margin-top: 0; }   .mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; } .mt-5 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; } .mb-5 { margin-bottom: 48px; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.p-4 { padding: 32px; }
.rounded { border-radius: var(--radius); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-full { border-radius: 999px; }
.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.hidden { display: none !important; }
.invisible { visibility: hidden; }
.overflow-hidden { overflow: hidden; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }
.w-full { width: 100%; }
.relative { position: relative; }
.inline-flex { display: inline-flex; align-items: center; gap: 6px; }

/* Auth-gated visibility */
.auth-only { display: none; }
.guest-only { display: block; }
.admin-only { display: none; }
.counselor-only { display: none; }
.student-only { display: none; }

/* ── 31b. Hero Updates (mockup-aligned) ─────────────────────────────────────── */
.hero-trust {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.hero-trust-avatars {
  display: flex;
  align-items: center;
}
.trust-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--sf);
  margin-left: -6px;
}
.trust-avatar:first-child { margin-left: 0; }

.hero-card-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-chip-ai {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--sage-pale);
  color: var(--sage);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.hero-chip-brief {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--gold-pale);
  color: var(--gold-mid);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.hero-card-status.new-badge {
  background: var(--sage-pale);
  color: var(--sage);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.hero-cluster-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.hero-cluster-label {
  font-size: 0.78rem;
  color: var(--ink-soft);
  width: 110px;
  flex-shrink: 0;
}
.hero-cluster-bar {
  flex: 1;
  height: 7px;
  background: var(--sf2);
  border-radius: 4px;
  overflow: hidden;
}
.hero-cluster-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 4px;
  transition: width 0.8s ease;
}
.hero-cluster-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--sf);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.testimonial-stars {
  color: var(--gold);
  font-size: 0.9rem;
  margin-bottom: 14px;
  letter-spacing: 2px;
}
.testimonial-quote {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 20px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.testimonial-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
}
.testimonial-role {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Steps grid 4-column variant */
.steps-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.step-icon-lg {
  font-size: 1.75rem;
  margin-bottom: 10px;
}

/* ── 31. Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .portal-sidebar { width: 200px; }
}
@media (max-width: 768px) {
  :root { --nav: 60px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav); left: 0; right: 0; background: rgba(250,248,244,0.98); border-bottom: 1px solid var(--border); padding: 12px; gap: 4px; z-index: 800; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .nav-cta { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .steps-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-bar-inner { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 16px; }
  .stat-item:nth-child(even), .stat-item:last-child { border-bottom: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .portal-layout { flex-direction: column; }
  .portal-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); padding: 12px; display: flex; flex-wrap: wrap; gap: 4px; }
  .portal-main { padding: 16px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .assessment-layout { flex-direction: column; }
  .profile-panel { width: 100%; border-top: 1px solid var(--border); height: auto; max-height: 320px; }
  .container, .container-sm { padding: 0 16px; }
  .section { padding: 48px 0; }
  .modal { padding: 24px; margin: 0; }
}
@media (max-width: 480px) {
  .hero { padding: 48px 0 36px; }
  .metric-grid { grid-template-columns: 1fr; }
  .stats-bar-inner { grid-template-columns: 1fr; }
  .stat-item { border: none; }
}
