:root {
  --bg: #0b1320;
  --card: #0f172a;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --accent: #14b8a6;
  --accent-2: #22d3ee;
  --warning: #f59e0b;
  --maxw: 1200px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --hover-shadow: 0 20px 40px rgba(0,0,0,.5);
}
* { box-sizing: border-box }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  line-height: 1.6;
  background: radial-gradient(1200px 800px at 80% -10%, rgba(20,184,166,0.15), transparent 60%) no-repeat, var(--bg);
  color: var(--text);
}
a { color: var(--accent-2); text-decoration: none; transition: color 0.2s ease; }
a:hover { text-decoration: underline; color: #67e8f9; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { left: 12px; top: 12px; width: auto; height: auto; background:#fff; color:#111; padding:8px 12px; border-radius:8px; }
header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(11,19,32,.8); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(148,163,184,.15);
}
.nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 0; }
.brand { grid-column: 1; justify-self: start; display: inline-flex; align-items:center; gap:10px; font-weight: 800; letter-spacing:.2px; }
.logo { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display:grid; place-items:center; color:#002; font-weight:900; }
.nav a { color: var(--text); opacity:.8; transition: opacity 0.2s ease, color 0.2s ease; }
.nav a:hover { opacity: 1; color: var(--accent-2); text-decoration: none; }
.menu { grid-column: 2; justify-self: center; display: flex; gap: 18px; align-items:center; }
.nav > :nth-child(3) { grid-column: 3; justify-self: end; }
.cta {
  display:inline-flex; align-items:center; gap:10px; padding:10px 16px; border-radius:12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06251f; font-weight: 700; border: none; box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
}
.cta:hover { filter: brightness(1.1); transform: translateY(-2px); box-shadow: 0 10px 25px rgba(20,184,166,0.3); text-decoration:none; }
.sos-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 14px; border-radius: 8px;
  background: #dc2626; color: #ffffff; font-weight: 800; font-size: 14px;
  text-decoration: none; letter-spacing: 1px;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
  border: 1px solid #b91c1c; transition: all 0.3s ease;
}
.sos-btn:hover { background: #ef4444; color: #ffffff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4); }
.hero { padding: 56px 0 28px; }
.hero-grid { display:grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; }
.headline { font-size: clamp(28px, 4vw, 44px); line-height:1.15; font-weight: 800; margin: 6px 0 12px; }
.subhead { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); margin: 0 0 18px; }
.hero-card {
  background: linear-gradient(180deg, rgba(20,184,166,.08), rgba(34,211,238,.06));
  border: 1px solid rgba(148,163,184,.2);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.high-contrast .sos-btn {
  background: #000 !important;
  color: #ff0000 !important;
  border: 2px solid #ff0000 !important;
  box-shadow: none !important;
}
section { padding: 36px 0; }
.section-title { font-size: 20px; letter-spacing:.3px; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.h2 { font-size: clamp(22px, 3vw, 32px); margin: 4px 0 6px; }
.grid-3 { display:grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid rgba(148,163,184,.2);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display:flex; flex-direction:column; gap:8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--hover-shadow); }
.pill {
  display:inline-block; font-size: 12px; letter-spacing:.2px; padding:4px 10px; border-radius:999px;
  background: rgba(20,184,166,.14); color: #a7f3d0; border:1px solid rgba(20,184,166,.35);
  box-shadow: 0 2px 10px rgba(20,184,166,0.1);
}
.card h3 { margin: 4px 0; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.card a.more { margin-top: auto; align-self:flex-start; transition: transform 0.2s ease; display: inline-block; }
.card:hover a.more { transform: translateX(5px); }
.callout {
  display:grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items:center;
  background: linear-gradient(135deg, rgba(34,211,238,.08), rgba(20,184,166,.08));
  border: 1px solid rgba(148,163,184,.25);
  border-radius: var(--radius);
  padding: 18px;
}
.hero .pill { margin-bottom: 6px; }
footer {
  border-top: 1px solid rgba(148,163,184,.1);
  background: #020617;
  padding: 32px 0 20px;
  color: var(--muted);
}
.footer-grid { display:flex; flex-direction:column; gap:24px; }
.footer-grid p { margin:0; }
.footnote { font-size: 13px; color: var(--muted); }
.notice { padding:12px 16px; border-radius: 12px; border:1px dashed rgba(148,163,184,.4); background: rgba(148,163,184,.08); color: var(--text);}
.table { width:100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid rgba(148,163,184,.2); padding:10px; text-align:left; }
kbd { background:#111827; border:1px solid #374151; border-radius:6px; padding:2px 6px; font-size:12px; }

/* Crisis Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(2, 6, 23, 0.8); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px;
}
.modal-content {
  background: var(--card); border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius); padding: 30px; width: 100%; max-width: 400px;
  position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  text-align: center;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--muted);
  font-size: 24px; cursor: pointer; transition: color 0.2s;
  line-height: 1; padding: 4px;
}
.modal-close:hover { color: var(--text); }

/* High Contrast Mode for Neurodiversity */
.high-contrast {
  background: #000 !important;
  color: #ffff00 !important;
}
.high-contrast .card, 
.high-contrast .hero-card, 
.high-contrast header, 
.high-contrast footer,
.high-contrast .callout,
.high-contrast .modal-content,
.high-contrast .notice,
.high-contrast input,
.high-contrast textarea {
  background: #000 !important;
  border: 2px solid #ffff00 !important;
  box-shadow: none !important;
}
.high-contrast h1, 
.high-contrast h2, 
.high-contrast h3, 
.high-contrast p, 
.high-contrast a, 
.high-contrast li,
.high-contrast span {
  color: #ffff00 !important;
  text-shadow: none !important;
}
.high-contrast .pill {
  border: 2px solid #ffff00 !important;
  color: #000 !important;
  background: #ffff00 !important;
  font-weight: bold;
}
.high-contrast .cta {
  background: #ffff00 !important;
  color: #000 !important;
  border: 2px solid #fff !important;
}

/* Smooth Theme Transitions */
body, header, footer, .card, .hero-card, .notice, .pill, input, textarea, select, .tab-nav, .tab-btn, svg, a {
  transition-property: background, background-color, color, border-color, box-shadow, transform, fill;
  transition-duration: 0.3s;
  transition-timing-function: ease;
}

/* Light Theme Toggle */
.light-theme {
  --bg: #f8fafc;
  --card: #ffffff;
  --muted: #475569;
  --text: #0f172a;
  --shadow: 0 4px 15px rgba(0,0,0,0.05);
  --hover-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
body.light-theme {
  background: radial-gradient(1200px 800px at 80% -10%, rgba(20,184,166,0.1), transparent 60%) no-repeat, var(--bg);
}
.light-theme header {
  background: rgba(255, 255, 255, 0.85);
}
.light-theme footer {
  background: #f1f5f9;
}
.light-theme .hero-card {
  background: linear-gradient(180deg, rgba(20,184,166,0.1), rgba(34,211,238,0.05));
}
.light-theme input, 
.light-theme textarea, 
.light-theme select {
  background: #ffffff !important;
  color: var(--text) !important;
  border-color: rgba(15,23,42,0.2) !important;
}
.light-theme .notice {
  background: rgba(15,23,42,0.05);
}
.light-theme .pill {
  background: rgba(20,184,166,0.15);
  color: #0f766e;
  border-color: rgba(20,184,166,0.3);
}
.light-theme kbd {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

@media (max-width: 960px) {
  .hero-grid, .callout { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  
  /* Mobile Nav Fix: Stack links instead of hiding them */
  .nav { display: flex; flex-direction: column; gap: 16px; align-items: center; }
}