:root {
  --bg: #060b12;
  --bg-alt: #0a1019;
  --surface: rgba(11, 19, 30, 0.86);
  --surface-strong: #0b1220;
  --surface-dark: #050911;
  --surface-glass: rgba(10, 18, 28, 0.62);
  --text: #f2f6ff;
  --text-soft: #8ea2bc;
  --line: rgba(135, 170, 211, 0.16);
  --accent: #ff6a3d;
  --accent-deep: #d34f28;
  --accent-soft: rgba(255, 106, 61, 0.14);
  --signal-blue: #47a7ff;
  --signal-red: #ff3e64;
  --signal-gold: #ffb94c;
  --white: #ffffff;
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 28px 90px rgba(0, 0, 0, 0.6);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: min(1180px, calc(100vw - 2rem));
}

/* Global reset and shell styles */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body-font-family, 'Source Sans 3', sans-serif);
  color: var(--text);
  background:
    radial-gradient(circle at 14% 12%, rgba(71, 167, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(255, 62, 100, 0.16), transparent 30rem),
    radial-gradient(circle at 78% 78%, rgba(255, 106, 61, 0.12), transparent 28rem),
    linear-gradient(180deg, #050911 0%, #07101a 42%, #050911 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: -15%;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    linear-gradient(110deg, transparent 18%, rgba(71, 167, 255, 0.13) 26%, transparent 34%),
    linear-gradient(292deg, transparent 48%, rgba(255, 62, 100, 0.12) 56%, transparent 64%);
  filter: blur(32px);
  animation: police-sweep 10s linear infinite alternate;
}

body::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 82%);
  opacity: 0.6;
}

body.dialog-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Component display rules must never override native hidden states. */
[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 1200;
  padding: 0.75rem 1rem;
  background: #0f1728;
  color: var(--white);
  border-radius: 999px;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: var(--header-background, #060b12);
  border-bottom: 1px solid rgba(135, 170, 211, 0.08);
}

/* Header, brand, and navigation */
.header-shell,
.hero-inner,
.workflow,
.map-and-guide,
.footer-shell,
.info-strip {
  width: var(--content-width);
  margin: 0 auto;
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 78px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(9, 17, 28, 0.95), rgba(7, 12, 20, 0.98)),
    linear-gradient(135deg, rgba(71, 167, 255, 0.16), rgba(255, 62, 100, 0.12));
  border: 1px solid rgba(135, 170, 211, 0.18);
  box-shadow: var(--shadow-soft);
}

.brand-badge img {
  width: 30px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-kicker {
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-kicker-color, var(--text-soft));
}

.brand-name {
  font-family: var(--heading-font-family, 'Space Grotesk', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-name-color, var(--text));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-soft);
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--signal-blue), var(--accent));
  transition: transform 180ms ease;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
}

/* Hero section and announcement ticker */
.hero {
  position: relative;
  padding: 2.6rem 0 1.35rem;
}

/* This slot stays empty on desktop and receives the live map on phones. */
.mobile-map-priority {
  display: none;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background:
    linear-gradient(135deg, rgba(5, 9, 17, 0.94), rgba(10, 18, 28, 0.72)),
    radial-gradient(circle at 16% 30%, rgba(71, 167, 255, 0.18), transparent 24rem),
    radial-gradient(circle at 78% 22%, rgba(255, 62, 100, 0.16), transparent 28rem);
}

.hero::after {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 26%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 68px,
      rgba(71, 167, 255, 0.04) 68px,
      rgba(71, 167, 255, 0.04) 69px
    );
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 88%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.72fr);
  gap: 1.5rem;
  align-items: start;
  min-height: auto;
  padding: 0.6rem 0 1.25rem;
}

.hero-copy {
  max-width: 35rem;
  color: var(--white);
  animation: fade-up 600ms ease both;
}

.eyebrow,
.dialog-eyebrow,
.panel-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero .eyebrow,
.dialog-eyebrow {
  color: rgba(176, 201, 230, 0.72);
}

.hero h1,
.workflow h2,
.section-heading h2,
.report-intro h2 {
  font-family: var(--heading-font-family, 'Space Grotesk', sans-serif);
  letter-spacing: -0.04em;
}

.hero h1 {
  margin: 0.75rem 0 0.8rem;
  font-size: clamp(2.15rem, 4.2vw, 3.65rem);
  line-height: 0.96;
  max-width: 14ch;
  color: var(--hero-title-color, var(--white));
  text-shadow: 0 0 35px rgba(71, 167, 255, 0.08);
}

.hero-lead {
  max-width: 31rem;
  font-size: clamp(0.98rem, 1.4vw, 1.14rem);
  line-height: 1.42;
  color: rgba(206, 220, 240, 0.84);
}

.hero-actions,
.dialog-actions,
.form-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.hero-actions {
  margin-top: 1.15rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(90deg, var(--accent), #ff8551);
  color: var(--white);
  box-shadow: 0 0 0 1px rgba(255, 106, 61, 0.18), 0 18px 38px rgba(255, 106, 61, 0.18);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
}

.button-secondary {
  background: rgba(255, 255, 255, 0.02);
  color: var(--white);
  border-color: rgba(113, 157, 205, 0.22);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(71, 167, 255, 0.08);
}

.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.hero-panel {
  align-self: stretch;
  display: grid;
  gap: 0.8rem;
  padding: 1.05rem 1.1rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.88), rgba(6, 11, 18, 0.92)),
    linear-gradient(135deg, rgba(71, 167, 255, 0.08), rgba(255, 62, 100, 0.06));
  border: 1px solid rgba(116, 155, 196, 0.18);
  backdrop-filter: blur(14px);
  color: var(--white);
  box-shadow: var(--shadow-strong);
  animation: fade-up 700ms ease 80ms both;
}

.hero-panel-block {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(116, 155, 196, 0.14);
}

.hero-panel-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hero-panel-block strong {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.panel-label {
  margin-bottom: 0.2rem;
  color: rgba(145, 176, 211, 0.72);
}

.ticker {
  overflow: hidden;
  border-block: 1px solid rgba(113, 157, 205, 0.08);
  background: var(--ticker-background, #09111c);
}

.ticker-track {
  display: flex;
  gap: 2rem;
  min-width: max-content;
  padding: 0.8rem 0;
  animation: ticker-scroll var(--ticker-duration, 34s) linear infinite;
  color: var(--ticker-text-color, #dfeaff);
  font-family: var(--ticker-font-family, var(--heading-font-family, 'Space Grotesk', sans-serif));
  font-weight: 700;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 1rem 0 0;
}

/* Workflow explanation section */
.info-card {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(12, 20, 32, 0.8), rgba(8, 15, 24, 0.92));
  border: 1px solid rgba(113, 157, 205, 0.12);
  box-shadow: var(--shadow-soft);
}

.info-title,
.guide-title,
.footer-brand {
  margin: 0 0 0.35rem;
  font-family: var(--heading-font-family, 'Space Grotesk', sans-serif);
  font-size: 0.98rem;
  font-weight: 700;
}

.info-card p {
  margin: 0;
}

.workflow {
  padding: 4.5rem 0 1rem;
}

.section-heading {
  max-width: 44rem;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.section-heading-left {
  margin-inline: 0;
  text-align: left;
}

.section-heading h2,
.report-intro h2 {
  margin: 0.55rem 0 0.75rem;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 0.98;
  color: var(--section-title-color, var(--white));
}

.section-copy {
  max-width: 38rem;
  color: var(--text-soft);
  line-height: 1.55;
}

.section-copy-highlight {
  color: #d2e4ff;
  font-weight: 600;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.workflow-grid article,
.guide-panel {
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.78), rgba(7, 13, 22, 0.94));
  border: 1px solid rgba(113, 157, 205, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
}

.step-index {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--heading-font-family, 'Space Grotesk', sans-serif);
  color: var(--signal-blue);
  text-shadow: 0 0 22px rgba(71, 167, 255, 0.32);
  font-size: 1.4rem;
  font-weight: 700;
}

.workflow-grid h3,
.dialog-copy p:first-child {
  margin-top: 0;
}

.workflow-grid p,
.guide-panel li,
.report-intro p,
.acknowledgement p,
.footer-copy,
.terms-copy p,
.info-card p {
  color: var(--text-soft);
  line-height: 1.55;
}

/* Map and guidance section */
.map-and-guide {
  display: grid;
  gap: 1.35rem;
  padding: 2rem 0 1rem;
}

.map-and-guide .section-heading {
  grid-column: 1 / -1;
  order: 1;
}

/* The main workspace appears before statistics and educational panels. */
.map-report-layout {
  order: 2;
}

.map-analytics {
  order: 3;
}

.map-toolbar {
  order: 4;
}

.map-intelligence {
  order: 5;
}

.homepage-guidance {
  order: 6;
}

.map-analytics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.map-analytics-card,
.map-toolbar {
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.8), rgba(7, 13, 22, 0.94));
  border: 1px solid rgba(113, 157, 205, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.map-analytics-card {
  padding: 1rem 1.1rem;
}

.map-analytics-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--signal-blue);
}

.map-analytics-card strong {
  display: block;
  margin: 0.75rem 0 0.4rem;
  font-family: var(--heading-font-family, 'Space Grotesk', sans-serif);
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  line-height: 1;
}

.map-analytics-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.map-toolbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(180px, 0.75fr)) auto;
  gap: 0.9rem;
  align-items: end;
  padding: 1rem;
}

.map-filter-field {
  display: grid;
  gap: 0.4rem;
}

.map-filter-field span {
  color: #d8e7fb;
  font-weight: 700;
}

.map-filter-field input,
.map-filter-field select {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(113, 157, 205, 0.16);
  border-radius: 18px;
  background: rgba(5, 11, 18, 0.76);
  padding: 0.9rem 1rem;
  color: var(--white);
}

.map-filter-field input::placeholder {
  color: rgba(157, 176, 200, 0.66);
}

.map-filter-field input:focus,
.map-filter-field select:focus {
  outline: 2px solid var(--signal-blue);
  outline-offset: 2px;
}

.map-reset-button {
  min-width: 180px;
}

/* Public intelligence panels keep the map analytics readable without forcing
   users into a heavier dashboard layout on the homepage. */
.map-intelligence {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(240px, 0.6fr);
  gap: 0.9rem;
}

.map-intelligence-panel {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.8), rgba(7, 13, 22, 0.94));
  border: 1px solid rgba(113, 157, 205, 0.12);
  box-shadow: var(--shadow-soft);
}

.map-intelligence-panel-compact {
  align-content: start;
}

.map-intelligence-heading {
  display: grid;
  gap: 0.35rem;
}

.map-intelligence-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--signal-blue);
}

.map-intelligence-heading h3 {
  margin: 0;
  font-family: var(--heading-font-family, 'Space Grotesk', sans-serif);
  font-size: 1.2rem;
}

.map-intelligence-heading p {
  margin: 0;
  color: var(--text-soft);
}

.map-trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 0.7rem;
  min-height: 180px;
}

.map-trend-bar {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 0.5rem;
  min-height: 180px;
}

.map-trend-bar-fill {
  width: 100%;
  min-height: 8px;
  border-radius: 999px 999px 14px 14px;
  background:
    linear-gradient(180deg, rgba(255, 94, 76, 0.98), rgba(71, 167, 255, 0.82)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent);
  box-shadow: 0 0 24px rgba(71, 167, 255, 0.16);
}

.map-trend-bar strong,
.map-trend-bar small {
  line-height: 1;
}

.map-trend-bar strong {
  font-size: 0.95rem;
}

.map-trend-bar small {
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.map-hotspot-list {
  display: grid;
  gap: 0.8rem;
}

.map-hotspot-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem 0.9rem;
  border-radius: 18px;
  background: rgba(6, 11, 18, 0.78);
  border: 1px solid rgba(113, 157, 205, 0.12);
}

.map-hotspot-item strong {
  display: block;
  margin-bottom: 0.2rem;
}

.map-hotspot-item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.map-hotspot-rank,
.map-hotspot-share {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.map-hotspot-rank {
  color: var(--signal-blue);
  font-size: 1.05rem;
}

.map-hotspot-share {
  color: #ffb69d;
}

.map-empty-state {
  margin: 0;
  color: var(--text-soft);
}

.map-report-layout {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 1.35rem;
  align-items: start;
}

.map-shell {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) + 6px);
  box-shadow: var(--shadow-strong);
  border: 1px solid rgba(113, 157, 205, 0.16);
}

.map-stage {
  position: relative;
  min-height: 580px;
}

.map-stage::before,
.map-stage::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.map-stage::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 18%),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 72px,
      rgba(71, 167, 255, 0.035) 72px,
      rgba(71, 167, 255, 0.035) 73px
    );
  mix-blend-mode: screen;
}

.map-stage::after {
  border: 1px solid rgba(71, 167, 255, 0.08);
  border-radius: calc(var(--radius-lg) + 6px) calc(var(--radius-lg) + 6px) 0 0;
  inset: 10px;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 580px;
}

.map-report-feed {
  display: grid;
  gap: 0.95rem;
  padding: 1rem 1rem 1.1rem;
  background:
    linear-gradient(180deg, rgba(8, 15, 24, 0.96), rgba(5, 11, 18, 0.98)),
    linear-gradient(90deg, rgba(71, 167, 255, 0.05), rgba(255, 75, 75, 0.06));
  border-top: 1px solid rgba(113, 157, 205, 0.14);
}

.map-report-feed-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.map-report-feed-heading h3 {
  margin: 0.15rem 0 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
}

.map-report-feed-heading strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1;
  color: #ffd8d8;
}

.map-report-feed-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.map-report-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  background: rgba(9, 16, 26, 0.78);
  border: 1px solid rgba(113, 157, 205, 0.12);
}

.map-report-card-top,
.map-report-card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.map-report-card-top strong {
  font-size: 1rem;
}

.map-report-card p,
.map-report-card-meta {
  margin: 0;
  color: var(--text-soft);
}

.map-report-card-meta {
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.map-report-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 75, 75, 0.14);
  border: 1px solid rgba(255, 75, 75, 0.3);
  color: #ffd8d8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-rail {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.guide-panel {
  display: grid;
  align-content: start;
  gap: 1.4rem;
}

.guide-panel ul {
  margin: 0;
  padding-left: 1rem;
}

#mapStatusBreakdown {
  display: grid;
  gap: 0.5rem;
}

/* Report form section */
.report-intro {
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.84), rgba(7, 13, 22, 0.94)),
    linear-gradient(135deg, rgba(71, 167, 255, 0.05), rgba(255, 62, 100, 0.03));
  border: 1px solid rgba(113, 157, 205, 0.14);
  box-shadow: var(--shadow-soft);
}

.report-note {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  border-left: 4px solid var(--signal-blue);
  background: linear-gradient(90deg, rgba(71, 167, 255, 0.12), rgba(11, 19, 30, 0.82));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.report-form {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.84), rgba(7, 13, 22, 0.94)),
    linear-gradient(135deg, rgba(71, 167, 255, 0.06), rgba(255, 62, 100, 0.04));
  border: 1px solid rgba(113, 157, 205, 0.16);
  box-shadow: var(--shadow-strong);
}

.report-stepper {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-stepper li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.65rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(113, 157, 205, 0.12);
  background: rgba(5, 11, 18, 0.58);
  color: rgba(220, 233, 248, 0.74);
  font-size: 0.9rem;
  font-weight: 700;
}

.report-stepper li::before {
  content: attr(data-step-indicator);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(113, 157, 205, 0.16);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
}

.report-stepper li:nth-child(1)::before {
  content: '1';
}

.report-stepper li:nth-child(2)::before {
  content: '2';
}

.report-stepper li:nth-child(3)::before {
  content: '3';
}

.report-stepper li.is-active {
  border-color: rgba(71, 167, 255, 0.34);
  color: var(--white);
  box-shadow: 0 0 0 1px rgba(71, 167, 255, 0.1);
}

.report-stepper li.is-complete {
  border-color: rgba(93, 220, 166, 0.22);
  color: rgba(225, 255, 242, 0.9);
}

.report-stepper li.is-active::before {
  background: var(--signal-blue);
}

.report-stepper li.is-complete::before {
  content: '✓';
  background: #37c98a;
}

.report-form-step {
  display: none;
  gap: 1rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.report-form-step.is-active {
  display: grid;
}

.report-form-step legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.report-guardrail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.report-tips {
  border: 1px solid rgba(113, 157, 205, 0.14);
  border-radius: 18px;
  background: rgba(5, 11, 18, 0.46);
}

.report-tips summary {
  padding: 0.85rem 0.95rem;
  color: #eaf2ff;
  font-weight: 700;
  cursor: pointer;
}

.report-tips[open] {
  padding-bottom: 0.85rem;
}

.report-tips[open] summary {
  border-bottom: 1px solid rgba(113, 157, 205, 0.12);
}

.report-tips .report-guardrail-list {
  padding-inline: 0.85rem;
}

.report-guardrail-list > div,
.form-alert {
  border-radius: 18px;
  border: 1px solid rgba(113, 157, 205, 0.14);
  background: rgba(5, 11, 18, 0.56);
}

.report-guardrail-list > div {
  padding: 0.9rem 0.95rem;
}

.report-guardrail-list strong {
  display: block;
  margin-bottom: 0.25rem;
}

.report-guardrail-list p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.form-alert {
  padding: 0.85rem 0.95rem;
  color: #dce9fb;
}

.form-alert-error {
  border-color: rgba(255, 75, 75, 0.26);
  background: rgba(61, 13, 18, 0.44);
  color: #ffd6dc;
}

.form-alert-success {
  border-color: rgba(71, 167, 255, 0.24);
  background: rgba(12, 27, 46, 0.5);
}

.form-alert-inline {
  margin-top: 0.2rem;
  font-size: 0.94rem;
}

.mobile-step-button {
  display: inline-flex;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-grid-full {
  grid-template-columns: minmax(0, 1fr);
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-weight: 700;
  color: #eaf2ff;
}

.field-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field small,
.acknowledgement p {
  font-size: 0.95rem;
}

.field-support-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(113, 157, 205, 0.16);
  border-radius: 18px;
  background: rgba(5, 11, 18, 0.76);
  padding: 0.9rem 1rem;
  color: var(--white);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(157, 176, 200, 0.66);
}

.field textarea {
  resize: vertical;
  min-height: 150px;
}

.field-invalid input,
.field-invalid textarea,
.field-invalid .checkbox-field {
  border-color: rgba(255, 75, 75, 0.48);
  box-shadow: 0 0 0 1px rgba(255, 75, 75, 0.18);
}

.field input:focus,
.field textarea:focus,
.location-result:focus,
.dialog-close:focus-visible,
.nav-toggle:focus-visible,
.site-nav a:focus-visible {
  outline: 2px solid var(--signal-blue);
  outline-offset: 2px;
}

.location-picker {
  position: relative;
}

.precision-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.button-compact {
  min-height: 40px;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
}

.precision-map-helper {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(71, 167, 255, 0.18);
  background: rgba(5, 11, 18, 0.56);
  color: rgba(220, 233, 248, 0.88);
}

.precision-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 0.3rem;
  border-radius: 999px;
  background: #ff3e64;
  box-shadow: 0 0 0 5px rgba(255, 62, 100, 0.12), 0 0 18px rgba(255, 62, 100, 0.82);
}

.location-results {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  display: none;
  z-index: 30;
  padding: 0.4rem;
  border-radius: 18px;
  background: rgba(6, 11, 18, 0.96);
  border: 1px solid rgba(113, 157, 205, 0.16);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.42);
}

.location-results-visible {
  display: grid;
  gap: 0.3rem;
}

.location-result {
  display: grid;
  gap: 0.1rem;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--white);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
}

.location-result:hover {
  background: rgba(71, 167, 255, 0.08);
}

.location-result strong {
  font-size: 0.98rem;
}

.location-result span {
  color: var(--text-soft);
  font-size: 0.92rem;
}

.field-error {
  color: #ffb6c1;
}

.coordinate-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: linear-gradient(90deg, rgba(71, 167, 255, 0.1), rgba(255, 62, 100, 0.08));
  color: #dce8fb;
  font-size: 0.96rem;
}

.precision-marker {
  position: relative;
  width: 34px;
  height: 34px;
  cursor: grab;
}

.precision-marker::before,
.precision-marker::after {
  content: '';
  position: absolute;
  border-radius: 999px;
}

.precision-marker::before {
  inset: 2px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  background: radial-gradient(circle at 35% 35%, #fff, #ffc2cb 24%, #ff3e64 70%);
  box-shadow: 0 0 0 7px rgba(255, 62, 100, 0.16), 0 0 24px rgba(255, 62, 100, 0.82);
}

.precision-marker::after {
  left: 50%;
  bottom: -8px;
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 2px;
  background: #ff3e64;
  box-shadow: 0 0 14px rgba(255, 62, 100, 0.8);
}

.acknowledgement {
  display: grid;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(113, 157, 205, 0.1);
}

.checkbox-field {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(113, 157, 205, 0.14);
  background: rgba(5, 11, 18, 0.56);
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
}

.checkbox-field span {
  color: #e8f1ff;
  line-height: 1.55;
}

.submit-status {
  margin: 0;
  color: var(--text-soft);
}

/* Footer */
.site-footer {
  padding: 0 0 2rem;
}

.homepage-guidance {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(5, 9, 17, 0.94), rgba(8, 14, 24, 0.98)),
    linear-gradient(90deg, rgba(71, 167, 255, 0.06), rgba(255, 62, 100, 0.05));
  border: 1px solid rgba(113, 157, 205, 0.14);
  color: var(--white);
}

.footer-copy {
  margin: 0;
  color: var(--footer-text-color, rgba(192, 208, 229, 0.74));
}

.footer-links {
  align-items: center;
}

.footer-links a {
  color: rgba(233, 241, 255, 0.82);
  text-decoration: none;
}

/* Dialogs and map popup details */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(5, 9, 17, 0.72);
  backdrop-filter: blur(8px);
}

.site-dialog {
  position: fixed;
  z-index: 1110;
  top: 50%;
  left: 50%;
  width: min(34rem, calc(100vw - 1.5rem));
  transform: translate(-50%, -50%);
  padding: 1.5rem;
  border-radius: 28px;
  background:
    linear-gradient(180deg, var(--popup-background, #0a121d), var(--popup-background, #0a121d)),
    linear-gradient(135deg, rgba(71, 167, 255, 0.06), rgba(255, 62, 100, 0.05));
  border: 1px solid var(--popup-border-color, rgba(113, 157, 205, 0.16));
  box-shadow: var(--shadow-strong);
  color: var(--popup-text-color, var(--text));
  font-family: var(--popup-font-family, var(--body-font-family, 'Source Sans 3', sans-serif));
}

.site-dialog-wide {
  width: min(44rem, calc(100vw - 1.5rem));
}

.site-dialog h2 {
  margin: 0.6rem 0 0.7rem;
  font-family: var(--heading-font-family, 'Space Grotesk', sans-serif);
  color: var(--popup-text-color, var(--text));
  line-height: 1.02;
}

.site-dialog p {
  color: var(--popup-text-color, var(--text-soft));
}

.dialog-copy {
  display: grid;
  gap: 0.55rem;
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(113, 157, 205, 0.14);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
}

.dialog-close::before,
.dialog-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 2px;
  background: var(--white);
}

.dialog-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.dialog-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.live-alert-stack {
  position: fixed;
  top: 5.4rem;
  right: 1rem;
  z-index: 1090;
  display: grid;
  gap: 0.85rem;
  width: min(24rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.live-alert {
  position: relative;
  overflow: hidden;
  padding: 1rem 1rem 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(105, 178, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(6, 12, 21, 0.96), rgba(6, 11, 19, 0.98)),
    linear-gradient(135deg, rgba(71, 167, 255, 0.16), rgba(255, 74, 103, 0.08));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  color: var(--white);
  pointer-events: auto;
  animation: live-alert-enter 220ms ease-out;
}

.live-alert::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #47a7ff, #ff3e64);
  box-shadow: 0 0 16px rgba(71, 167, 255, 0.7);
}

.live-alert h3 {
  margin: 0.15rem 2.2rem 0.35rem 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  line-height: 1.15;
}

.live-alert-kicker,
.live-alert-copy,
.live-alert-meta {
  margin: 0;
}

.live-alert-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(140, 206, 255, 0.92);
}

.live-alert-copy {
  color: rgba(220, 233, 248, 0.86);
}

.live-alert-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  color: rgba(188, 208, 231, 0.82);
}

.live-alert-meta span,
.live-alert-meta time {
  display: inline-flex;
  align-items: center;
}

.live-alert-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.live-alert-close:hover,
.live-alert-close:focus-visible {
  background: rgba(71, 167, 255, 0.16);
}

.live-alert-dismissed {
  opacity: 0;
  transform: translateX(14px) scale(0.98);
}

.map-popup h3 {
  margin: 0 0 0.35rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
}

.map-popup p {
  margin: 0 0 0.5rem;
  color: var(--text-soft);
}

.map-popup-meta {
  display: grid;
  gap: 0.3rem;
}

.map-popup-location,
.map-popup-time {
  display: block;
  font-size: 0.9rem;
}

.map-popup-location {
  color: var(--signal-blue);
  font-weight: 700;
}

.map-popup-time {
  color: #d9e7fa;
}

.mapboxgl-popup-content {
  background: rgba(7, 13, 22, 0.96);
  color: var(--white);
  border: 1px solid rgba(113, 157, 205, 0.18);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

.mapboxgl-popup-tip {
  border-top-color: rgba(7, 13, 22, 0.96) !important;
}

.report-marker {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}

.report-marker-core,
.report-marker-ring,
.report-marker-glow {
  position: absolute;
  border-radius: 999px;
}

.report-marker-core {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle at 35% 35%, #fff, #ffd2c3 30%, var(--accent) 72%);
  box-shadow: 0 0 0 2px rgba(255, 106, 61, 0.24), 0 0 18px rgba(255, 106, 61, 0.7);
  z-index: 3;
}

.report-marker-ring {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 106, 61, 0.55);
  background: rgba(255, 106, 61, 0.08);
  z-index: 2;
}

.report-marker-glow {
  width: 28px;
  height: 28px;
  background: radial-gradient(circle, rgba(255, 106, 61, 0.45), transparent 68%);
  z-index: 1;
}

.report-marker-recent .report-marker-core {
  background: radial-gradient(circle at 35% 35%, #fff, #beddff 26%, var(--signal-blue) 70%);
  box-shadow: 0 0 0 2px rgba(71, 167, 255, 0.22), 0 0 18px rgba(71, 167, 255, 0.72);
}

.report-marker-recent .report-marker-ring {
  border-color: rgba(71, 167, 255, 0.72);
  background: rgba(71, 167, 255, 0.12);
  animation: marker-pulse 1.5s ease-out infinite;
}

.report-marker-recent .report-marker-glow {
  background: radial-gradient(circle, rgba(71, 167, 255, 0.4), transparent 68%);
  animation: marker-glow 1.5s ease-out infinite;
}

/* Small motion accents */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes live-alert-enter {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes police-sweep {
  0% {
    transform: translate3d(-2%, -2%, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(2%, 2%, 0) rotate(4deg);
  }
}

@keyframes marker-pulse {
  0% {
    transform: scale(0.86);
    opacity: 0.95;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.52);
    opacity: 0;
  }
}

@keyframes marker-glow {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.18);
  }
}

/* Responsive layout rules */
@media (max-width: 1080px) {
  .hero-inner,
  .map-report-layout,
  .map-and-guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-inner {
    min-height: auto;
  }
}

@media (max-width: 820px) {
  .mobile-map-priority {
    display: block;
    width: var(--content-width);
    margin: 0.75rem auto 0;
  }

  .mobile-map-priority .map-shell {
    width: 100%;
  }

  .site-nav {
    position: absolute;
    top: 78px;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(7, 13, 22, 0.96);
    box-shadow: var(--shadow-soft);
  }

  .site-nav.site-nav-open {
    display: flex;
  }

  .nav-toggle {
    display: inline-block;
  }

  .info-strip,
  .workflow-grid,
  .field-grid,
  .map-analytics,
  .map-intelligence,
  .map-toolbar,
  .report-stepper,
  .report-guardrail-list,
  .map-report-feed-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding: 1.25rem 0 0.5rem;
  }

  .hero-inner {
    gap: 1rem;
    padding-bottom: 0.5rem;
  }

  .hero-panel {
    gap: 0.55rem;
  }

  .map-and-guide {
    padding-top: 1rem;
  }

  /* On phones, the public map always precedes the report form. */
  .map-shell {
    order: 1;
  }

  .report-rail {
    order: 2;
  }

  .homepage-guidance {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions,
  .dialog-actions,
  .form-actions,
  .footer-shell,
  .footer-links,
  .field-support-row {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-shell {
    display: grid;
  }
}

@media (max-width: 640px) {
  :root {
    --content-width: min(100vw - 1rem, 1180px);
  }

  .live-alert-stack {
    top: auto;
    right: 0.5rem;
    bottom: 0.75rem;
    width: calc(100vw - 1rem);
  }

  .header-shell {
    min-height: 72px;
  }

  .hero h1 {
    max-width: 10ch;
  }

  .hero-panel,
  .workflow-grid article,
  .guide-panel,
  .report-intro,
  .map-analytics-card,
  .map-intelligence-panel,
  .map-toolbar,
  .report-form,
  .site-dialog,
  .footer-shell {
    border-radius: 22px;
  }

  .map-trend-chart {
    gap: 0.45rem;
  }

  .map-report-feed-heading,
  .map-report-card-top,
  .map-report-card-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-stage,
  #map {
    min-height: 420px;
  }

  .site-dialog {
    padding: 1.2rem;
  }

  .precision-actions {
    display: grid;
  }

  .live-alert-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
