/* NJ SafeAI Hub — Comprehensive Stylesheet */
/* ───────────────────────────────────────── */

/* ── Variables ───────────────────────────── */
:root {
  --primary: #1a472a;
  --primary-light: #2d6a4f;
  --primary-lighter: #52b788;
  --primary-bg: #f0f7f0;
  --primary-border: #c8e6c9;
  --accent: #1e40af;
  --accent-light: #3b82f6;
  --accent-bg: #eff6ff;
  --accent-border: #bfdbfe;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --success: #059669;
  --success-bg: #ecfdf5;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.12);
  --transition: all .2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--primary-bg); color: var(--gray-800); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Skip Link (Accessibility) ───────────── */
.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 9999;
  background: var(--primary); color: var(--white); padding: 8px 16px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: .9em;
}
.skip-link:focus { top: 8px; }

/* ── Screen-reader only ──────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Focus Indicators ────────────────────── */
:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Navigation ──────────────────────────── */
.main-nav {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-size: 1.3em;
  font-weight: 800;
  color: var(--white);
  letter-spacing: 0.5px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  color: rgba(255,255,255,.85);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9em;
  font-weight: 500;
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,.15);
  color: var(--white);
}
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,.25);
}
.nav-user-name {
  color: rgba(255,255,255,.9);
  font-size: .85em;
  font-weight: 500;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5em;
  cursor: pointer;
}

/* ── Buttons ─────────────────────────────── */
.btn-sm {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: .85em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
}
.btn-primary {
  background: var(--white);
  color: var(--primary);
}
.btn-primary:hover { background: var(--primary-border); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: var(--white); }
.btn {
  background: linear-gradient(135deg, #43a047, var(--primary-light));
  color: var(--white);
  border: none;
  padding: 14px 24px;
  width: 100%;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: .5px;
  transition: var(--transition);
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.2); }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
}
.btn-accent {
  background: linear-gradient(135deg, var(--accent), #1e3a8a);
}
.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-inline {
  width: auto;
  padding: 10px 20px;
}

/* ── Hero Sections ───────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
  color: var(--white);
  padding: 48px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero h1 { font-size: 2.4em; margin-bottom: 10px; letter-spacing: 1px; font-weight: 800; }
.hero p { font-size: 1.05em; opacity: .92; max-width: 620px; margin: 0 auto; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.hero-badge {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: .82em;
  font-weight: 500;
}

/* ── Landing Page ────────────────────────── */
.landing-hero {
  padding: 72px 20px 56px;
  background: linear-gradient(135deg, #0f2b1a 0%, var(--primary) 40%, var(--primary-lighter) 100%);
}
.hero-glow {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(82,183,136,.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tagline {
  display: inline-block;
  font-size: .85em;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.15);
  padding: 6px 18px;
  border-radius: 999px;
  letter-spacing: .3px;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}
.landing-title {
  font-size: 2.8em !important;
  margin-bottom: 12px !important;
}
.landing-subtitle {
  font-size: 1.2em !important;
  opacity: .95 !important;
  margin-bottom: 8px !important;
}
.landing-cta {
  display: inline-flex !important;
  width: auto !important;
  padding: 16px 36px !important;
  font-size: 1.1em !important;
  margin-top: 24px;
  background: linear-gradient(135deg, #fff, #e2e8f0) !important;
  color: var(--primary) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.2) !important;
}
.landing-cta:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 30px rgba(0,0,0,.3) !important;
}

.landing-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px;
}
.section-title {
  text-align: center;
  font-size: 1.8em;
  color: var(--primary);
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--gray-500);
  font-size: 1.05em;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* How It Works Steps */
.steps-row {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.step-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  flex: 1;
  min-width: 200px;
  max-width: 260px;
  position: relative;
  transition: var(--transition);
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary-lighter));
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-weight: 800;
  font-size: .9em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(26,71,42,.3);
}
.step-icon { font-size: 2.4em; margin: 8px 0 12px; }
.step-card h3 { font-size: 1em; color: var(--primary); margin-bottom: 6px; }
.step-card p { font-size: .85em; color: var(--gray-500); line-height: 1.5; }
.step-connector {
  display: flex;
  align-items: center;
  font-size: 1.5em;
  color: var(--gray-300);
  padding: 0 12px;
  font-weight: 700;
}

/* Stats Strip */
.landing-stats-strip {
  background: var(--primary);
  color: var(--white);
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-lg);
}
.landing-stat {
  flex: 1;
  min-width: 140px;
  padding: 24px 16px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.15);
}
.landing-stat:last-child { border-right: none; }
.landing-stat-num {
  display: block;
  font-size: 2em;
  font-weight: 800;
  color: var(--primary-lighter);
}
.landing-stat-label {
  display: block;
  font-size: .78em;
  text-transform: uppercase;
  letter-spacing: .5px;
  opacity: .8;
  margin-top: 4px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  transition: var(--transition);
  border: 1px solid transparent;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-border);
}
.feature-card-highlight {
  border: 2px solid var(--primary-lighter);
  background: linear-gradient(to bottom right, var(--white), var(--primary-bg));
}
.feature-icon {
  font-size: 2em;
  margin-bottom: 12px;
  display: block;
}
.feature-card h3 {
  font-size: 1.05em;
  color: var(--primary);
  margin-bottom: 6px;
}
.feature-card p {
  font-size: .88em;
  color: var(--gray-600);
  line-height: 1.6;
}
.feature-tag {
  display: inline-block;
  margin-top: 10px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: .73em;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* Comparison Table */
.comparison-table-wrap { overflow-x: auto; }
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .88em;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.comparison-table thead th {
  background: var(--gray-100);
  padding: 14px 18px;
  text-align: center;
  font-weight: 700;
  color: var(--gray-700);
  font-size: .85em;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.comparison-table thead th:first-child { text-align: left; }
.comparison-table thead th.us-col {
  background: var(--primary);
  color: var(--white);
}
.comparison-table tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--gray-100);
  text-align: center;
  background: var(--white);
}
.comparison-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
}
.comparison-table tbody td.us-col {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 700;
}
.comparison-table tbody tr:hover td { background: var(--gray-50); }
.comparison-table tbody tr:hover td.us-col { background: #e0f0e0; }

/* CTA Section */
.landing-cta-section {
  text-align: center;
  padding: 48px 20px;
  max-width: 600px;
  margin: 0 auto;
}
.landing-cta-section h2 {
  font-size: 1.8em;
  color: var(--primary);
  margin-bottom: 10px;
}
.landing-cta-section p {
  color: var(--gray-600);
  font-size: 1.05em;
  margin-bottom: 24px;
  line-height: 1.6;
}
.cta-footnote {
  margin-top: 10px;
  font-size: .82em;
  color: var(--gray-400);
}

/* ── Dashboard Insights ──────────────────── */
.insights-card {
  border-left: 5px solid var(--primary-lighter);
}
.insights-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.insight-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
  align-items: flex-start;
}
.insight-icon {
  font-size: 1.5em;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
}
.insight-item strong { color: var(--gray-800); font-size: .95em; display: block; margin-bottom: 4px; }
.insight-item p { color: var(--gray-600); font-size: .85em; margin: 0; line-height: 1.5; }
.insight-action {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
}
.insight-action .insight-icon { background: var(--accent); color: var(--white); border-radius: 10px; }
.insight-priority {
  background: var(--warning-bg);
  border: 1px solid #fcd34d;
}
.insight-priority .insight-icon { background: var(--warning); color: var(--white); border-radius: 10px; }
.insight-tip {
  background: var(--primary-bg);
  border: 1px solid var(--primary-border);
}
.insight-tip .insight-icon { background: var(--primary-lighter); color: var(--white); border-radius: 10px; }
.insight-success {
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
}
.insight-success .insight-icon { background: var(--success); color: var(--white); border-radius: 10px; }

/* ── Main Content ────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px;
}
.container-narrow { max-width: 920px; margin: 0 auto; }

/* ── Flash messages ──────────────────────── */
.flash-container { margin-bottom: 16px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .9em;
  font-weight: 500;
  margin-bottom: 8px;
  transition: opacity .5s ease;
}
.flash.fade-out { opacity: 0; }
.flash-error, .flash-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; }
.flash-info { background: var(--accent-bg); color: var(--accent); border: 1px solid var(--accent-border); }
.flash-warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fcd34d; }

/* ── Cards ───────────────────────────────── */
.card {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: box-shadow .3s ease;
}
.card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.1);
}
.card h2 {
  color: var(--primary);
  margin-bottom: 8px;
  font-size: 1.35em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* ── Tabs ────────────────────────────────── */
.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 24px;
}
.tabs button {
  background: var(--primary-light);
  color: var(--white);
  border: none;
  padding: 10px 4px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}
.tabs button:hover { background: var(--primary); transform: translateY(-2px); }
.tabs button.active { background: var(--primary); border-bottom: 3px solid var(--primary-lighter); }
.tab-icon { font-size: 1.4em; }
.tab { display: none; }
.tab.active { display: block; animation: fadeIn .35s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Forms ───────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 8px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
label { font-weight: 600; color: var(--primary); font-size: .9em; display: flex; align-items: center; gap: 6px; }
input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  transition: border .2s;
  background: var(--gray-50);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary-lighter);
  outline: none;
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
}
textarea { resize: vertical; min-height: 100px; }
.char-counter { font-size: .78em; color: var(--gray-500); text-align: right; margin-top: 2px; }

/* ── Hint / Tip ──────────────────────────── */
.hint {
  color: var(--gray-600);
  font-size: .87em;
  margin-bottom: 18px;
  background: #e8f5e9;
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  border-left: 4px solid var(--primary-lighter);
}
.tip {
  display: inline-block;
  background: var(--primary-light);
  color: var(--white);
  border-radius: 50%;
  width: 17px;
  height: 17px;
  font-size: .7em;
  text-align: center;
  line-height: 17px;
  cursor: help;
  position: relative;
}
.tip:hover::after {
  content: attr(data-tip);
  position: absolute;
  left: 22px;
  top: -4px;
  background: var(--gray-800);
  color: var(--white);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
  font-weight: normal;
}

/* ── Output ──────────────────────────────── */
.output-wrap { position: relative; margin-top: 6px; }
.output {
  background: #f6fdf6;
  border: 1.5px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 90px;
  font-size: 14px;
  line-height: 1.75;
  word-wrap: break-word;
}
.output h2,.output h3,.output h4{margin:18px 0 8px;color:var(--primary);font-weight:700}
.output .ai-heading{margin:18px 0 8px;color:#1a472a}
.output .ai-section{font-size:1rem;font-weight:700;color:#1a472a;margin:22px 0 8px;padding-bottom:4px;border-bottom:1px solid #d4e8d4}
.output .ai-section:first-child{margin-top:0}
.output p{margin:0 0 12px;line-height:1.8}
.output p:last-child{margin-bottom:0}
.output ul,.output ol{margin:10px 0 14px;padding-left:24px}
.output li{margin:5px 0;line-height:1.7}
.output strong{font-weight:700}
.output code{background:#e8f5e9;padding:1px 5px;border-radius:4px;font-size:13px}
.output hr{border:none;border-top:1px solid #d4e8d4;margin:16px 0}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.copy-btn:hover { transform: scale(1.07); }
.output-wrap:hover .copy-btn { opacity: 1; }

/* ── Standard desc ───────────────────────── */
#l1 { max-width: 100%; width: 100%; overflow: hidden; text-overflow: ellipsis; }
.std-desc {
  background: #e8f5e9;
  border-left: 3px solid var(--primary-lighter);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: #2d4a35;
  margin-top: 6px;
  display: none;
  line-height: 1.5;
}
.std-desc.show { display: block; }
.std-tip {
  margin-top: 6px;
  padding: 6px 10px;
  background: #fff9c4;
  border-radius: 6px;
  font-size: 13px;
  color: #5d4037;
  border-left: 3px solid #fbc02d;
}

/* ── Badges ──────────────────────────────── */
.new-badge {
  background: #e8f5e9;
  color: var(--primary-light);
  border: 1px solid #a5d6a7;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: .7em;
  font-weight: bold;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .75em;
  font-weight: 600;
}
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-yellow { background: var(--warning-bg); color: #92400e; }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-blue { background: var(--accent-bg); color: var(--accent); }
.badge-orange { background: #fff7ed; color: #9a3412; }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-white {
  background: rgba(255,255,255,.2);
  color: var(--white);
  border: 1px solid rgba(255,255,255,.4);
  backdrop-filter: blur(4px);
}

/* ── Related buttons ─────────────────────── */
.related-btns { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.related-label { font-size: .8em; color: var(--gray-500); font-weight: 600; }
.related-btns button {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: .8em;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.related-btns button:hover { background: #dbeafe; transform: translateY(-1px); }

/* ── Spinner ─────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── HR ──────────────────────────────────── */
hr { border: none; border-top: 1px solid var(--gray-200); margin: 18px 0; }

/* ── Footer ──────────────────────────────── */
.main-footer {
  background: var(--gray-800);
  color: var(--gray-300);
  padding: 40px 20px 24px;
  margin-top: 40px;
}
.footer-container { max-width: 1200px; margin: 0 auto; }
.footer-brand { margin-bottom: 24px; }
.footer-brand strong { color: var(--white); font-size: 1.1em; }
.footer-brand p { font-size: .9em; margin-top: 4px; }
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}
.footer-col h4 { color: var(--white); font-size: .85em; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.footer-col a, .footer-col span { display: block; font-size: .85em; padding: 3px 0; color: var(--gray-400); transition: color .2s; }
.footer-col a:hover { color: var(--primary-lighter); }
.footer-divider { border-color: var(--gray-700); margin: 20px 0; }
.footer-bottom { text-align: center; font-size: .82em; padding-top: 8px; }
.footer-bottom p { margin-bottom: 10px; line-height: 1.6; }
.footer-disclaimer { color: var(--gray-500); font-size: .85em; font-style: italic; max-width: 720px; margin: 0 auto 10px; }
.footer-copyright { color: var(--gray-400); margin-top: 16px; font-weight: 600; letter-spacing: .3px; }

/* ── Auth Pages ──────────────────────────── */
.auth-container {
  max-width: 460px;
  margin: 40px auto;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.auth-card h1 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 6px;
  font-size: 1.7em;
}
.auth-card .auth-subtitle {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 28px;
  font-size: .9em;
}
.auth-card .field { margin-bottom: 16px; }
.auth-card .btn { margin-top: 8px; }
.auth-links {
  text-align: center;
  margin-top: 20px;
  font-size: .88em;
  color: var(--gray-500);
}
.auth-links a { color: var(--primary-light); font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }
.email-hint, .hint {
  font-size: .78em;
  color: var(--gray-400);
  margin-top: 4px;
}
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0 12px;
  color: var(--gray-400);
  font-size: .82em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--gray-600);
}
.auth-divider span { padding: 0 10px; }

/* ── Dashboard ───────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.stat-number { font-size: 2.2em; font-weight: 800; color: var(--primary); }
.stat-label { font-size: .85em; color: var(--gray-500); margin-top: 4px; }
.stat-card.accent { border-bottom-color: var(--accent); }
.stat-card.accent .stat-number { color: var(--accent); }
.stat-card.warning { border-bottom-color: var(--warning); }
.stat-card.warning .stat-number { color: var(--warning); }
.stat-card.danger { border-bottom-color: var(--danger); }
.stat-card.danger .stat-number { color: var(--danger); }

/* ── Data Tables ─────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .88em;
}
.data-table thead th {
  background: var(--primary);
  color: var(--white);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  font-size: .85em;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.data-table tbody tr:hover { background: var(--primary-bg); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── NJSLA Hub ───────────────────────────── */
.njsla-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--accent-light) 50%, var(--primary-lighter) 100%);
}
.genesis-status-bar, .status-bar {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: .88em;
}
.njsla-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.njsla-format-card {
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
}
.njsla-format-card h4 { color: var(--accent); font-size: .95em; margin-bottom: 6px; }
.njsla-format-card p { font-size: .85em; color: var(--gray-600); }
.standard-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-bg);
  border: 1px solid var(--primary-border);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78em;
  font-weight: 600;
  margin: 2px;
}

/* ── Practice Test ───────────────────────── */
.practice-container { max-width: 800px; margin: 0 auto; }
.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--accent-light);
}
.question-number {
  font-size: .8em;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.question-text { font-size: 1.05em; margin-bottom: 16px; line-height: 1.7; }
.question-choices { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.choice-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: .95em;
  width: 100%;
  box-sizing: border-box;
}
.choice-label:hover { border-color: var(--accent-light); background: var(--accent-bg); }
.choice-label input[type="radio"] { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--accent-light); }
.choice-letter { font-weight: 700; flex: 0 0 auto; min-width: 24px; }
.choice-text { flex: 1; min-width: 0; }
.choice-label.selected { border-color: var(--accent-light); background: var(--accent-bg); }
.choice-label.correct { border-color: var(--success); background: var(--success-bg); }
.choice-label.incorrect { border-color: var(--danger); background: var(--danger-bg); }
.question-standard { margin-top: 12px; }
.question-explanation {
  margin-top: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: .9em;
  display: none;
}
.question-explanation.show { display: block; }
.question-explanation.correct-exp { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.question-explanation.incorrect-exp { background: var(--danger-bg); color: #991b1b; border: 1px solid var(--danger-border); }

/* ── Practice Progress Bar ───────────────── */
.progress-bar-container {
  background: var(--gray-200);
  border-radius: 999px;
  height: 8px;
  margin: 12px 0;
  overflow: hidden;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--primary-lighter), var(--accent-light));
  height: 100%;
  border-radius: 999px;
  transition: width .4s ease;
}

/* ── Student Roster Grid ─────────────────── */
.student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.student-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  border-left: 4px solid var(--primary-lighter);
  transition: var(--transition);
  cursor: pointer;
}
.student-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.student-card h4 { color: var(--gray-800); font-size: .95em; margin-bottom: 6px; }
.student-card .student-meta { font-size: .8em; color: var(--gray-500); margin-bottom: 8px; }
.student-card .student-levels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ── Mastery Heatmap ─────────────────────── */
.mastery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.mastery-cell {
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: .8em;
  font-weight: 600;
}
.mastery-exceeding { background: #065f46; color: var(--white); }
.mastery-meeting { background: #059669; color: var(--white); }
.mastery-proficient { background: #34d399; color: #065f46; }
.mastery-approaching { background: #fcd34d; color: #78350f; }
.mastery-not-yet { background: #fca5a5; color: #7f1d1d; }

/* ── Session card ────────────────────────── */
.session-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent-light);
  margin-bottom: 12px;
}
.session-card .session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.session-card .session-title { font-weight: 700; color: var(--gray-800); }
.session-card .session-meta { font-size: .83em; color: var(--gray-500); }

/* ── Legal pages ─────────────────────────── */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}
.legal-content h1 {
  color: var(--primary);
  font-size: 1.8em;
  margin-bottom: 8px;
}
.legal-content .legal-updated {
  color: var(--gray-500);
  font-size: .85em;
  margin-bottom: 28px;
}
.legal-content h2 {
  color: var(--primary-light);
  font-size: 1.2em;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-border);
}
.legal-content p, .legal-content li {
  color: var(--gray-700);
  line-height: 1.8;
  margin-bottom: 10px;
}
.legal-content ul { padding-left: 24px; }
.legal-content li { margin-bottom: 6px; }
.legal-highlight {
  background: var(--primary-bg);
  border-left: 4px solid var(--primary-lighter);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}

/* ── Responsive ──────────────────────────── */
@media (min-width: 500px) {
  .form-row.two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 16px;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,.2);
  }
  .nav-links.open { display: flex; }
  .nav-user { border-left: none; padding-left: 0; margin-left: 0; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.2); }
  .hero h1 { font-size: 1.6em; }
  .landing-title { font-size: 2em !important; }
  .njsla-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .step-connector { display: none; }
  .steps-row { gap: 20px; }
  .step-card { max-width: 100%; }
  .landing-stats-strip { border-radius: var(--radius); }
  .landing-stat { min-width: 100px; padding: 16px 10px; }
  .feature-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: .8em; }
}
@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
}

/* ── Select optgroup ─────────────────────── */
select optgroup { font-weight: bold; color: var(--primary); }

/* ── Status indicators ────────────────────── */
.genesis-status, .status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .8em;
  font-weight: 600;
}
.genesis-connected, .status-connected { background: var(--success-bg); color: var(--success); }
.genesis-demo, .status-demo { background: var(--warning-bg); color: #92400e; }

/* ── Active dot ──────────────────────────── */
.active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.active-dot.live { background: var(--success); animation: pulse 2s infinite; }
.active-dot.ended { background: var(--gray-400); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ── Filter bar ──────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-bar input, .filter-bar select {
  width: auto;
  min-width: 160px;
  padding: 8px 12px;
  font-size: .85em;
}

/* ── Empty state ─────────────────────────── */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 3em; margin-bottom: 10px; }
.empty-state p { font-size: .95em; }

/* ── NJSLA differentiators banner ────────── */
.diff-banner {
  background: linear-gradient(135deg, var(--accent-bg), #e0f2fe);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.diff-banner h3 { color: var(--accent); font-size: 1em; margin-bottom: 10px; }
.diff-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.diff-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: .85em;
  color: var(--gray-700);
}
.diff-item .diff-icon { font-size: 1.2em; flex-shrink: 0; }

/* ── Tooltip ─────────────────────────────── */
[data-tooltip] { position: relative; cursor: help; }
[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-800);
  color: var(--white);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: .78em;
  white-space: nowrap;
  z-index: 10;
  pointer-events: none;
}

/* ── Sortable Table Headers ──────────────── */
.sortable { cursor: pointer; user-select: none; }
.sortable:hover { color: var(--accent); }

/* ── Live Classroom Monitor ──────────────── */
.live-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.live-stat {
  text-align: center;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
}
.live-stat-num {
  font-size: 1.6em;
  font-weight: 800;
  color: var(--primary);
  display: block;
}
.live-stat-num.live-correct { color: var(--success); }
.live-stat-label {
  font-size: .78em;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.live-student-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gray-100);
}
.live-student-row:last-child { border-bottom: none; }
.live-student-name { font-weight: 600; min-width: 140px; }
.live-student-bar { flex: 1; height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.live-student-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.live-student-fill.good { background: var(--success); }
.live-student-fill.mid { background: var(--warning); }
.live-student-fill.low { background: var(--danger); }
.live-student-pct { font-weight: 700; min-width: 42px; text-align: right; font-size: .9em; }

/* ── Flag for Review (Practice Test) ─────── */
.flag-btn {
  background: none; border: none; cursor: pointer;
  font-size: 1.1em; padding: 4px 8px; border-radius: 6px;
  transition: var(--transition);
}
.flag-btn:hover { background: var(--warning-bg); }
.flag-btn.flagged { color: var(--warning); }
.flagged-nav { border: 2px solid var(--warning) !important; }

/* ── Print Results Button ────────────────── */
.results-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* ── Reduced Motion ──────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print Styles ────────────────────────── */
@media print {
  .main-nav, .main-footer, .skip-link,
  .print-only-hide, .btn, .btn-sm,
  .filter-bar, #backToTop,
  .practice-actions, .lock-toggle,
  .copy-btn, .nav-toggle { display: none !important; }
  body { background: white; color: black; font-size: 11pt; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .main-content { padding: 0; }
  .hero { background: none !important; color: black !important; padding: 10px 0; }
  .hero h1 { font-size: 18pt; }
  .data-table th, .data-table td { padding: 4px 8px; font-size: 9pt; }
  .badge-pill { border: 1px solid #999; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .results-summary { break-inside: avoid; }
  a[href]::after { content: none; }
}
