/* ============================================================
   BEACON · web-user — Public reporting interface
   ============================================================ */

/* Base typography helpers */
.h1 {
  font-size: var(--text-3xl);
  line-height: 1.04;
  letter-spacing: var(--tracking-tighter);
  font-weight: 500;
  margin: 0 0 var(--space-3) 0;
}
@media (min-width: 768px) {
  .h1 { font-size: var(--text-4xl); }
}
.h2 {
  font-size: var(--text-xl);
  line-height: 1.18;
  letter-spacing: var(--tracking-tight);
  font-weight: 500;
  margin: 0 0 var(--space-2) 0;
}
.muted { color: var(--fg-muted); }
.small { font-size: var(--text-sm); }
.micro { font-size: var(--text-xs); }

/* ============================================================
   1) NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 250, 247, 0.84);
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--nav-h);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--fg);
  color: var(--bg);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-word {
  font-weight: 500;
  letter-spacing: var(--tracking-tighter);
  font-size: 1.0625rem;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}
.net-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 7px 14px 7px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--fg-secondary);
  transition: border-color var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
  cursor: pointer;
}
.net-pill:hover { border-color: var(--border-strong); }
.net-pill:active { transform: translateY(1px); }
.net-pill.is-offline {
  background: #FEF3C7;
  border-color: #FCD34D;
  color: #92400E;
}
.net-pill.is-offline .dot {
  background: var(--warn);
  animation: none;
  box-shadow: none;
}
.nav-right {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}
.lang-wrap { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: var(--text-sm);
  color: var(--fg);
  transition: border-color var(--dur-fast) var(--ease-soft);
}
.lang-btn:hover { border-color: var(--border-strong); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 200px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  margin: 0;
  list-style: none;
  z-index: 70;
}
.lang-menu[hidden] { display: none; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  transition: background var(--dur-fast) var(--ease-soft);
}
.lang-option:hover { background: var(--bg-subtle); }
.lang-option .mono { color: var(--fg-muted); font-size: 11px; }
.lang-option.is-current { background: var(--bg-subtle); }
.lang-option.is-current .mono { color: var(--signal); }
.overview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--fg-secondary);
  border: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.overview-link:hover { color: var(--fg); border-color: var(--border); }

/* ============================================================
   2) CRISIS BANNER
   ============================================================ */
.crisis-banner {
  background: linear-gradient(180deg, rgba(233,75,27,0.05), transparent);
  border-bottom: 1px solid var(--border);
}
.crisis-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}
.crisis-left {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.crisis-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.crisis-active {
  color: var(--signal-deep);
  letter-spacing: 0.16em;
}
.crisis-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--border-strong);
}
.crisis-name {
  font-size: var(--text-sm);
  font-weight: 500;
}
.crisis-meta {
  font-size: 12px;
  color: var(--fg-muted);
}
.crisis-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.sparkline {
  height: 28px;
  width: 240px;
  overflow: visible;
}
.sparkline rect {
  fill: var(--signal);
  opacity: 0.85;
  transition: opacity var(--dur-base) var(--ease-soft);
}
.sparkline rect.is-pulse { opacity: 1; }

/* Offline banner */
.offline-banner {
  background: #FEF3C7;
  border-bottom: 1px solid #FCD34D;
  color: #92400E;
}
.offline-banner[hidden] { display: none; }
.offline-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: var(--text-sm);
}
.offline-inner .muted { color: #92400E; opacity: 0.8; }
.offline-inner .queue-count {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: #FBBF24;
  color: #422006;
  font-size: 11px;
}

/* ============================================================
   3) HERO / LAYOUT
   ============================================================ */
.page-main {
  padding-top: var(--space-9);
  padding-bottom: var(--space-12);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}
@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: var(--space-10);
  }
}

/* ============================================================
   WIZARD
   ============================================================ */
.wizard { min-width: 0; }
.wizard-head { margin-bottom: var(--space-8); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-5);
}
.eyebrow-sep {
  color: var(--fg-faint);
  font-weight: 400;
}
.lede {
  color: var(--fg-secondary);
  font-size: var(--text-md);
  max-width: 56ch;
  margin: 0 0 var(--space-7) 0;
}

/* Stepper */
.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
  position: relative;
}
.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  position: relative;
  transition: color var(--dur-base) var(--ease-soft),
              border-color var(--dur-base) var(--ease-soft),
              background var(--dur-base) var(--ease-soft);
  min-width: 0;
}
.step-num {
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: 0.04em;
}
.step-name {
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-check {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  background: var(--verified);
  color: white;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--dur-base) var(--ease-soft), transform var(--dur-base) var(--ease-spring);
}
.step.is-done {
  color: var(--verified-deep);
  border-color: rgba(4, 120, 87, 0.25);
  background: var(--verified-soft);
}
.step.is-done .step-num { color: var(--verified-deep); }
.step.is-done .step-check { opacity: 1; transform: scale(1); }
.step.is-active {
  color: var(--fg);
  background: var(--fg);
  border-color: var(--fg);
}
.step.is-active .step-name { color: var(--bg); }
.step.is-active .step-num { color: var(--fg-on-dark-muted); }
@media (max-width: 640px) {
  .stepper { grid-template-columns: repeat(4, 1fr); }
  .step { padding: 8px 8px; flex-direction: column; align-items: flex-start; gap: 2px; }
  .step .step-check { display: none; }
}

/* Wizard body */
.wizard-body { position: relative; }
.panel {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur-base) var(--ease-soft),
              transform var(--dur-base) var(--ease-soft);
}
.panel.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.panel-head { margin-bottom: var(--space-5); }
.panel-help { color: var(--fg-muted); margin: 0; }

.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  gap: var(--space-3);
}
.foot-actions { margin-left: auto; }
.foot-help { color: var(--fg-faint); font-size: 11px; }

/* ============================================================
   STEP 1 — Photo dropzone
   ============================================================ */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-4);
  transition: border-color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.dropzone.is-dragover {
  border-color: var(--signal);
  background: var(--signal-soft);
}
.dz-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--bg-subtle);
  color: var(--fg-secondary);
}
.dz-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dz-title {
  font-size: var(--text-md);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.dz-sub {
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.dz-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* Thumbs */
.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
}
.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  animation: thumbIn 0.4s var(--ease-spring) backwards;
}
@keyframes thumbIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb-blur {
  position: absolute;
  /* "Anonymized" area — fake blurred face patch */
  left: 50%;
  top: 24%;
  width: 30%;
  height: 30%;
  border-radius: 50%;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5), rgba(0,0,0,0.05) 70%),
    repeating-conic-gradient(rgba(14,14,16,0.18) 0% 25%, rgba(14,14,16,0.08) 0% 50%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.thumb-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: rgba(14, 14, 16, 0.7);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.thumb-x:hover { background: var(--signal); }
.thumb-x:active { transform: scale(0.92); }
.thumb-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(14,14,16,0.7);
  color: white;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
}

/* Privacy inline */
.privacy-inline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-top: var(--space-3);
}
.pi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-elev);
  color: var(--verified);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.pi-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.pi-title { font-size: var(--text-sm); font-weight: 500; }
.pi-sub { font-size: 12px; color: var(--fg-muted); }
.pi-preview {
  flex-shrink: 0;
  display: inline-flex;
}
.pi-mosaic {
  animation: mosaicFlicker 4s var(--ease-soft) infinite;
}
@keyframes mosaicFlicker {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* AI precheck */
.ai-precheck {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
}
.ai-skeleton {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sk-dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 99px;
}
.sk-line {
  display: inline-block;
  height: 12px;
  flex: 1;
  border-radius: 4px;
}
.ai-result {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
}
.ai-result .ai-grade {
  flex-shrink: 0;
}
.ai-result .ai-text { color: var(--fg-secondary); }
.ai-result .mono { color: var(--fg); }
.ai-result .ai-conf {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--verified-soft);
  color: var(--verified-deep);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
}

/* ============================================================
   STEP 2 — Location
   ============================================================ */
.loc-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}
.loc-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  color: var(--fg-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft);
}
.loc-tab:hover { color: var(--fg); }
.loc-tab.is-active {
  background: var(--fg);
  color: var(--bg);
}
.loc-pane { display: none; }
.loc-pane.is-active { display: block; }

.gps-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-5);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
  gap: var(--space-3);
}
.gps-cta:hover { border-color: var(--fg); }
.gps-cta:active { transform: translateY(1px); }
.gps-cta.is-locking { border-color: var(--signal); pointer-events: none; }
.gps-cta-left {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}
.gps-status {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--verified-soft);
  color: var(--verified-deep);
  display: flex;
  align-items: center;
  gap: 10px;
}
.gps-status[hidden] { display: none; }
.gps-status.is-locking {
  background: var(--bg-elev);
  color: var(--fg-secondary);
}
.gps-status .mono {
  background: rgba(4, 120, 87, 0.1);
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-size: 11px;
}
.gps-status.is-locking .mono { background: var(--bg-subtle); color: var(--fg-muted); }

.map {
  width: 100%;
  height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.loc-help {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: var(--space-3);
  letter-spacing: 0;
}

/* Leaflet polygon style hooks */
.bldg-footprint {
  fill: rgba(14, 14, 16, 0.06);
  stroke: rgba(14, 14, 16, 0.35);
  stroke-width: 1;
  transition: fill 0.18s ease;
}
.bldg-footprint--hover {
  fill: rgba(233, 75, 27, 0.18);
  stroke: var(--signal);
}
.bldg-footprint--selected {
  fill: rgba(233, 75, 27, 0.38);
  stroke: var(--signal-deep);
  stroke-width: 2;
}

/* Inputs */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--fg);
}
.input, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  font-size: var(--text-base);
  color: var(--fg);
  transition: border-color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
  font-family: var(--font-sans);
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--fg);
  box-shadow: 0 0 0 3px rgba(14,14,16,0.06);
}
.textarea { resize: vertical; min-height: 100px; }

.loc-confirm {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid rgba(4, 120, 87, 0.3);
  background: var(--verified-soft);
  border-radius: var(--radius-md);
}
.loc-confirm[hidden] { display: none; }
.lc-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: var(--verified);
  color: white;
  flex-shrink: 0;
}
.lc-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.lc-title { font-weight: 500; font-size: var(--text-sm); color: var(--verified-deep); }
.lc-meta { font-size: 11px; color: var(--verified-deep); opacity: 0.85; }
.lc-change { font-size: var(--text-sm); color: var(--verified-deep); }
.lc-change:hover { background: rgba(4, 120, 87, 0.1); }

/* ============================================================
   STEP 3 — Describe
   ============================================================ */
.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

/* Chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-elev);
  font-size: var(--text-sm);
  color: var(--fg-secondary);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), color var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft);
}
.chip:hover { border-color: var(--border-strong); color: var(--fg); }
.chip:active { transform: translateY(1px); }
.chip.is-selected {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.chip svg { flex-shrink: 0; }

/* Grades */
.grades {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  overflow: hidden;
}
.grade-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  cursor: pointer;
  border-top: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease-soft);
  position: relative;
}
.grade-row:first-child { border-top: 0; }
.grade-row:hover { background: var(--bg-subtle); }
.grade-row.is-selected {
  background: var(--bg-subtle);
  box-shadow: inset 2px 0 0 var(--signal), inset 0 0 0 2px var(--signal);
  border-radius: 0;
}
.grade-row .grade {
  width: 36px; height: 36px; border-radius: 8px; font-size: 13px;
}
.grade-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.grade-name { font-weight: 500; }
.grade-desc { font-size: var(--text-sm); color: var(--fg-muted); }
.grade-radio {
  width: 18px; height: 18px; border-radius: 99px; border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color var(--dur-fast) var(--ease-soft);
}
.grade-row.is-selected .grade-radio { border-color: var(--signal); }
.grade-radio::after {
  content: ''; width: 8px; height: 8px; border-radius: 99px; background: var(--signal); opacity: 0; transform: scale(0.6);
  transition: opacity var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-spring);
}
.grade-row.is-selected .grade-radio::after { opacity: 1; transform: scale(1); }

/* Switch */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  border-radius: 99px;
  background: var(--border-strong);
  transition: background var(--dur-fast) var(--ease-soft);
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 99px;
  background: white;
  box-shadow: 0 1px 2px rgba(14,14,16,0.18);
  transition: transform var(--dur-base) var(--ease-spring);
}
.switch input:checked + .switch-track { background: var(--fg); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(14px); }
.switch-label { font-size: var(--text-sm); }
.switch.small .switch-label { font-size: 12px; }
.lang-indicator {
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--bg-subtle);
  border-radius: var(--radius-pill);
  font-size: 10px;
  color: var(--fg-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   STEP 4 — Review
   ============================================================ */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 640px) {
  .review-grid { grid-template-columns: 1fr; }
}
.review-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  padding: var(--space-4) var(--space-4);
}
.review-card--wide { grid-column: 1 / -1; }
.rc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.rc-edit {
  font-size: 12px;
  color: var(--fg-muted);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft);
  cursor: pointer;
}
.rc-edit:hover { color: var(--fg); background: var(--bg-subtle); }
.rc-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
}
.rc-thumbs img {
  aspect-ratio: 1;
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border);
}
.rc-loc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--text-sm);
}
.rc-loc .rc-bldg { color: var(--fg); }
.rc-loc .rc-coord { color: var(--fg-muted); }
.rc-damage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.rc-damage .grade {
  width: 30px; height: 30px;
}
.rc-damage .rc-cats {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.rc-desc {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fg-secondary);
  line-height: 1.55;
}

.privacy-expand {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
}
.privacy-expand summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  user-select: none;
}
.privacy-expand summary::-webkit-details-marker { display: none; }
.privacy-expand .pe-left { display: inline-flex; align-items: center; gap: 10px; color: var(--fg-secondary); }
.privacy-expand .pe-chev { transition: transform var(--dur-fast) var(--ease-soft); color: var(--fg-muted); }
.privacy-expand[open] .pe-chev { transform: rotate(180deg); }
.pe-body {
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-sm);
  color: var(--fg-secondary);
  line-height: 1.6;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.btn-submit {
  margin-left: auto;
  padding-left: var(--space-7);
  padding-right: var(--space-7);
  font-size: var(--text-base);
  padding-top: 12px;
  padding-bottom: 12px;
}
@media (max-width: 640px) {
  .btn-submit { margin-left: 0; width: 100%; justify-content: center; }
  .submit-row { flex-direction: column; align-items: stretch; }
  .submit-row .btn { justify-content: center; }
}

/* ============================================================
   SUCCESS STATE
   ============================================================ */
.success-panel { animation: panelIn 0.5s var(--ease-soft); }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.success-card {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  border-radius: var(--radius-xl);
  padding: var(--space-9) var(--space-7);
  text-align: left;
  box-shadow: var(--shadow-diffuse);
}
.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px; height: 60px;
  border-radius: 99px;
  background: var(--verified-soft);
  color: var(--verified);
  margin-bottom: var(--space-5);
}
.success-h {
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-tight);
  font-weight: 500;
  margin: 0 0 var(--space-2);
}
.success-ref { margin: 0 0 var(--space-3); font-size: var(--text-base); }
.success-eta {
  color: var(--fg-muted);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-7);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0 0 var(--space-7);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 2px solid var(--border);
  padding-left: var(--space-5);
}
.tl-step {
  position: relative;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.tl-dot {
  position: absolute;
  left: calc(-1 * var(--space-5) - 8px);
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 99px;
  background: var(--bg-elev);
  border: 2px solid var(--border);
  transform: translateY(-50%);
}
.tl-step.is-done .tl-dot { background: var(--verified); border-color: var(--verified); }
.tl-step.is-active .tl-dot {
  background: var(--signal);
  border-color: var(--signal);
  box-shadow: 0 0 0 4px rgba(233, 75, 27, 0.16);
  animation: livePulse 2.4s ease-in-out infinite;
}
.tl-text { display: flex; flex-direction: column; gap: 2px; }
.tl-title { font-size: var(--text-sm); font-weight: 500; }
.tl-time { font-size: 11px; color: var(--fg-muted); }
.tl-step.is-done .tl-title { color: var(--verified-deep); }

.success-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  min-width: 0;
}
@media (min-width: 980px) {
  .sidebar {
    position: sticky;
    top: calc(var(--nav-h) + var(--space-5));
  }
}
.side-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-diffuse);
}
.side-card--quiet { box-shadow: none; }
.sc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}
.sc-title {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
}
.sc-counter {
  font-size: 11px;
  color: var(--fg-muted);
  margin-bottom: var(--space-3);
}

/* Live list */
.live-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  animation: rowIn 0.5s var(--ease-spring) backwards;
}
@keyframes rowIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.live-pin {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.live-pin .grade {
  width: 22px; height: 22px; font-size: 10px; border-radius: 5px;
}
.live-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.live-name {
  font-size: var(--text-sm);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--fg-muted);
}
.live-status {
  font-size: 10px;
}

/* Community trust */
.ct-handle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--space-4);
}
.ct-avatar {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-subtle);
  align-items: center;
  justify-content: center;
  color: var(--fg-secondary);
}
.ct-id { display: flex; flex-direction: column; gap: 2px; }
.ct-name { font-weight: 500; font-size: var(--text-md); letter-spacing: var(--tracking-tight); }
.ct-sub { font-size: 10px; color: var(--fg-muted); }
.ct-score { margin-bottom: var(--space-4); }
.ct-score-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.ct-label { font-size: var(--text-sm); }
.ct-num { font-size: var(--text-sm); }
.ct-num #ct-num { color: var(--verified); font-weight: 500; }
.ct-bar {
  position: relative;
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 99px;
  overflow: hidden;
}
.ct-bar-fill {
  position: absolute;
  inset: 0;
  width: 73%;
  background: linear-gradient(90deg, #FCD34D 0%, var(--signal) 50%, var(--verified) 100%);
  border-radius: 99px;
  transform-origin: left;
  animation: ctFill 1.2s var(--ease-soft) both;
}
@keyframes ctFill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
.ct-tick {
  position: absolute;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255,255,255,0.6);
}
.ct-scale {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--fg-muted);
  margin-top: 6px;
}
.ct-explain {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 0 0 var(--space-4);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 11px;
  color: var(--fg-secondary);
}
.badge svg { color: var(--signal); }

/* Privacy promise list */
.pp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pp-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--fg-secondary);
}
.pp-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: var(--verified-soft);
  color: var(--verified);
  flex-shrink: 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-7) 0;
  margin-top: var(--space-10);
  background: var(--bg);
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--fg-muted);
}
.foot-brand { color: var(--fg); font-weight: 500; }
.foot-sep { color: var(--fg-faint); }
.foot-right { display: inline-flex; align-items: center; gap: 10px; }
.foot-link { color: var(--fg-secondary); transition: color var(--dur-fast) var(--ease-soft); }
.foot-link:hover { color: var(--fg); }

/* ============================================================
   RTL adjustments
   ============================================================ */
html[dir="rtl"] .step-check { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .net-pill { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .gps-cta-left svg { transform: scaleX(-1); }
html[dir="rtl"] .timeline { border-left: 0; border-right: 2px solid var(--border); padding-left: 0; padding-right: var(--space-5); }
html[dir="rtl"] .tl-dot { left: auto; right: calc(-1 * var(--space-5) - 8px); }

/* ============================================================
   Mobile adjustments
   ============================================================ */
@media (max-width: 768px) {
  .nav-inner { gap: var(--space-3); flex-wrap: wrap; min-height: auto; padding-top: 10px; padding-bottom: 10px; }
  .brand-sub { display: none; }
  .net-pill { order: 3; flex: 1 1 100%; justify-content: center; margin-left: 0; margin-top: 4px; }
  .nav-right { margin-left: auto; }
  .overview-link span { display: none; }
  .crisis-inner { padding-top: 10px; padding-bottom: 10px; }
  .crisis-right { display: none; }
  .crisis-name { font-size: 12px; }
  .crisis-meta { font-size: 11px; }
  .h1 { font-size: var(--text-2xl); }
  .page-main { padding-top: var(--space-6); }
}
