/* ============================================================================
   Acuverity Warrior Baseline — standalone anonymous survey
   Visual language mirrors the LIVE platform (client/src/pages/BaselineSurvey.tsx
   + client/src/index.css): dark navy #1B263B, tactical orange #F16230,
   Barlow Condensed headings, Inter body, JetBrains Mono for tokens.
   The accent is DISCIPLINE-AWARE — it re-themes when the responder picks
   their role (Law Enforcement -> steel blue, Fire/EMS/Dispatch/ER -> orange),
   exactly like the live site's [data-discipline] behavior.
   ========================================================================== */

:root {
  /* Brand surfaces (platform) — deepened navy */
  --navy: #0E1524;
  --navy-2: #172033;
  --navy-3: #232F44;
  --ink: #0A0F1A;

  /* Accent — DISCIPLINE AWARE (default = Fire/EMS tactical orange) */
  --accent: #F16230;
  --accent-hi: #FF7E3C;
  --accent-lo: #B83C05;
  --accent-soft: rgba(241, 98, 48, 0.12);
  --accent-line: rgba(241, 98, 48, 0.35);

  /* Service palette */
  --slate: #708090;
  --silver: #A8A9AD;
  --gold: #D4AF37;
  --sand: #C4B9A3;

  --text: #FFFFFF;
  --text-2: #C0C6CF;
  --text-dim: #8A96A6;
  --border: rgba(112, 128, 144, 0.20);
  --border-2: rgba(112, 128, 144, 0.32);
  --ok: #2D9D72;

  --font-head: 'Barlow Condensed', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

/* ── Discipline overrides (match platform: LE = steel blue) ───────────────── */
[data-discipline="law_enforcement"] {
  --accent: #4A6FA5;
  --accent-hi: #6C8FC4;
  --accent-lo: #33507D;
  --accent-soft: rgba(74, 111, 165, 0.14);
  --accent-line: rgba(74, 111, 165, 0.40);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; }
.hidden { display: none !important; }

/* ── App header (survey chrome) — orange bottom border, logo, BASELINE pill ── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 2px solid var(--accent);
  position: sticky; top: 0; z-index: 20;
  background: rgba(14, 21, 36, 0.96); backdrop-filter: blur(6px);
}
.app-header .brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.app-header .brand img { height: 34px; width: auto; }
.app-header .brand-text {
  font-family: var(--font-head); font-weight: 700; font-size: 20px;
  letter-spacing: 2px; color: #fff; text-transform: uppercase; white-space: nowrap;
}
.app-header .brand-text .accent { color: var(--accent); }
.app-header .brand-text .brand-sub {
  font-size: 13px; letter-spacing: 1.5px; color: var(--text-dim); font-weight: 600;
}
@media (max-width: 520px) { .app-header .brand-text .brand-sub { display: none; } }
.app-header .disc-tag {
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  padding: 4px 10px; border-radius: 4px; white-space: nowrap;
}
.app-header .pill {
  font-family: var(--font-head); font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 4px 9px; border-radius: 4px;
}
/* Right side of the header: status pill + quit/exit button.
   margin-right clears the fixed sound-toggle (42px @ 14px right). */
.app-header .header-right {
  display: flex; align-items: center; gap: 10px; margin-right: 52px;
}
.quit-btn {
  appearance: none; cursor: pointer; font-family: var(--font-head);
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-dim); background: transparent;
  border: 1px solid var(--border-2); border-radius: 6px;
  padding: 6px 11px; display: inline-flex; align-items: center; gap: 5px;
  min-height: 44px; box-sizing: border-box;                 /* min touch target */
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.quit-btn[hidden] { display: none; }
.quit-btn:hover { color: #fff; border-color: var(--slate); background: rgba(112,128,144,0.08); }
.quit-btn:active { transform: translateY(1px); }
.quit-btn .quit-x { font-size: 16px; line-height: 1; font-weight: 400; }
@media (max-width: 640px) {
  /* Tighter on phones — keep it a comfortable tap target but compact */
  .app-header { padding: 10px 14px; }
  .app-header .header-right { gap: 8px; margin-right: 46px; }
  /* The "Baseline" status pill is redundant on phones (the discipline tag
     already shows context) — hide it so the header can't overflow/overlap. */
  .app-header .pill { display: none; }
  /* Keep the discipline tag from colliding — let it shrink & ellipsis. */
  .app-header .brand { flex: 1 1 auto; overflow: hidden; }
  .app-header .disc-tag {
    max-width: 40vw; overflow: hidden; text-overflow: ellipsis;
    flex: 0 1 auto; min-width: 0;
  }
  .app-header .header-right { flex: 0 0 auto; }
  .quit-btn { padding: 6px 10px; font-size: 11px; flex: 0 0 auto; }
}
@media (max-width: 380px) {
  /* Very small phones — collapse Exit to just the × to guarantee no overlap. */
  .app-header .disc-tag { display: none; }
  .quit-btn { padding: 8px 10px; }
  .quit-btn .quit-label { display: none; }
}

/* ── Layout ───────────────────────────────────────────────────────────────── */
.wrap { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; }
.wrap-wide { max-width: 1120px; }
.muted { color: var(--text-dim); font-size: 13px; line-height: 1.55; }

/* ── Landing hero (cinematic) ───────────────────────────────────────────────*/
.hero { text-align: center; padding: 12px 0 4px; }

.hero-cinematic {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 0;
  margin: 4px 0 14px;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 0 90px rgba(0, 0, 0, 0.55);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url('/hero-collage.png') center center / cover no-repeat;
  transform: scale(1.02);
}
/* Fade + darken the collage so the title stays crisp and readable */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 50% 45%, rgba(14, 21, 36, 0.30) 0%, rgba(14, 21, 36, 0.72) 55%, rgba(14, 21, 36, 0.94) 100%),
    linear-gradient(to bottom, rgba(14, 21, 36, 0.45) 0%, rgba(14, 21, 36, 0.30) 45%, rgba(14, 21, 36, 0.92) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 52px 22px;
  text-align: center;
}
.hero-logo {
  width: 100%; max-width: 400px; height: auto; display: block; margin: 0 auto;
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.7));
}
.hero-wordmark {
  font-family: var(--font-head); font-size: 30px; font-weight: 700;
  letter-spacing: 7px; color: var(--accent); text-transform: uppercase;
  margin-top: 10px;
  text-shadow: 0 2px 18px rgba(241, 98, 48, 0.45), 0 1px 3px rgba(0, 0, 0, 0.9);
}
.hero-tagline {
  color: #cdd6e4; font-size: 14px; margin-top: 12px; letter-spacing: .3px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}
@media (max-width: 640px) {
  .hero-cinematic { min-height: 300px; }
  .hero-logo { max-width: 300px; }
  .hero-wordmark { font-size: 22px; letter-spacing: 4px; }
  .hero-inner { padding: 40px 16px; }
}

/* ── Title block (orange divider + uppercase heading) ───────────────────────*/
.title-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.title-kicker .line { height: 2px; width: 40px; background: var(--accent); }
.title-kicker .label {
  font-family: var(--font-head); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--accent);
}
h1.big {
  font-family: var(--font-head); font-size: 34px; line-height: 1.05; font-weight: 700;
  text-transform: uppercase; color: var(--text); margin: 0 0 14px;
}
h1.big .accent { color: var(--accent); }
.lead { color: var(--text-2); font-size: 16px; line-height: 1.6; margin: 0 0 8px; }

/* ── Trust cards ────────────────────────────────────────────────────────────*/
.trust { display: flex; flex-direction: column; gap: 14px; margin: 26px 0; }
.trust-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; background: rgba(14, 21, 36, 0.8);
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
}
.trust-card.silver { border-left-color: var(--silver); }
.trust-card.gold { border-left-color: var(--gold); }
.trust-card .ic { flex-shrink: 0; margin-top: 2px; color: var(--accent); }
.trust-card.silver .ic { color: var(--silver); }
.trust-card.gold .ic { color: var(--gold); }
.trust-card h3 {
  font-family: var(--font-head); font-size: 15px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase; color: var(--text); margin: 0 0 5px;
}
.trust-card p { color: var(--text-dim); font-size: 13px; line-height: 1.55; margin: 0; }
.trust-card p strong { color: var(--text); }

/* ── Sound / haptic toggle + note ──────────────────────────────────────────*/
.sound-toggle {
  position: fixed; top: 14px; right: 14px; z-index: 50;
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy-2); border: 1px solid var(--border-2);
  color: var(--text-2); cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: color .15s ease, border-color .15s ease, transform .05s ease;
}
.sound-toggle:hover { color: var(--accent); border-color: var(--accent-line); }
.sound-toggle:active { transform: translateY(1px); }
.sound-toggle.is-off { color: var(--text-dim); }
.sound-toggle .sound-ic { display: inline-flex; }
.sound-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-dim);
}
.sound-note .ic { flex-shrink: 0; margin-top: 1px; color: var(--accent); }

/* ── Buttons ────────────────────────────────────────────────────────────────*/
.btn {
  appearance: none; border: none; cursor: pointer; font-family: var(--font-head);
  background: linear-gradient(180deg, var(--accent), var(--accent-lo));
  color: #fff; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 15px 26px; border-radius: 8px; font-size: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: filter .15s ease, transform .05s ease;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.btn.ghost {
  background: transparent; color: var(--text-2); border: 1px solid var(--border-2);
  box-shadow: none; font-weight: 600;
}
.btn.ghost:hover { color: #fff; border-color: var(--slate); filter: none; }
.btn.block { width: 100%; justify-content: center; }
.btn-ico { width: 18px; height: 18px; }

/* ── Survey: progress ───────────────────────────────────────────────────────*/
.survey-head { margin-bottom: 22px; }
.sec-counter {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-dim);
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.progress { height: 6px; background: rgba(112,128,144,0.18); border-radius: 999px; overflow: hidden; }
.progress > div {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hi)); transition: width .35s ease;
}
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(112,128,144,0.3); transition: all .2s ease; }
.dot.done { background: var(--accent); }
.dot.current { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); transform: scale(1.15); }

/* ── Survey: section card ───────────────────────────────────────────────────*/
.section-card {
  background: rgba(14, 21, 36, 0.55); border: 1px solid var(--border);
  border-radius: 12px; padding: 26px;
}
.sec-title { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.sec-title .ic {
  width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line);
}
.sec-title h2 {
  font-family: var(--font-head); font-size: 24px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--text); margin: 0;
}
.sec-intro { color: var(--text-dim); font-size: 14px; line-height: 1.55; margin: 4px 0 20px; }

/* ── Questions ──────────────────────────────────────────────────────────────*/
.q { padding: 20px 0; border-top: 1px solid var(--border); }
.q:first-of-type { border-top: none; padding-top: 4px; }
.q .qtext { font-size: 16px; line-height: 1.5; color: var(--text); margin-bottom: 14px; }
.q.q-missing .qtext { color: var(--accent); }
.opt-tag {
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim);
  border: 1px solid var(--border-2); border-radius: 5px; padding: 1px 6px; margin-left: 8px; vertical-align: middle;
}

/* Likert grid (0-4 / 0-3 across) */
.likert { display: grid; gap: 8px; }
.likert .opt { text-align: center; }

/* Generic option list */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.opts.stack { grid-template-columns: 1fr; }
.opts.stack .opt { text-align: left; }

.opt {
  padding: 13px 14px; border-radius: 9px; cursor: pointer; font-size: 14px;
  color: var(--text-2); background: rgba(112, 128, 144, 0.06);
  border: 1px solid var(--border); transition: all .12s ease; user-select: none;
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; box-sizing: border-box;      /* min touch target */
  -webkit-tap-highlight-color: transparent;       /* no grey flash on tap */
  touch-action: manipulation;                     /* kill 300ms double-tap delay */
}
.likert .opt { justify-content: center; }
.opt:hover { border-color: var(--slate); color: #fff; }
.opt.selected {
  background: var(--accent-soft); border-color: var(--accent); color: #fff; font-weight: 600;
}
.opt .radio {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border-2); display: flex; align-items: center; justify-content: center;
}
.opt.selected .radio { border-color: var(--accent); background: var(--accent); }
.opt.selected .radio::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.likert .opt .radio { display: none; }
.q-missing .opt { border-color: var(--accent-line); }

/* Multi-select chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 15px; border-radius: 999px; cursor: pointer; font-size: 13px;
  color: var(--text-2); background: rgba(112, 128, 144, 0.06);
  border: 1px solid var(--border); transition: all .12s ease; user-select: none;
  min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.chip:hover { border-color: var(--slate); color: #fff; }
.chip.selected { background: var(--accent-soft); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip.selected::before { content: "✓ "; }
.chip.chip-none { font-style: italic; }
.chip.chip-none.selected { background: rgba(112,128,144,0.18); border-color: var(--slate); color: #fff; }
.chip-hint { font-size: 12px; color: var(--text-dim); margin: 8px 0 0; }

/* Numeric / text inputs */
.num-input, .txt-input {
  width: 100%; max-width: 280px; background: var(--ink); color: var(--text);
  border: 1px solid var(--border-2); border-radius: 8px; padding: 12px 14px; font-size: 15px;
  font-family: var(--font-body);
}
.num-input:focus, .txt-input:focus { outline: none; border-color: var(--accent); }

/* ── Nav row ────────────────────────────────────────────────────────────────*/
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }
.valmsg {
  margin-top: 18px; padding: 13px 16px; border-radius: 9px; font-size: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
}

/* ── Safety pause ───────────────────────────────────────────────────────────*/
.safety-icon {
  width: 76px; height: 76px; margin: 0 auto 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); border: 2px solid var(--accent); color: var(--accent);
}
.safety-h {
  font-family: var(--font-head); font-size: 30px; font-weight: 700; text-transform: uppercase;
  text-align: center; color: var(--text); margin: 0 0 14px; line-height: 1.1;
}
.safety-h .accent { color: var(--accent); }
.resource {
  display: flex; align-items: center; gap: 16px; padding: 18px;
  border: 1px solid var(--border-2); text-decoration: none; margin-bottom: 12px; border-radius: 8px;
  transition: all .12s ease;
}
.resource.primary { background: var(--accent-soft); border: 2px solid var(--accent); }
.resource:hover { border-color: var(--accent); }
.resource .ric {
  width: 48px; height: 48px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(168,169,173,0.15); color: var(--silver);
}
.resource.primary .ric { background: var(--accent); color: #fff; }
.resource .rname {
  font-family: var(--font-head); font-size: 17px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text); margin: 0;
}
.resource .rdesc { font-size: 13px; color: var(--text-dim); margin: 2px 0 0; }
/* ── "What happens next" card (safety screen) ───────────────────────────────*/
.whn-card {
  margin: 22px 0 4px; padding: 20px; border-radius: 12px;
  background: var(--navy-2); border: 1px solid var(--border-2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
.whn-title {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: 2px;
  font-size: 13px; font-weight: 700; color: var(--text-dim); margin: 0 0 14px;
}
.whn-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; }
.whn-row + .whn-row { border-top: 1px solid var(--border); }
.whn-ic {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line);
}
.whn-row p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-dim); }
.whn-row p strong { color: var(--text); }

.reassure {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px;
  background: rgba(112,128,144,0.06); border: 1px solid var(--border); margin: 20px 0; border-radius: 8px;
}
.reassure .ic { color: var(--slate); flex-shrink: 0; margin-top: 1px; }
.reassure p { font-size: 13px; color: var(--text-dim); line-height: 1.55; margin: 0; }

/* ── Completion ─────────────────────────────────────────────────────────────*/
.done-mark {
  width: 72px; height: 72px; margin: 4px auto 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(180deg, var(--ok), #24734f); box-shadow: 0 8px 24px rgba(45,157,114,0.4);
}
.token-chip {
  font-family: var(--font-mono); background: var(--ink); border: 1px solid var(--border-2);
  padding: 10px 18px; border-radius: 8px; letter-spacing: 4px; font-size: 20px; color: var(--sand);
}
.safety-note {
  margin-top: 18px; padding: 16px; border-radius: 9px; line-height: 1.55; font-size: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--text-2);
}
.safety-note strong { color: #fff; display: block; margin-bottom: 4px; }

/* ── Disclaimers / footer ───────────────────────────────────────────────────*/
.disclaimer {
  font-size: 11px; color: var(--text-dim); margin-top: 22px; line-height: 1.55;
  border-top: 1px dashed var(--border-2); padding-top: 14px;
}
.brand-footer { text-align: center; margin-top: 30px; }
.brand-footer strong { color: var(--accent); }

/* ── Admin (kept readable in dark theme) ────────────────────────────────────*/
.card {
  background: rgba(14, 21, 36, 0.55); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px; margin-bottom: 18px;
}
.card h2 { font-family: var(--font-head); color: var(--accent); font-size: 22px; text-transform: uppercase; letter-spacing: .5px; margin: 0 0 10px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 720px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-grid { grid-template-columns: 1fr; } }
.stat { background: var(--ink); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.stat .n { font-size: 26px; font-weight: 800; font-family: var(--font-head); }
.stat .l { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); margin-top: 2px; }
.bullets { margin: 0; padding-left: 18px; }
.bullets li { margin: 8px 0; line-height: 1.5; color: var(--text-2); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }
.bar { height: 8px; border-radius: 999px; background: rgba(112,128,144,0.18); overflow: hidden; }
.bar > div { height: 100%; border-radius: 999px; background: var(--accent); }
.flag { display: inline-block; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: rgba(112,128,144,0.2); color: var(--slate); border: 1px solid var(--border); }
.flag-hi { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); font-weight: 700; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.pill {
  display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 11px;
  letter-spacing: 1.5px; text-transform: uppercase; background: var(--accent-soft);
  color: var(--accent); border: 1px solid var(--accent-line);
}
input[type=text], input[type=password] {
  background: var(--ink); color: var(--text); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 10px 12px; font-size: 14px; width: 100%;
}
a.link { color: var(--accent); text-decoration: none; }
a.link:hover { text-decoration: underline; }

/* ── Warrior Baseline Resilience Index (WB-RI) card ─────────────────────────*/
.ri-card {
  margin: 8px auto 22px; max-width: 620px; padding: 24px 22px;
  background: linear-gradient(180deg, var(--navy-2), var(--navy));
  border: 1px solid var(--border); border-radius: 16px;
  border-top: 3px solid var(--accent);
}
/* Band tone drives the ring + band color (distinct from platform Alpha–Echo). */
.ri-card.tone-positive { --ri: #2D9D72; }
.ri-card.tone-watch    { --ri: #E0A458; }
.ri-card.tone-elevated { --ri: #E0603A; }

.ri-top { display: flex; align-items: center; gap: 22px; }
@media (max-width: 520px) { .ri-top { flex-direction: column; text-align: center; gap: 14px; } }

.ri-dial { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.ri-ring { width: 132px; height: 132px; transform: rotate(-90deg); }
.ri-ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 10; }
.ri-ring-fg {
  fill: none; stroke: var(--ri, var(--accent)); stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(.22,1,.36,1);
}
.ri-dial-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ri-score { font-family: var(--font-head); font-weight: 800; font-size: 46px; line-height: 1; color: var(--text); }
.ri-outof { font-size: 12px; color: var(--text-dim); margin-top: 2px; letter-spacing: 1px; }

.ri-headings { flex: 1; min-width: 0; }
.ri-kicker {
  font-family: var(--font-head); font-size: 12px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase; color: var(--text-dim); margin-bottom: 4px;
}
.ri-band {
  font-family: var(--font-head); font-weight: 800; font-size: 30px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: .5px; color: var(--ri, var(--accent)); margin-bottom: 14px;
}
.ri-meters { display: flex; flex-direction: column; gap: 8px; }
.ri-meter { display: grid; grid-template-columns: 70px 1fr 42px; align-items: center; gap: 10px; }
@media (max-width: 520px) { .ri-meter { grid-template-columns: 64px 1fr 40px; } }
.ri-meter-l { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-dim); }
.ri-meter-v { font-size: 13px; font-weight: 700; font-family: var(--font-mono); color: var(--text-2); text-align: right; }
.ri-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.ri-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent);
  transition: width 1s cubic-bezier(.22,1,.36,1); }
.ri-bar.reserve span { background: var(--ok); }

.ri-brief {
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border);
}
.ri-brief-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--accent);
}
.ri-brief-title .ic { color: var(--accent); display: inline-flex; }
.ri-bullets { list-style: none; margin: 0; padding: 0; }
.ri-bullets li {
  position: relative; padding-left: 20px; margin: 10px 0;
  font-size: 14px; line-height: 1.55; color: var(--text-2);
}
.ri-bullets li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent);
}
.ri-bullets li strong { color: var(--text); font-weight: 700; }
.ri-method {
  margin: 16px 0 0; font-size: 11.5px; line-height: 1.55; color: var(--text-dim);
}
.ri-method strong { color: var(--text-2); }

/* ── Mobile-responsive (comprehensive smartphone adaptation) ────────────────*/
@media (max-width: 640px) {
  /* Container padding */
  .wrap { max-width: 100%; padding: 20px 18px; }
  
  /* Typography scaling */
  h1.big { font-size: 28px; }
  .lead { font-size: 15px; }
  h1.safety-h { font-size: 24px; }
  
  /* Buttons */
  .btn { font-size: 15px; padding: 13px 22px; }
  .btn.block { width: 100%; }
  
  /* Trust cards */
  .trust-card { padding: 16px; }
  .trust-card h3 { font-size: 13px; }
  .trust-card p { font-size: 12.5px; }
  
  /* Survey question options */
  .opts { grid-template-columns: 1fr; gap: 10px; }
  .opts.stack { grid-template-columns: 1fr; }
  .opt { padding: 14px 16px; font-size: 14px; }
  
  /* Likert scales — force vertical stack on very narrow screens */
  .likert[style*="grid-template-columns"] { 
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  
  /* Multi-select chips */
  .chips { gap: 8px; }
  .chip { padding: 11px 14px; font-size: 13px; }
  
  /* Section card */
  .section-card { padding: 20px 18px; }
  .sec-title h2 { font-size: 20px; }
  .qtext { font-size: 15px; }
  
  /* Navigation row */
  .nav-row { flex-direction: column-reverse; gap: 10px; }
  .nav-row .btn { width: 100%; }
  .nav-row .btn.ghost { margin-top: 4px; }
  
  /* Safety resources */
  .resource { flex-direction: column; align-items: flex-start; padding: 16px; }
  .ric { width: 42px; height: 42px; }
  .rname { font-size: 15px; }
  .rdesc { font-size: 12px; }
  
  /* WHN card */
  .whn-card { padding: 18px; }
  .whn-title { font-size: 13px; }
  .whn-row { font-size: 13px; }
  .whn-ic { width: 36px; height: 36px; }
  
  /* Sound toggle — slightly larger tap target on mobile */
  .sound-toggle { width: 48px; height: 48px; top: 12px; right: 12px; }
  
  /* Disclaimer / footer */
  .disclaimer { font-size: 11px; padding: 14px; }
  .sound-note { font-size: 11.5px; }
}

@media (max-width: 480px) {
  /* Extra-small phones */
  .wrap { padding: 16px 14px; }
  h1.big { font-size: 24px; line-height: 1.15; }
  .hero-tagline { font-size: 13px; }
  .likert[style*="grid-template-columns"] { 
    grid-template-columns: 1fr !important;
  }
  .sec-title { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sec-title h2 { font-size: 18px; }
}
