/* ==========================================================================
   Big Rooter West - Modern Industrial Safety Portal Design System
   Sleek, modern, and high-performance while maintaining 100% glove-friendly
   56px+ touch targets and high-contrast sunlight legibility.
   ========================================================================== */

:root {
  /* Color Palette - Light Mode */
  --bg: #f4f6f9;
  --bg-gradient: radial-gradient(120% 120% at 50% 0%, #ffffff 0%, #eef2f6 100%);
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #edf2f7;
  --surface-glass: rgba(255, 255, 255, 0.88);
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-muted: #64748b;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --line-hover: #94a3b8;

  /* Brand Accents */
  --accent: #d97706;          /* Rich Safety Amber */
  --accent-hover: #b45309;
  --accent-light: #fef3c7;
  --accent-glow: rgba(217, 119, 6, 0.22);
  --accent-ink: #ffffff;

  /* Semantics */
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;
  --danger-glow: rgba(220, 38, 38, 0.18);
  --ok: #059669;
  --ok-bg: #ecfdf5;
  --ok-line: #a7f3d0;
  --ok-glow: rgba(5, 150, 105, 0.18);
  --focus: #2563eb;
  --focus-glow: rgba(37, 99, 235, 0.25);

  /* Geometry & Shadows */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.8);
  --shadow-active: 0 0 0 3px var(--accent-glow), 0 4px 12px var(--accent-glow);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 0.15s;
  --duration-normal: 0.22s;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Color Palette - Dark Titanium */
    --bg: #0b0f17;
    --bg-gradient: radial-gradient(120% 120% at 50% 0%, #151d2a 0%, #0b0f17 100%);
    --surface: #131b26;
    --surface-2: #1a2332;
    --surface-3: #222d3e;
    --surface-glass: rgba(19, 27, 38, 0.85);
    --ink: #f8fafc;
    --ink-soft: #cbd5e1;
    --ink-muted: #94a3b8;
    --line: #243042;
    --line-strong: #334155;
    --line-hover: #475569;

    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --accent-light: #2d2006;
    --accent-glow: rgba(245, 158, 11, 0.28);
    --accent-ink: #0b0f17;

    --danger: #f87171;
    --danger-hover: #ef4444;
    --danger-bg: #271415;
    --danger-line: #451a1c;
    --danger-glow: rgba(248, 113, 113, 0.22);
    --ok: #34d399;
    --ok-bg: #0c271b;
    --ok-line: #134e35;
    --ok-glow: rgba(52, 211, 153, 0.22);
    --focus: #60a5fa;
    --focus-glow: rgba(96, 165, 250, 0.3);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 32px -6px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 12px 36px -6px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
}

/* ---- Resets & Base ---- */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 { font-size: clamp(24px, 5.5vw, 32px); margin: 0 0 10px; }
h2 { font-size: clamp(20px, 4.5vw, 24px); margin: 20px 0 10px; }
h3 { font-size: 18px; margin: 16px 0 8px; }

.lede {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 20px;
  line-height: 1.5;
}

.help {
  font-size: 14.5px;
  color: var(--ink-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}

.req {
  color: var(--danger);
  font-style: normal;
  margin-left: 2px;
}

/* ---- Topbar Chrome ---- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  transition: border-color var(--duration-fast) var(--ease);
}

.topbar-inner {
  max-width: 680px;
  margin: 0 auto;
  /* Three columns so the brand sits dead centre whatever width the toggle is. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.topbar-inner .brand { grid-column: 2; }
.topbar-inner .lang-toggle { grid-column: 3; justify-self: end; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: clamp(18px, 4.5vw, 21px);
  letter-spacing: -0.03em;
  transition: opacity var(--duration-fast) var(--ease);
}

.brand:hover {
  opacity: 0.9;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 12px var(--accent-glow);
  flex: none;
}

.brand-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55vw;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  transition: all var(--duration-fast) var(--ease);
}

.lang-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--surface-3);
  transform: translateY(-1px);
}

/* ---- Hero Section ---- */

.hero {
  position: relative;
  background:
    radial-gradient(100% 120% at 50% 0%, rgba(245, 158, 11, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, #131a24 0%, #0c1017 100%);
  color: #f8fafc;
  padding: 36px 16px 32px;
  overflow: hidden;
}

.hero-inner {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-kicker-wrap {
  margin-bottom: 12px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-head {
  color: #ffffff;
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 12px;
}

.hero-sub {
  color: #cbd5e1;
  font-size: clamp(16px, 4.2vw, 18.5px);
  line-height: 1.48;
  max-width: 32em;
  margin: 0 auto 24px;
}

/* Trust Badges */
.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
}

.trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.trust-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  flex: none;
}

.trust-icon svg {
  width: 17px;
  height: 17px;
}

/* Sleek ambient divider */
.hero-accent-strip {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, #f59e0b 50%, transparent 100%);
  opacity: 0.85;
}

/* ---- Main Content Wrapper ---- */

.wrap {
  flex: 1;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ---- Notice Cards ---- */

.note {
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.5;
  transition: all var(--duration-fast) var(--ease);
}

/* Emergency 911 Banner */
.note-911 {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  box-shadow: 0 4px 14px var(--danger-glow);
}

.note-911-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.note-911-main {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 650;
}

.note-911-icon {
  flex: none;
  color: var(--danger);
}

.btn-911 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--danger);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  flex: none;
  box-shadow: 0 2px 8px var(--danger-glow);
  transition: all var(--duration-fast) var(--ease);
}

.btn-911:hover {
  background: var(--danger-hover);
  transform: scale(1.03);
}

/* Onsite medic variant: same layout, calmer colour, 911 as a quiet second line. */
.note-medic {
  background: var(--ok-bg);
  border: 1px solid var(--ok-line);
  color: var(--ok);
  box-shadow: 0 4px 14px var(--ok-glow);
}
.note-medic .note-911-icon { color: var(--ok); }
.btn-medic { background: var(--ok); box-shadow: 0 2px 8px var(--ok-glow); white-space: nowrap; }
.btn-medic:hover { background: var(--ok); filter: brightness(0.92); }
.note-medic-911 {
  margin: 10px 0 0;
  padding-top: 8px;
  text-align: center;
  border-top: 1px solid var(--ok-line);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}
.note-medic-911 a { color: var(--danger); font-weight: 800; text-decoration: none; }
/* Medic banner: heading on top, number centred underneath, at every width. */
.note-medic-inner { flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.note-medic .note-911-main { flex-direction: column; gap: 6px; }
.btn-medic { justify-content: center; padding: 12px 22px; font-size: 16px; min-width: 60%; }

/* Safety team button under the banner */
.note-team {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.note-team:active { background: var(--surface-2); }
.team-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
}
.team-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.team-head { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.team-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Contacts modal opened by the safety team button */
.contacts-modal {
  width: min(520px, calc(100vw - 32px));
  max-height: min(88vh, 100% - 32px);
  margin: auto;
  padding: 20px 20px 22px;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  overflow: auto;
}
.contacts-modal::backdrop { background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(2px); }
.contacts-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.contacts-modal-title { margin: 0; font-size: 22px; }
.contacts-modal-x {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.contacts-modal-x:hover { background: var(--surface-2); }
.contacts-modal-lede { margin: 6px 0 0; color: var(--ink-soft); font-size: 15px; }
.contacts-modal .contacts-group { margin-top: 18px; }
.contacts-modal .contacts-911 { margin-top: 18px; }
.contacts-modal-back { width: 100%; margin-top: 16px; gap: 8px; }
.team-names { font-size: 14.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-arrow { flex: none; font-size: 28px; line-height: 1; color: var(--accent); font-weight: 700; }

/* Where am I */
.where { margin-top: 18px; }
.where-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.where-btn svg { flex: none; }
.where-result {
  margin-top: 18px;
  padding: 18px;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px var(--accent-glow);
}
.where-head { margin: 0; font-size: clamp(30px, 9vw, 42px); font-weight: 850; letter-spacing: -0.03em; line-height: 1.05; }
.where-detail { margin: 8px 0 0; font-size: 17px; font-weight: 650; color: var(--ink); }
.where-acc { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.where-map { display: block; width: 100%; height: auto; margin-top: 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.where-views { display: flex; gap: 8px; margin-top: 14px; }
.where-view {
  flex: 1;
  min-height: 46px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 750;
  color: var(--ink);
  background: var(--surface-2);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.where-view.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.where-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.where-actions .btn { flex: 1; justify-content: center; }

/* Who to call */
.contacts-group { margin: 22px 0 0; }
.contacts-head {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
  padding: 14px 18px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,0.06));
}
.contact:active { background: var(--surface-2); }
.contact-who { display: grid; gap: 2px; min-width: 0; }
.contact-name { font-size: 17px; font-weight: 750; }
.contact-title { font-size: 14px; color: var(--ink-soft); }
.contact-phone { font-size: 17px; font-weight: 800; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.contact-medic { background: var(--ok-bg); border-color: var(--ok-line); }
.contact-medic .contact-phone { color: var(--ok); }
.contacts-911 { margin-top: 22px; border-top: 0; }
.contacts-after a { color: var(--accent); font-weight: 700; }
.foot-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Anonymous Guarantee Card */
.note-anon {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

.anon-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-line);
  flex: none;
  margin-top: 2px;
}

.anon-body {
  flex: 1;
}

.anon-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin-bottom: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-line);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 12.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.anon-guarantee {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.anon-text {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* Error Note */
.note-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  color: var(--danger);
  font-weight: 650;
}

/* Draft Restored Banner */
.note-draft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 15px;
  padding: 12px 16px;
}

.draft-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 600;
}

.linkbtn {
  font: inherit;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 4px 8px;
  cursor: pointer;
  text-decoration: underline;
  transition: opacity var(--duration-fast);
}

.linkbtn:hover {
  opacity: 0.8;
}

/* ---- Multi-Step Progress Tracker ---- */

.progress {
  margin: 0 0 24px;
}

.progress-label {
  display: block;
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.progress-track {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  border: 1px solid var(--line);
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent) 0%, #fbbf24 100%);
  box-shadow: 0 0 10px var(--accent-glow);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Step Container & Card Elevation ---- */

.js .step {
  display: none;
}

.js .step.is-active {
  display: block;
  animation: step-fade-in 0.24s var(--ease);
}

@keyframes step-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.field {
  border: 0;
  padding: 0;
  margin: 0 0 26px;
}

.field legend {
  padding: 0;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.field .opt {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.field-error {
  margin: 8px 0 0;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- Input Controls ---- */

.input {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  min-height: 56px;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease);
}

.input::placeholder {
  color: var(--ink-muted);
  opacity: 0.75;
}

.input:hover {
  border-color: var(--line-hover);
}

.input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-active);
}

textarea.input {
  line-height: 1.5;
  resize: vertical;
  min-height: 150px;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
  cursor: pointer;
}

/* Focus Outline Standard */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Category Choice Tiles ---- */

.choices {
  display: grid;
  gap: 10px;
}

.choice {
  display: block;
  cursor: pointer;
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.choice span {
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 14px 18px 14px 54px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 17px;
  font-weight: 650;
  color: var(--ink);
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease);
}

/* Radio circle */
.choice span::before {
  content: "";
  position: absolute;
  left: 18px;
  width: 22px;
  height: 22px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-2);
  transition: all var(--duration-fast) var(--ease);
}

.choice:hover span {
  border-color: var(--line-hover);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.choice input:checked + span {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-active);
  color: var(--ink);
}

.choice input:checked + span::before {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px var(--surface);
}

.choice input:focus-visible + span {
  box-shadow: var(--shadow-active);
}

/* ---- Three-way Segmented Control ---- */

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--surface-2);
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.seg {
  cursor: pointer;
}

.seg input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 52px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-soft);
  transition: all var(--duration-fast) var(--ease);
}

.seg:hover span {
  color: var(--ink);
  background: var(--surface-3);
}

.seg input:checked + span {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 2px 8px var(--accent-glow);
}

.seg input:focus-visible + span {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.subfield {
  margin-top: 14px;
}

/* ---- Location Sharing ---- */

.geo {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
}

.geo-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease);
  margin-bottom: 8px;
}

.geo-btn svg {
  width: 22px;
  height: 22px;
  color: var(--accent);
  flex: none;
  transition: transform var(--duration-fast) var(--ease);
}

.geo-btn:hover {
  background: var(--surface-2);
  border-color: var(--line-hover);
  transform: translateY(-1px);
}

.geo-btn.is-set {
  border-color: var(--ok);
  background: var(--ok-bg);
  color: var(--ok);
}

.geo-btn.is-set svg {
  color: var(--ok);
}

.geo-btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

.geo-status {
  margin: 6px 0 8px;
  font-size: 15px;
  font-weight: 650;
}

.geo-status.is-ok { color: var(--ok); }
.geo-status.is-warn { color: var(--danger); }

/* ---- Photo Upload Area ---- */

.photobtns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.filebtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 14px 16px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 16.5px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-fast) var(--ease);
}

.filebtn:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.filebtn:active {
  transform: translateY(0);
}

.cam {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--accent);
}

.photolist {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
}

.photolist li {
  width: 110px;
}

.photolist img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: block;
}

.photo-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 6px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.photo-remove:hover {
  background: var(--danger);
  color: #ffffff;
}

.photo-remove svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.photonote {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

.photolist li.busy img {
  opacity: 0.45;
}

/* Honeypot */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Wizard Step Navigation ---- */

.stepnav {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.stepnav button {
  margin: 0;
}

.stepnav [hidden] {
  display: none;
}

.btn-back,
.btn-next,
.submit {
  min-height: 60px;
  font: inherit;
  font-size: 18px;
  font-weight: 750;
  border-radius: var(--radius);
  padding: 14px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease);
}

.btn-back {
  flex: none;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-back:hover {
  background: var(--surface-2);
  border-color: var(--line-hover);
}

.btn-next {
  flex: 1;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1.5px solid var(--accent);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-next:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.submit {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1.5px solid var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.stepnav .submit {
  flex: 1;
  width: auto;
}

.submit:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.submit:disabled {
  opacity: 0.65;
  cursor: default;
  transform: none;
}

.submit.is-sending {
  opacity: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* ---- Sending Overlay ---- */

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex: none;
}

.spinner-lg {
  width: 48px;
  height: 48px;
  border-width: 4px;
  color: var(--accent);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sending {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 15, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.sending-box {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
}

.sending-head {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.sending-hint {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ---- Confirmation & Tracking Pass ---- */

.done {
  text-align: center;
  padding: 18px 0 8px;
}

.tick {
  width: 72px;
  height: 72px;
  color: var(--ok);
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px var(--ok-glow));
}

.codecard {
  position: relative;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
  text-align: center;
  margin: 24px 0;
  overflow: hidden;
}

.codecard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #fbbf24 100%);
}

.codelabel {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.code {
  margin: 10px 0 16px;
  font-size: clamp(38px, 9vw, 48px);
  font-weight: 850;
  letter-spacing: 0.08em;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--ink);
}

.code-sm {
  font-size: 32px;
  margin: 6px 0 16px;
}

.code-input {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 26px;
  text-align: center;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lookup {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.copybtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 24px;
  margin: 0 0 12px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
}

.copybtn:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.copybtn.is-done {
  color: var(--ok);
  border-color: var(--ok);
  background: var(--ok-bg);
}

.copybtn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 750;
  text-decoration: none;
  padding: 12px 20px;
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: all var(--duration-fast) var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-quiet {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.btn-quiet:hover {
  background: var(--surface-2);
  border-color: var(--line-hover);
}

/* ---- Notifications Opt-in ---- */

.notify {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin: 0 0 20px;
  display: grid;
  gap: 12px;
}

.notify-head {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
}

.notify .help {
  margin: 0;
}

.notify .btn {
  gap: 8px;
}

.notify .btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.notify-msg {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
}

.notify-ok { color: var(--ok); }
.notify-warn { color: var(--danger); }

/* ---- Status Result ---- */

.result {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

/* Status progression stepper */
.status-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 24px;
  padding: 14px 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.step-point {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: none;
}

.step-point .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--line-strong);
  transition: all var(--duration-fast);
}

.step-point.is-done .dot {
  background: var(--ok);
  border-color: var(--ok);
  box-shadow: 0 0 8px var(--ok-glow);
}

.step-point .label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.step-point.is-done .label {
  color: var(--ink);
}

.step-line {
  flex: 1;
  height: 3px;
  background: var(--surface-3);
  margin: 0 8px 18px;
  border-radius: var(--radius-pill);
}

.step-line.is-done {
  background: var(--ok);
  box-shadow: 0 0 6px var(--ok-glow);
}

.kv {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin: 0 0 16px;
}

.kv dt {
  font-size: 13.5px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-top: 14px;
}

.kv dd {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 550;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-weight: 750;
  font-size: 15px;
  border: 1px solid currentColor;
}

.pill-new { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-line); }
.pill-triaged { color: var(--accent); background: var(--accent-light); border-color: var(--accent-glow); }
.pill-in_progress { color: var(--accent); background: var(--accent-light); border-color: var(--accent-glow); }
.pill-closed { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }

.quote {
  margin: 10px 0 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  white-space: pre-wrap;
  font-size: 16.5px;
}

.quote-team {
  border-left-color: var(--ok);
  background: var(--ok-bg);
  margin-bottom: 8px;
}

/* ---- Footer ---- */

.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 32px 16px;
  padding-bottom: max(32px, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--ink-muted);
  font-size: 15px;
  margin-top: auto;
}

.foot-inner {
  max-width: 680px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.foot-status-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 650;
  font-size: 14.5px;
  text-decoration: none;
  transition: all var(--duration-fast);
}

.foot-status-link:hover {
  background: var(--surface-3);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.foot-security {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.foot-brand {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---- Reduced Motion Preference ---- */

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
