
:root{
  --bg:#f8fafc; --card:#fff; --text:#0f172a; --muted:#64748b; --line:#e2e8f0;
  --blue:#2563eb; --blue2:#3b82f6; --green:#16a34a; --violet:#7c3aed; --amber:#d97706;
  --danger:#dc2626; --shadow:0 18px 45px rgba(15,23,42,.08); --radius:28px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:linear-gradient(180deg,#f8fafc 0%,#eef2ff 100%);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif}
body{padding-bottom:96px}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.55}
textarea,input,select{
  width:100%;border:1px solid #cbd5e1;border-radius:18px;padding:14px 16px;background:#fff;
  font-size:16px;outline:none;
}
textarea:focus,input:focus,select:focus{border-color:var(--blue);box-shadow:0 0 0 4px rgba(37,99,235,.12)}
label{display:block;margin-bottom:6px;font-size:13px;color:var(--muted);font-weight:600}
.container{max-width:500px;margin:0 auto;padding:16px}
.card{
  background:rgba(255,255,255,.92);backdrop-filter:blur(10px);
  border:1px solid rgba(226,232,240,.9);border-radius:var(--radius);box-shadow:var(--shadow);
  padding:18px;margin-bottom:16px;
}
.hero{
  background:linear-gradient(135deg,#2563eb 0%, #3b82f6 50%, #7c3aed 100%);
  color:#fff;border:none;overflow:hidden;position:relative;
}
.hero:after{
  content:"";position:absolute;right:-40px;top:-50px;width:160px;height:160px;border-radius:999px;
  background:rgba(255,255,255,.12);
}
.hero small,.hero .subtle,.hero p{color:#dbeafe}
h1,h2,h3,h4,p{margin:0}
.h1{font-size:30px;font-weight:850;line-height:1.1}
.h2{font-size:22px;font-weight:800}
.subtle{font-size:14px;color:var(--muted)}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.stat{background:rgba(255,255,255,.16);padding:14px;border-radius:20px;text-align:center}
.stat .num{font-size:28px;font-weight:850}
.btn{
  min-height:48px;border:none;border-radius:18px;padding:12px 16px;font-weight:800;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:transform .05s ease, opacity .2s ease, background .2s ease;
}
.btn:active{transform:scale(.985)}
.btn.block{width:100%}
.btn-primary{background:var(--blue);color:#fff}
.btn-secondary{background:#fff;color:var(--blue)}
.btn-green{background:var(--green);color:#fff}
.btn-violet{background:var(--violet);color:#fff}
.btn-amber{background:var(--amber);color:#fff}
.btn-outline{background:#fff;color:#334155;border:1px solid var(--line)}
.btn-soft{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.btn-danger{background:#fff;color:var(--danger);border:1px solid #fecaca}
.btn-ghost{background:transparent;color:#475569}
.badge{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800}
.badge-blue{background:#eff6ff;color:#1d4ed8}
.badge-violet{background:#f5f3ff;color:#6d28d9}
.badge-green{background:#f0fdf4;color:#15803d}
.badge-amber{background:#fffbeb;color:#a16207}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.row{display:flex;gap:12px;align-items:center}
.stack > * + *{margin-top:12px}
.tags{display:flex;flex-wrap:wrap;gap:8px}
.tag{background:#f5f3ff;color:#6d28d9;border-radius:999px;padding:6px 10px;font-size:12px;font-weight:800}
.icon-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.icon-btn{border:1px solid var(--line);background:#fff;border-radius:20px;padding:12px 8px;text-align:center}
.icon-btn.active{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
.field{margin-bottom:14px}
.field-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.field-actions .btn{min-height:40px;border-radius:14px;padding:8px 12px;font-size:13px}
.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;z-index:30;background:rgba(255,255,255,.96);
  border-top:1px solid var(--line);backdrop-filter:blur(16px);padding:8px 10px calc(env(safe-area-inset-bottom) + 10px);
}
.bottom-nav .inner{max-width:500px;margin:0 auto;display:grid;grid-template-columns:repeat(5,1fr);gap:8px}
.nav-btn{border:none;background:transparent;color:#64748b;min-height:58px;border-radius:18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
.nav-btn.active{background:#eff6ff;color:var(--blue)}
.fab{
  position:fixed;right:16px;bottom:98px;z-index:25;background:var(--blue);color:#fff;border:none;
  min-height:58px;padding:0 18px;border-radius:999px;font-weight:850;box-shadow:0 18px 30px rgba(37,99,235,.24)
}
.step-header{
  position:sticky;top:0;z-index:20;background:rgba(248,250,252,.92);backdrop-filter:blur(8px);
  margin:-16px -16px 14px;padding:12px 16px;border-bottom:1px solid var(--line)
}
.progress{height:8px;background:#e2e8f0;border-radius:999px;overflow:hidden}
.progress > div{height:100%;background:var(--blue);border-radius:999px}
.step-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:8px;margin-top:12px}
.step-chip{border:1px solid var(--line);background:#fff;border-radius:18px;padding:8px 4px;text-align:center;font-size:11px}
.step-chip.active{background:#eff6ff;border-color:#93c5fd}
.step-chip.done{background:#f0fdf4;border-color:#bbf7d0}
.step-dot{
  width:30px;height:30px;border-radius:999px;margin:0 auto 6px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:850
}
.cta-bar{position:fixed;left:0;right:0;bottom:88px;z-index:22;padding:0 16px}
.cta-bar .wrap{
  max-width:500px;margin:0 auto;padding:10px;border-radius:26px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)
}
.entry{border:1px solid var(--line);border-radius:22px;padding:14px;background:#fff}
.empty{border:1px dashed #cbd5e1;background:#f8fafc;border-radius:22px;text-align:center;padding:24px}
.flex-between{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.toggle{
  position:relative;width:48px;height:28px;border:none;border-radius:999px;background:#cbd5e1
}
.toggle span{
  position:absolute;top:3px;left:4px;width:22px;height:22px;border-radius:999px;background:#fff;transition:all .2s
}
.toggle.on{background:var(--blue)}
.toggle.on span{left:22px}
.modal{
  position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:60;display:flex;align-items:center;justify-content:center;padding:16px
}
.modal-card{width:100%;max-width:390px;background:#fff;border-radius:30px;padding:20px;box-shadow:var(--shadow)}
.breath{
  width:160px;height:160px;border-radius:999px;border:4px solid #93c5fd;background:#dbeafe;
  display:flex;align-items:center;justify-content:center;margin:16px auto;transition:transform 1s ease, background .4s ease
}
.breath.inhale{transform:scale(1.1)}
.breath.exhale{transform:scale(.88);background:#dcfce7;border-color:#86efac}
.breath.hold1,.breath.hold2{transform:scale(1);background:#ede9fe;border-color:#c4b5fd}
.coach-card{
  background:linear-gradient(135deg,#0f172a 0%, #1e293b 45%, #312e81 100%);
  color:#fff;border:none;overflow:hidden
}
.coach-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.coach-avatar{
  width:58px;height:58px;border-radius:18px;display:flex;align-items:center;justify-content:center;
  background:rgba(255,255,255,.12);font-size:28px
}
.coach-bubble{
  margin-top:12px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.14);
  border-radius:22px;padding:14px;color:#e2e8f0
}
.coach-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.coach-actions .btn{min-height:42px;border-radius:14px;padding:8px 12px;font-size:13px}
.segmented{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.segmented button{border:1px solid var(--line);background:#fff;color:#334155;border-radius:16px;min-height:44px;font-weight:800}
.segmented button.active{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
.insight-list{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.insight{
  padding:12px;border-radius:18px;background:#eff6ff;border:1px solid #bfdbfe;color:#1e3a8a;font-size:14px
}
.mic-live{
  display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:8px 12px;
  background:#fef2f2;color:#b91c1c;font-weight:800;font-size:12px
}
.range-wrap{background:#f8fafc;padding:14px;border-radius:20px}
.small{font-size:12px}
.tiny{font-size:11px}
.muted{color:var(--muted)}
.help{margin-top:6px;font-size:12px;color:#64748b}
@media (max-width:380px){
  .grid3,.grid2,.segmented,.icon-grid{grid-template-columns:1fr}
  .bottom-nav .inner{grid-template-columns:repeat(5,1fr)}
}

/* NTG Coach v2 accessibility and low-friction additions */
a{color:inherit;text-decoration:none}
.app-disclaimer{padding:8px 16px 32px;text-align:center;color:#64748b;font-size:11px;line-height:1.5}
.onboarding-modal{background:rgba(15,23,42,.68);backdrop-filter:blur(8px)}
.onboarding-card{max-width:460px;padding:24px}
.onboarding-card h2{font-size:26px;line-height:1.15}
.onboarding-icon{width:58px;height:58px;border-radius:18px;background:#eff6ff;display:flex;align-items:center;justify-content:center;font-size:30px;margin-bottom:14px}
.choice-grid{display:grid;gap:10px}
.choice-card{border:1px solid var(--line);background:#fff;border-radius:20px;padding:14px;text-align:left;display:flex;flex-direction:column;gap:5px;color:#334155}
.choice-card strong{font-size:16px;color:#0f172a}
.choice-card span{font-size:13px;color:#64748b;line-height:1.4}
.choice-card.active{border-color:#60a5fa;background:#eff6ff;box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.consent-row{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);background:#f8fafc;border-radius:18px;padding:12px;color:#475569;line-height:1.45;font-size:12px}
.consent-row input{width:20px;height:20px;flex:0 0 auto;margin:0}
.quick-card{border-color:#bbf7d0;background:linear-gradient(180deg,#fff 0%,#f0fdf4 100%)}
.channel-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.channel-option{display:flex;gap:8px;align-items:center;border:1px solid var(--line);border-radius:16px;padding:11px;background:#fff;color:#334155;margin:0}
.channel-option input{width:18px;height:18px;margin:0}
.service-note{border-radius:18px;padding:12px;background:#f8fafc;border:1px solid var(--line);color:#475569;font-size:13px;line-height:1.45}
.crisis-card{background:#fff1f2;border:2px solid #fb7185;border-radius:24px;padding:16px;margin-bottom:14px;color:#881337}
.crisis-title{font-size:17px;font-weight:850;margin-bottom:6px}
.crisis-card p{line-height:1.5}
.large-text{font-size:18px}
.large-text .small{font-size:14px}
.large-text .tiny{font-size:13px}
.large-text textarea,.large-text input,.large-text select{font-size:18px}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
@media (min-width:700px){
  .container{max-width:760px}
  .bottom-nav .inner,.cta-bar .wrap{max-width:760px}
  .card{padding:22px}
  .hero .grid2{max-width:560px}
}
@media (max-width:480px){
  .channel-grid{grid-template-columns:1fr}
  .grid3{grid-template-columns:1fr 1fr}
  .step-chip{font-size:10px;padding:7px 2px}
  .step-dot{width:28px;height:28px}
  .bottom-nav .inner{gap:3px}
  .nav-btn{font-size:10px}
}
