/* MyMentalWellness — app shell styles (Week 1)
   Tokens first so the theme can be swapped to match the BuzzHive studio GUI. */
:root {
  --bg: #0f1117;
  --bg-elev: #171a23;
  --bg-elev-2: #1e2230;
  --border: #262a36;
  --text: #e8eaf0;
  --text-2: #b7bdcc;
  --muted: #8b93a7;
  --accent: #6ee7b7;
  --accent-ink: #0b1a14;
  --accent-2: #93c5fd;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Inter, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; display: flex; flex-direction: column; padding-top: var(--safe-top); }
a { color: var(--accent); }
button { font: inherit; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 99; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: rgba(15,17,23,.85); backdrop-filter: blur(12px); z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: inline-block; }
.topnav { display: flex; gap: 6px; }
.topnav a, .topnav button { color: var(--text-2); text-decoration: none; padding: 8px 10px; border-radius: 10px; background: none; border: 0; cursor: pointer; font-size: 14px; }
.topnav a.active, .topnav a:hover { color: var(--text); background: var(--bg-elev); }

.screen { flex: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.footer { padding: 24px 16px calc(24px + var(--safe-bottom)); border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.footer p { max-width: 560px; margin: 0 auto 8px; }
.muted { color: var(--muted); }

h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; }
h2 { font-size: 20px; margin: 0 0 8px; }
p.lead { color: var(--text-2); font-size: 17px; line-height: 1.5; margin: 0 0 20px; }

.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 14px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--text-2); line-height: 1.5; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 20px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 600; cursor: pointer; min-height: 48px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn-block { width: 100%; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

label { display: block; font-size: 14px; color: var(--text-2); margin: 0 0 6px; }
input[type=email], input[type=text], select { width: 100%; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-elev-2); color: var(--text); font-size: 16px; min-height: 48px; }
input:focus, select:focus, .btn:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.field { margin-bottom: 14px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.error { color: var(--danger); font-size: 14px; margin-top: 8px; }
.success { color: var(--accent); font-size: 14px; margin-top: 8px; }

.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip { text-align: left; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: pointer; color: var(--text); min-height: 72px; }
.chip small { display: block; color: var(--muted); margin-top: 4px; font-size: 13px; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: rgba(110,231,183,.08); }

.banner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; font-size: 14px; }
.banner-safety { background: rgba(147,197,253,.10); border-bottom: 1px solid rgba(147,197,253,.25); color: var(--text-2); }

.install-sheet { position: fixed; inset: auto 0 0 0; padding: 12px 12px calc(12px + var(--safe-bottom)); z-index: 30; }
.install-card { max-width: 560px; margin: 0 auto; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.install-card h3 { margin: 0 0 6px; }
.install-card p { margin: 0 0 14px; color: var(--text-2); }

.crisis { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow: auto; padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); }
.crisis-inner { max-width: 560px; margin: 0 auto; }
.crisis h1 { font-size: 26px; }
.crisis .res { display: block; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 10px; color: var(--text); text-decoration: none; }
.crisis .res strong { display: block; font-size: 16px; }
.crisis .res span { color: var(--text-2); font-size: 14px; }
.crisis .res .cta { display: inline-block; margin-top: 8px; color: var(--accent); font-weight: 600; }
.crisis .section { margin: 22px 0 8px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.center { text-align: center; }
.spacer { height: 12px; }
@media (min-width: 600px) { h1 { font-size: 34px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
