:root {
  --bg-primary: #07111f;
  --bg-secondary: #0c1628;
  --bg-card: rgba(10, 21, 38, 0.74);
  --bg-card-solid: #101c30;
  --bg-elevated: rgba(14, 26, 45, 0.9);
  --border: rgba(148, 163, 184, 0.3);
  --border-strong: rgba(148, 163, 184, 0.48);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #3b82f6;
  --admin-logo-blue: #63b3ff;
  --green: #22c55e;
  --yellow: #f59e0b;
  --red: #ef4444;
  --cyan: #38bdf8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 24px 70px rgba(2, 8, 23, 0.46);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  overflow-y: auto;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text);
  overflow-x: hidden;
  -ms-overflow-style: none;
}

html.drawer-open,
body.drawer-open {
  overflow: hidden;
  overscroll-behavior: none;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.map-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, rgba(30, 64, 175, 0.22), transparent 38%), var(--bg-primary);
  z-index: 0;
}

.map-layer::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  background: transparent;
  transition: background 220ms ease;
}

.map-layer::before {
  content: none;
}

body.detail-docked .map-layer::before {
  opacity: 0;
}

body.map-dimmed .map-layer::after,
body.panel-dimmed .map-layer::after {
  background: rgba(3, 7, 18, 0.54);
}

body.map-dimmed .fallback-marker,
body.map-dimmed .google-site-marker {
  pointer-events: none !important;
}

body.this-week-site-selected .map-layer::after {
  background: transparent;
}

#mapCanvas,
.map-fallback {
  position: absolute;
  inset: 0;
}

.activity-heat-canvas,
.google-activity-heat-canvas {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  transition:
    opacity 560ms cubic-bezier(0.22, 0.74, 0.28, 1),
    filter 560ms cubic-bezier(0.22, 0.74, 0.28, 1);
  will-change: opacity, filter;
}

.activity-heat-canvas {
  inset: 0;
  z-index: 2;
}

.activity-heat-canvas.is-active,
.google-activity-heat-canvas.is-active {
  opacity: 1;
}

.activity-heat-canvas.is-retiring,
.google-activity-heat-canvas.is-retiring {
  opacity: 0;
}

body.activity-map-mode.map-fanout-active .activity-heat-canvas.is-active,
body.activity-map-mode.map-fanout-active .google-activity-heat-canvas.is-active {
  opacity: 0.52;
  filter: saturate(0.72) brightness(0.9);
}

.map-fallback {
  display: grid;
  place-items: center;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
  transition: opacity 180ms ease;
}

.map-fallback.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.map-fallback.is-hidden * {
  pointer-events: none !important;
}

.gm-err-container,
.gm-err-message,
.gm-err-title {
  display: none !important;
}

.fallback-grid {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 1;
  background: #07111f;
}

.fallback-map-content {
  position: absolute;
  inset: 0;
  transform: scale(var(--map-scale, 1));
  transform-origin: var(--map-origin-x, 50%) var(--map-origin-y, 50%);
}

.fallback-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 54%, rgba(59, 130, 246, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.2), rgba(7, 17, 31, 0.3));
}

.fallback-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  opacity: 1;
  user-select: none;
  -webkit-user-drag: none;
}

.fallback-tile-canvas {
  z-index: 0;
  filter: saturate(1.02) contrast(1.02) brightness(1.42);
}

.fallback-tile-transport {
  z-index: 1;
  opacity: 0.92;
  filter: saturate(1.04) contrast(1.04) brightness(1.18);
}

.fallback-tile-boundaries {
  z-index: 1;
  opacity: 0.76;
  filter: saturate(0.9) contrast(1.03) brightness(1.18);
}

.troop-label {
  position: absolute;
  left: var(--marker-x);
  top: var(--marker-y);
  color: rgba(203, 213, 225, 0.62);
  font-size: 22px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-shadow: 0 2px 14px rgba(2, 8, 23, 0.9);
  z-index: 2;
}

.fallback-attribution {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(2, 8, 23, 0.58);
  color: rgba(203, 213, 225, 0.72);
  font-size: 10px;
  pointer-events: none;
  z-index: 4;
}

.fallback-marker,
.google-site-marker,
.map-fanout-marker {
  position: absolute;
  left: var(--marker-x);
  top: var(--marker-y);
  width: var(--marker-size);
  height: var(--marker-size);
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 2px solid rgba(248, 250, 252, 0.84);
  border-radius: 999px;
  background: var(--marker-color);
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--marker-color) 20%, transparent),
    0 8px 18px rgba(2, 8, 23, 0.38);
  transform: translate(-50%, -50%);
  opacity: var(--marker-opacity, 1);
  pointer-events: auto;
  cursor: pointer !important;
  appearance: none;
  z-index: var(--marker-z, 3);
  transition:
    width 320ms ease,
    height 320ms ease,
    background-color 320ms ease,
    border-color 320ms ease,
    opacity 420ms cubic-bezier(0.22, 0.74, 0.28, 1),
    transform 420ms cubic-bezier(0.22, 0.74, 0.28, 1),
    filter 420ms cubic-bezier(0.22, 0.74, 0.28, 1),
    box-shadow 320ms ease;
  animation: marker-soft-in 240ms ease both;
}

.fallback-marker::before,
.google-site-marker::before,
.map-fanout-marker::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--marker-color) 34%, transparent);
  opacity: 0.58;
}

.fallback-marker::after,
.google-site-marker::after,
.map-fanout-marker::after {
  content: none;
}

.google-site-marker {
  left: 0;
  top: 0;
}

.fallback-marker:hover,
.google-site-marker:hover,
.map-fanout-marker:hover {
  transform: translate(-50%, -50%) scale(1.18);
  z-index: calc(var(--marker-z, 3) + 80);
}

.fallback-marker.has-overlap-group,
.google-site-marker.has-overlap-group {
  z-index: calc(var(--marker-z, 3) + 20);
}

.fallback-marker.is-overlap-hidden,
.google-site-marker.is-overlap-hidden {
  opacity: 0;
  pointer-events: none;
}

.fallback-marker.is-marker-exiting,
.google-site-marker.is-marker-exiting {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.72);
}

.fallback-marker.is-fanout-anchor,
.google-site-marker.is-fanout-anchor {
  opacity: 0 !important;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.72);
  animation: none;
}

.fallback-marker.is-fanout-muted,
.google-site-marker.is-fanout-muted {
  opacity: 0.16 !important;
  filter: saturate(0.42) brightness(0.84) blur(0.1px);
  pointer-events: none;
  animation: none;
}

.fallback-marker.is-fanout-group-member,
.google-site-marker.is-fanout-group-member {
  opacity: 0 !important;
  pointer-events: none;
  animation: none;
}

.map-fanout-layer {
  position: fixed;
  inset: 0;
  z-index: 960;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease;
}

.map-fanout-layer.is-visible {
  opacity: 1;
  visibility: visible;
}

.map-fanout-safe-zone {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.map-fanout-connectors {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.map-fanout-connector {
  stroke: rgba(203, 213, 225, 0.76);
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  filter: drop-shadow(0 0 5px rgba(226, 232, 240, 0.24));
  opacity: 0.72;
  animation: fanout-line-in 240ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.map-fanout-marker {
  position: fixed;
  left: 0;
  top: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.68);
  transition:
    left 230ms cubic-bezier(0.2, 0.8, 0.2, 1),
    top 230ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 190ms ease,
    transform 190ms ease,
    box-shadow 180ms ease;
}

.map-fanout-marker.is-fanned {
  opacity: var(--marker-opacity, 1);
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

@keyframes fanout-line-in {
  from {
    stroke-dashoffset: 120;
  }
  to {
    stroke-dashoffset: 0;
  }
}

.map-tooltip-layer {
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: 6000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(4px);
  transition:
    opacity 230ms ease,
    transform 230ms ease,
    visibility 0s linear 230ms;
}

.map-tooltip-layer.is-visible {
  opacity: 1;
  pointer-events: none;
  transform: translateY(0);
  transition:
    opacity 230ms ease,
    transform 230ms ease,
    visibility 0s;
  visibility: visible;
}

.map-tooltip-card {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 154px;
  padding: 10px 11px;
  border: 1px solid rgba(191, 219, 254, 0.28);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(15, 30, 52, 0.98), rgba(8, 18, 34, 0.96));
  color: var(--text);
  box-shadow: 0 20px 48px rgba(2, 8, 23, 0.48);
  text-align: left;
}

.map-tooltip-card::after {
  content: "";
  position: absolute;
  left: var(--tooltip-arrow-x, 50%);
  bottom: -5px;
  width: 9px;
  height: 9px;
  border-right: 1px solid rgba(191, 219, 254, 0.24);
  border-bottom: 1px solid rgba(191, 219, 254, 0.24);
  background: rgba(8, 18, 34, 0.96);
  transform: translateX(-50%) rotate(45deg);
}

.map-tooltip-layer[data-placement="bottom"] .map-tooltip-card::after {
  top: -5px;
  bottom: auto;
  border: 0;
  border-left: 1px solid rgba(191, 219, 254, 0.24);
  border-top: 1px solid rgba(191, 219, 254, 0.24);
}

.map-tooltip-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-tooltip-card span {
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.25;
}

.map-tooltip-card .map-tooltip-pill {
  justify-self: start;
  width: fit-content;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1;
}

.map-tooltip-card .level-high_concern {
  color: #fb7185;
}

.map-tooltip-card .level-review {
  color: #fbbf24;
}

.map-tooltip-card .level-monitor {
  color: #7dd3fc;
}

.activity-marker-tooltip {
  min-width: 164px;
}

.fallback-marker.marker-monitor,
.google-site-marker.marker-monitor,
.map-fanout-marker.marker-monitor {
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.14),
    0 0 18px rgba(56, 189, 248, 0.38),
    0 8px 18px rgba(2, 8, 23, 0.38);
}

.fallback-marker.marker-monitor::before,
.google-site-marker.marker-monitor::before,
.map-fanout-marker.marker-monitor::before {
  border-color: rgba(125, 211, 252, 0.46);
}

.fallback-marker.marker-review,
.google-site-marker.marker-review,
.map-fanout-marker.marker-review {
  box-shadow:
    0 0 0 4px rgba(245, 158, 11, 0.16),
    0 0 22px rgba(245, 158, 11, 0.54),
    0 9px 22px rgba(2, 8, 23, 0.42);
}

.fallback-marker.marker-review::before,
.google-site-marker.marker-review::before,
.map-fanout-marker.marker-review::before {
  border-width: 2px;
  border-color: rgba(251, 191, 36, 0.66);
}

.fallback-marker.marker-high_concern,
.google-site-marker.marker-high_concern,
.map-fanout-marker.marker-high_concern {
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.17),
    0 0 25px rgba(239, 68, 68, 0.64),
    0 10px 26px rgba(2, 8, 23, 0.46);
}

.fallback-marker.marker-high_concern::before,
.google-site-marker.marker-high_concern::before,
.map-fanout-marker.marker-high_concern::before {
  animation: marker-pulse 1.35s ease-out infinite;
  border-width: 2px;
  border-color: rgba(248, 113, 113, 0.8);
}

.fallback-marker.marker-activity,
.google-site-marker.marker-activity,
.map-fanout-marker.marker-activity {
  border-color: rgba(226, 246, 255, 0.86);
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--marker-color) 18%, transparent),
    0 0 28px color-mix(in srgb, var(--marker-color) 58%, transparent),
    0 9px 22px rgba(2, 8, 23, 0.42);
}

.fallback-marker.marker-activity::before,
.google-site-marker.marker-activity::before,
.map-fanout-marker.marker-activity::before {
  inset: -6px;
  border-color: color-mix(in srgb, var(--marker-color) 48%, transparent);
  opacity: var(--marker-opacity, 0.56);
}

.fallback-marker.marker-activity:hover,
.fallback-marker.marker-activity:focus-visible,
.google-site-marker.marker-activity:hover,
.google-site-marker.marker-activity:focus-visible,
.map-fanout-marker.marker-activity:hover,
.map-fanout-marker.marker-activity:focus-visible {
  opacity: 1;
}

.fallback-marker.marker-activity-strong::before,
.google-site-marker.marker-activity-strong::before,
.map-fanout-marker.marker-activity-strong::before {
  animation: marker-pulse 1.55s ease-out infinite;
  border-width: 2px;
}

.fallback-marker.marker-playback,
.google-site-marker.marker-playback {
  border-width: 1px;
  border-color: rgba(226, 246, 255, 0.76);
  background: rgba(203, 221, 241, 0.86);
  box-shadow:
    0 0 0 1px rgba(226, 246, 255, 0.16),
    0 0 13px rgba(147, 197, 253, 0.3),
    0 6px 14px rgba(2, 8, 23, 0.26);
  cursor: default !important;
}

.fallback-marker.marker-playback::before,
.google-site-marker.marker-playback::before {
  inset: -4px;
  border-width: 1px;
  border-color: rgba(226, 246, 255, 0.28);
  opacity: 0.32;
  animation: none;
}

body.activity-playback-active .fallback-marker,
body.activity-playback-active .google-site-marker {
  pointer-events: none !important;
}

.fallback-marker.marker-activity.is-fanout-anchor,
.google-site-marker.marker-activity.is-fanout-anchor,
.fallback-marker.marker-activity.is-fanout-group-member,
.google-site-marker.marker-activity.is-fanout-group-member {
  opacity: 0 !important;
  pointer-events: none;
  animation: none;
}

.fallback-marker.marker-activity.is-fanout-muted,
.google-site-marker.marker-activity.is-fanout-muted {
  opacity: 0.16 !important;
  filter: saturate(0.42) brightness(0.84) blur(0.1px);
  pointer-events: none;
  animation: none;
}

@keyframes marker-soft-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.78);
  }
  to {
    opacity: var(--marker-opacity, 1);
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes marker-pulse {
  0% {
    opacity: 0.9;
    transform: scale(0.82);
  }
  70% {
    opacity: 0;
    transform: scale(2.35);
  }
  100% {
    opacity: 0;
    transform: scale(2.35);
  }
}

.map-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: transparent;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  width: min(1120px, calc(100vw - 32px));
  transform: translateX(-50%);
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 48px rgba(2, 8, 23, 0.32);
}

.brand-block {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  justify-self: start;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.brand-block:hover .brand-kicker,
.brand-block:focus-visible .brand-kicker {
  color: #93c5fd;
}

.brand-kicker {
  color: var(--admin-logo-blue);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-block strong {
  font-size: 17px;
  line-height: 1;
  white-space: nowrap;
}

.topbar-actions {
  grid-column: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.week-stepper {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 7px;
  transition: opacity 180ms ease, transform 180ms ease;
}

body.activity-map-mode .week-stepper {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.activity-week-readout {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: min(290px, 40vw);
  padding: 0 18px;
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04) 48%, rgba(99, 179, 255, 0.1)),
    rgba(9, 18, 32, 0.54);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 26px rgba(2, 8, 23, 0.2);
  backdrop-filter: blur(18px) saturate(1.35);
}

.activity-week-readout[hidden] {
  display: none;
}

.week-step-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045) 45%, rgba(99, 179, 255, 0.08)),
    rgba(9, 18, 32, 0.44);
  color: var(--muted-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 22px rgba(2, 8, 23, 0.2);
  backdrop-filter: blur(18px) saturate(1.35);
}

.week-step-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.week-step-button:hover:not(:disabled),
.week-step-button:focus-visible:not(:disabled) {
  color: #ffffff;
  border-color: rgba(191, 219, 254, 0.42);
}

.week-step-button:disabled {
  cursor: default;
  opacity: 0.34;
}

.week-picker {
  position: relative;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-width: min(270px, 38vw);
}

.week-picker span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.week-picker::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--admin-logo-blue);
  border-bottom: 1.6px solid var(--admin-logo-blue);
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
}

select,
.ghost-button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055) 42%, rgba(99, 179, 255, 0.09)),
    rgba(9, 18, 32, 0.46);
  color: var(--text);
  padding: 0 14px;
  backdrop-filter: blur(20px) saturate(1.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -12px 22px rgba(2, 8, 23, 0.22),
    0 10px 30px rgba(2, 8, 23, 0.22);
}

.week-picker select {
  width: 100%;
  min-height: 36px;
  appearance: none;
  border-color: rgba(255, 255, 255, 0.19);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045) 44%, rgba(99, 179, 255, 0.11)),
    rgba(10, 20, 36, 0.42);
  color: var(--muted-strong);
  padding: 0 38px 0 16px;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  text-align-last: center;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  text-transform: none;
}

.logout-button {
  min-width: 78px;
  color: #dbeafe;
  text-transform: none;
  background:
    linear-gradient(145deg, rgba(99, 179, 255, 0.2), rgba(255, 255, 255, 0.055) 42%, rgba(99, 179, 255, 0.14)),
    rgba(15, 32, 55, 0.56);
}

.refresh-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.ghost-button:hover,
select:hover {
  border-color: rgba(191, 219, 254, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.075) 42%, rgba(99, 179, 255, 0.14)),
    rgba(12, 24, 42, 0.56);
}

.focus-shell {
  position: relative;
  z-index: 5;
  min-height: 100vh;
  padding: 88px 18px 118px;
  display: grid;
  place-items: start center;
  pointer-events: none;
}

.portal-panel {
  display: none;
  width: min(1060px, 100%);
  animation: panel-in 220ms ease both;
  pointer-events: none;
}

.portal-panel.active {
  display: block;
}

.portal-panel[data-panel="this-week"] {
  min-height: 158vh;
}

.portal-panel:not([data-panel="this-week"]) {
  pointer-events: auto;
}

.portal-panel[data-panel="map"] {
  min-height: calc(100vh - 206px);
  pointer-events: none;
}

.portal-panel[data-panel="map"] .panel-heading,
.portal-panel[data-panel="map"] .map-grid {
  display: none;
}

.portal-panel[data-panel="activity"] {
  min-height: calc(100vh - 180px);
  pointer-events: none;
}

.portal-panel[data-panel="review"] {
  position: fixed;
  left: 50%;
  top: 92px;
  bottom: 98px;
  width: min(848px, calc(100vw - 40px));
  transform: translateX(-50%);
}

body.activity-map-mode {
  overflow: hidden;
}

body.activity-map-mode .focus-shell {
  min-height: 100vh;
  padding: 0;
}

.activity-timeline {
  position: fixed;
  left: 50%;
  top: 86px;
  z-index: 24;
  width: min(860px, calc(100vw - 34px));
  height: 142px;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  padding: 10px 14px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 22px;
  background: rgba(8, 16, 30, 0.62);
  box-shadow: 0 18px 54px rgba(2, 8, 23, 0.34);
  backdrop-filter: blur(18px) saturate(1.28);
  pointer-events: auto;
}

.activity-control-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-mode-toggle,
.activity-range-mode-toggle,
.activity-select-mode-toggle {
  display: inline-flex;
  justify-self: center;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(191, 219, 254, 0.18);
  border-radius: 999px;
  background: rgba(2, 8, 23, 0.3);
}

.activity-mode-button {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  padding: 0 13px;
  font-size: 12px;
  font-weight: 800;
}

.activity-mode-button.active {
  border-color: rgba(191, 219, 254, 0.24);
  background: rgba(99, 179, 255, 0.18);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.timeline-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.activity-playback-button {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(191, 219, 254, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045) 46%, rgba(99, 179, 255, 0.1)),
    rgba(8, 16, 30, 0.52);
  color: #dbeafe;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 28px rgba(2, 8, 23, 0.22);
  backdrop-filter: blur(16px) saturate(1.3);
}

.activity-playback-button::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: inherit;
}

.activity-playback-button:hover,
.activity-playback-button:focus-visible,
.activity-playback-button.is-playing {
  border-color: rgba(147, 197, 253, 0.44);
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06) 46%, rgba(99, 179, 255, 0.18)),
    rgba(20, 44, 75, 0.62);
}

.activity-play-icon,
.activity-pause-icon {
  width: 18px;
  height: 18px;
}

.activity-pause-icon,
.activity-playback-button.is-playing .activity-play-icon {
  display: none;
}

.activity-playback-button.is-playing .activity-pause-icon {
  display: block;
}

.timeline-edge-label,
.activity-range-meta {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.activity-range-meta {
  justify-self: center;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 650;
}

.activity-range-caption {
  position: fixed;
  left: 50%;
  top: 238px;
  z-index: 24;
  width: min(780px, calc(100vw - 42px));
  transform: translateX(-50%);
  color: rgba(241, 248, 255, 0.94);
  text-align: center;
  text-shadow:
    0 2px 10px rgba(2, 8, 23, 0.92),
    0 0 22px rgba(2, 8, 23, 0.62);
  pointer-events: none;
}

.timeline-slider-wrap {
  position: relative;
  height: 68px;
  display: grid;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.timeline-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 34px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
  overflow: visible;
}

.timeline-selected {
  position: absolute;
  top: 0;
  bottom: 0;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(99, 179, 255, 0.82), rgba(34, 211, 238, 0.72));
  box-shadow: 0 0 22px rgba(99, 179, 255, 0.42);
}

.activity-timeline.is-playing .timeline-selected,
.activity-timeline.is-playing .timeline-pointer {
  transition:
    left 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.range-mode-single .timeline-selected {
  width: 0 !important;
}

.timeline-ticks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.timeline-tick {
  position: absolute;
  left: var(--tick-x);
  top: 0;
  height: 24px;
  transform: translateX(-50%);
}

.timeline-tick-line {
  display: block;
  width: 1px;
  height: 13px;
  margin: -4px auto 0;
  background: rgba(203, 213, 225, 0.46);
}

.timeline-tick-label {
  position: absolute;
  left: 50%;
  top: -24px;
  transform: translateX(-50%);
  color: rgba(203, 213, 225, 0.72);
  font-family: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.timeline-range {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  width: 100%;
  height: 44px;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.timeline-range::-webkit-slider-runnable-track {
  height: 1px;
  background: transparent;
}

.timeline-range::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  appearance: none;
  margin-top: 24px;
  pointer-events: auto;
}

.timeline-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  pointer-events: auto;
}

.timeline-range-start {
  z-index: 2;
}

.timeline-range-end {
  z-index: 3;
}

.range-mode-single .timeline-range-start {
  display: none;
}

.timeline-pointer {
  position: absolute;
  left: 0;
  top: 40px;
  z-index: 5;
  width: 21px;
  height: 22px;
  transform: translateX(-50%);
  pointer-events: auto;
  background: url("/static/assets/Tick_Single_V2.svg") center / contain no-repeat;
  filter:
    drop-shadow(0 10px 16px rgba(2, 8, 23, 0.48))
    drop-shadow(0 0 9px rgba(99, 179, 255, 0.4));
}

.timeline-pointer-start {
  display: none;
}

.range-mode-range .timeline-pointer-start {
  display: block;
  width: 12px;
  height: 22px;
  transform: translateX(-100%);
  background-image: url("/static/assets/Tick_Range_Left_V2.svg");
}

.range-mode-range .timeline-pointer-end {
  width: 12px;
  height: 22px;
  transform: translateX(0);
  background-image: url("/static/assets/Tick_Range_Right_V2.svg");
}

.range-mode-single .timeline-pointer-end {
  background-image: url("/static/assets/Tick_Single_V2.svg");
}

.activity-analyte-shell {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 72;
  transform: translateX(-50%);
  width: min(960px, calc(100vw - 30px));
  display: grid;
  justify-items: center;
  gap: 8px;
  pointer-events: auto;
}

.activity-analytes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
}

.activity-filter-break {
  flex-basis: 100%;
  width: 0;
  height: 0;
}

.activity-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.activity-family-wrap::after {
  content: "";
  position: absolute;
  left: -14px;
  right: -14px;
  bottom: 100%;
  height: 18px;
  pointer-events: auto;
}

.activity-analyte-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.68);
  color: var(--muted-strong);
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(2, 8, 23, 0.28);
  backdrop-filter: blur(16px) saturate(1.25);
}

.activity-analyte-chip.family-chip {
  padding-right: 32px;
}

.activity-analyte-chip.active {
  border-color: color-mix(in srgb, var(--chip-color) 55%, rgba(255, 255, 255, 0.18));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--chip-color) 26%, transparent), rgba(255, 255, 255, 0.04)),
    rgba(8, 16, 30, 0.74);
  color: var(--text);
}

.activity-analyte-chip:not(.active) {
  opacity: 0.56;
}

.chip-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--chip-color) 48%, rgba(255, 255, 255, 0.18));
  border-radius: 999px;
  background: color-mix(in srgb, var(--chip-color) 22%, rgba(6, 14, 26, 0.72));
  color: var(--text);
  font-size: 10px;
  line-height: 1;
  margin-left: -2px;
  margin-right: 0;
}

.chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--chip-color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--chip-color) 70%, transparent);
}

.activity-family-toggle {
  position: absolute;
  right: 9px;
  top: 50%;
  z-index: 2;
  display: grid;
  width: 18px;
  height: 24px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.82);
  cursor: pointer;
}

.activity-family-toggle svg {
  width: 13px;
  height: 13px;
}

.activity-family-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  z-index: 140;
  display: grid;
  min-width: 206px;
  gap: 4px;
  padding: 8px;
  transform: translate(-50%, 8px);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(99, 179, 255, 0.12), rgba(15, 23, 42, 0.86)),
    rgba(6, 14, 26, 0.84);
  box-shadow: 0 18px 48px rgba(2, 8, 23, 0.42);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(18px) saturate(1.3);
  transition: opacity 150ms ease, transform 150ms ease;
}

.activity-family-wrap.is-open .activity-family-menu,
.activity-family-wrap:hover .activity-family-menu,
.activity-family-wrap:focus-within .activity-family-menu {
  display: grid;
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.activity-family-option {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted-strong);
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.activity-family-option:hover,
.activity-family-option:focus-visible {
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
}

.activity-family-option.active {
  color: var(--text);
}

.family-check {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.74);
}

.activity-family-option.active .family-check {
  border-color: color-mix(in srgb, var(--chip-color) 70%, rgba(255, 255, 255, 0.24));
  background: color-mix(in srgb, var(--chip-color) 40%, rgba(15, 23, 42, 0.78));
}

.activity-family-option.active .family-check::after {
  content: "";
  width: 7px;
  height: 4px;
  border-left: 2px solid #eaf6ff;
  border-bottom: 2px solid #eaf6ff;
  transform: rotate(-45deg) translate(1px, -1px);
}

body.map-only-mode .map-layer {
  cursor: grab;
}

body.map-only-mode .map-layer:active {
  cursor: grabbing;
}

@keyframes panel-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.panel-heading {
  width: min(800px, 100%);
  margin: 0 auto 18px;
  text-align: center;
}

.hero-heading {
  display: none;
  position: fixed;
  left: 50%;
  top: 88px;
  width: min(800px, calc(100vw - 36px));
  transform: translateX(-50%);
  z-index: 8;
  min-height: 0;
  margin-bottom: 0;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 4px 0 20px;
  isolation: isolate;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.hero-heading::before {
  content: none;
}

.hero-heading > * {
  position: relative;
  z-index: 1;
}

body.detail-docked .hero-heading {
  opacity: 1;
}

body.this-week-site-selected .hero-heading {
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
}

.site-map-heading {
  position: fixed;
  left: 50%;
  top: 88px;
  z-index: 8;
  width: min(800px, calc(100vw - 36px));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.this-week-site-selected .site-map-heading {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.site-map-heading .level-pill {
  margin-bottom: 12px;
}

.site-map-heading h1 {
  margin-top: 0;
  font-size: clamp(32px, 5.2vw, 58px);
  text-shadow:
    0 18px 46px rgba(2, 8, 23, 0.98),
    0 6px 18px rgba(2, 8, 23, 0.9),
    0 1px 3px rgba(2, 8, 23, 0.88);
}

.site-map-heading p {
  margin-top: 10px;
  color: var(--muted-strong);
  font-size: 15px;
  line-height: 1.45;
  text-shadow:
    0 14px 34px rgba(2, 8, 23, 0.94),
    0 4px 14px rgba(2, 8, 23, 0.84),
    0 1px 2px rgba(2, 8, 23, 0.86);
}

.panel-heading.compact {
  margin-bottom: 16px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-logo-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.98;
  letter-spacing: 0;
  text-shadow: 0 12px 42px rgba(2, 8, 23, 0.52);
}

h1 br {
  display: block;
}

.panel-heading p {
  margin: 12px auto 0;
  max-width: 680px;
  color: var(--muted-strong);
  font-size: 16px;
  line-height: 1.5;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.detail-sheet {
  pointer-events: auto;
  position: relative;
  z-index: 9;
  margin: 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 28px 28px var(--radius) var(--radius);
  background: rgba(7, 15, 28, 0.84);
  backdrop-filter: blur(20px);
  box-shadow: 0 -18px 80px rgba(2, 8, 23, 0.38);
  padding: 18px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease,
    margin-top 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portal-panel[data-panel="this-week"] .detail-sheet {
  margin-top: max(430px, calc(78vh - 112px));
}

body.this-week-map-unlocked .portal-panel[data-panel="this-week"] .detail-sheet {
  margin-top: max(520px, calc(100vh - 220px));
}

.detail-sheet.site-mode {
  background: rgba(7, 15, 28, 0.9);
  border-color: rgba(99, 179, 255, 0.34);
  padding-top: 18px;
}

.weekly-overview,
.site-detail-view {
  animation: sheet-content-in 180ms ease both;
}

.site-detail-view[hidden],
.weekly-overview[hidden] {
  display: none;
}

@keyframes sheet-content-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sheet-handle {
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.34);
  margin: 0 auto 16px;
}

.site-back-button,
.sheet-map-lock-button {
  position: absolute;
  top: -48px;
  z-index: 3;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.68);
  color: var(--muted-strong);
  padding: 0 12px 0 10px;
  font-size: 13px;
  font-weight: 750;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.24);
}

.site-back-button {
  top: -87px;
  left: -18px;
}

.sheet-map-lock-button {
  right: 0;
}

.site-back-button svg,
.sheet-map-lock-button svg {
  width: 17px;
  height: 17px;
}

.map-lock-icon-unlocked,
.sheet-map-lock-button.is-unlocked .map-lock-icon-locked {
  display: none;
}

.sheet-map-lock-button.is-unlocked .map-lock-icon-unlocked {
  display: block;
}

.site-back-button:hover,
.site-back-button:focus-visible,
.sheet-map-lock-button:hover,
.sheet-map-lock-button:focus-visible {
  color: #ffffff;
  border-color: rgba(191, 219, 254, 0.42);
  background: rgba(15, 30, 52, 0.76);
}

.site-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 8px;
  color: var(--text);
}

.site-detail-toolbar strong {
  font-size: 16px;
  line-height: 1;
}

.site-close-button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--muted-strong);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.site-close-button:hover,
.site-close-button:focus-visible {
  color: #ffffff;
  border-color: rgba(191, 219, 254, 0.42);
  background: rgba(30, 41, 59, 0.7);
}

.site-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin: 0 0 12px;
  padding: 0 4px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.site-detail-hero h2 {
  margin-top: 10px;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
}

.site-detail-hero p {
  margin-top: 8px;
  color: var(--muted-strong);
}

.site-week-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(120, 53, 15, 0.22);
  color: #fed7aa;
  font-size: 13px;
  line-height: 1.35;
}

.site-week-note strong {
  flex: 0 0 auto;
  color: #ffedd5;
}

.site-week-note span {
  color: #fdba74;
}

.site-trend-card {
  margin-bottom: 12px;
}

.site-evidence-grid + .site-trend-card {
  margin-top: 12px;
}

.site-trend-card .trend-card-header {
  margin-bottom: 2px;
}

.site-trend-card h3 {
  margin-bottom: 0;
}

.sheet-trend-chart {
  height: 300px;
  min-height: 300px;
}

.site-evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
}

.site-evidence-grid .drawer-section {
  margin-bottom: 0;
}

.site-evidence-grid .events-card {
  grid-column: span 1;
}

.site-evidence-grid .guardrail-card {
  grid-column: span 1;
}

.visual-card {
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025) 46%, rgba(99, 179, 255, 0.045)),
    rgba(15, 23, 42, 0.55);
}

.section-label-row {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-label-row h3 {
  margin-bottom: 0;
}

.section-label-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.reason-lead {
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 680;
}

.reason-chip-row,
.signal-badge-row,
.guardrail-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.reason-chip-row span,
.signal-badge,
.guardrail-chip-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(8, 18, 34, 0.52);
  color: var(--muted-strong);
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.25;
}

.guardrail-chip-grid span {
  padding: 9px 14px;
  line-height: 1.35;
}

.signal-badge {
  border-color: rgba(99, 179, 255, 0.26);
  background: rgba(37, 99, 235, 0.13);
  color: #bfdbfe;
}

.signal-muted {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.08);
  color: var(--muted);
}

.snapshot-metrics {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 10px;
}

.metric-tile {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(8, 18, 34, 0.42);
  padding: 12px;
}

.metric-tile span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.metric-tile strong {
  margin-top: 7px;
  color: #ffffff;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 0.98;
}

.metric-tile em {
  margin-top: 5px;
  color: var(--muted-strong);
  font-size: 12px;
  font-style: normal;
}

.metric-emphasis {
  border-color: rgba(99, 179, 255, 0.3);
  background:
    radial-gradient(circle at 70% 18%, rgba(96, 165, 250, 0.22), transparent 42%),
    rgba(37, 99, 235, 0.14);
}

.summary-card,
.glass-card,
.question-card,
.review-row,
.evidence-empty {
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.summary-card {
  min-height: 112px;
  border-radius: var(--radius);
  padding: 16px;
}

.summary-card.summary-alert {
  border-color: rgba(239, 68, 68, 0.34);
  background:
    radial-gradient(circle at 78% 12%, rgba(239, 68, 68, 0.24), transparent 42%),
    linear-gradient(145deg, rgba(239, 68, 68, 0.16), rgba(15, 23, 42, 0.68) 58%),
    rgba(15, 23, 42, 0.72);
}

.summary-card.summary-review {
  border-color: rgba(245, 158, 11, 0.34);
  background:
    radial-gradient(circle at 78% 12%, rgba(245, 158, 11, 0.24), transparent 42%),
    linear-gradient(145deg, rgba(245, 158, 11, 0.15), rgba(15, 23, 42, 0.68) 58%),
    rgba(15, 23, 42, 0.72);
}

.summary-card.summary-alert strong,
.summary-card.summary-review strong {
  color: #ffffff;
}

.summary-card.summary-alert span {
  color: #fecdd3;
}

.summary-card.summary-review span {
  color: #fde68a;
}

.summary-card span,
.muted {
  color: var(--muted);
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.summary-card p {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 13px;
}

.analysis-trend-card {
  margin: 12px 0 14px;
}

.analysis-trend-chart {
  width: 100%;
  height: 260px;
  min-height: 260px;
}

.trend-card-header {
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.trend-card-header h2,
.trend-card-header h3 {
  min-width: 0;
}

.trend-card-header > .muted {
  justify-self: end;
  text-align: right;
}

.trend-note {
  grid-column: 1 / -1;
  justify-self: end;
  margin-top: -6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.trend-range-toggle {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.5);
  backdrop-filter: blur(14px);
}

.trend-range-toggle button {
  min-width: 42px;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
}

.trend-range-toggle button.active {
  color: #ffffff;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05) 48%, rgba(99, 179, 255, 0.12)),
    rgba(30, 64, 110, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.question-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.question-card {
  border-radius: var(--radius);
  padding: 18px;
}

.question-card h2 {
  font-size: 16px;
}

.question-card p {
  margin-top: 10px;
  color: var(--muted-strong);
  line-height: 1.45;
}

.brief-grid,
.map-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.glass-card {
  border-radius: var(--radius);
  padding: 16px;
}

.card-title-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.card-title-row h2 {
  font-size: 16px;
}

.info-dot {
  position: relative;
  display: inline-grid;
  width: 15px;
  height: 15px;
  margin-left: 4px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
  color: rgba(203, 213, 225, 0.78);
  font-size: 9px;
  font-weight: 750;
  line-height: 15px;
  padding: 0;
  vertical-align: 2px;
}

.info-dot:hover,
.info-dot:focus-visible {
  border-color: rgba(147, 197, 253, 0.42);
  background: rgba(99, 179, 255, 0.1);
  color: #bfdbfe;
}

.info-dot::after {
  content: none;
}

.info-tooltip-layer {
  position: fixed;
  left: -9999px;
  top: -9999px;
  z-index: 6200;
  width: min(280px, calc(100vw - 34px));
  padding: 9px 10px;
  border: 1px solid rgba(191, 219, 254, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 30, 52, 0.98), rgba(8, 18, 34, 0.96));
  box-shadow: 0 18px 42px rgba(2, 8, 23, 0.42);
  color: var(--text);
  font-size: 11px;
  font-weight: 550;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(4px);
  transition: opacity 130ms ease, transform 130ms ease;
  white-space: normal;
}

.info-tooltip-layer.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-chip-list,
.finding-list,
.region-list,
.review-list {
  display: grid;
  gap: 10px;
}

.compact-empty {
  width: 100%;
  padding: 14px;
  text-align: left;
}

.site-chip,
.finding-item,
.region-item,
.review-row {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-sm);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04) 45%, rgba(99, 179, 255, 0.07)),
    rgba(10, 20, 36, 0.38);
  padding: 10px;
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(2, 8, 23, 0.18);
}

button.region-item {
  width: 100%;
  color: inherit;
  text-align: left;
}

.site-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: inherit;
}

.site-chip:hover,
.region-item:hover,
.review-row:hover {
  border-color: rgba(191, 219, 254, 0.38);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.055) 45%, rgba(99, 179, 255, 0.12)),
    rgba(14, 28, 48, 0.58);
}

.review-all-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(191, 219, 254, 0.2);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045) 45%, rgba(99, 179, 255, 0.1)),
    rgba(10, 20, 36, 0.44);
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 750;
  backdrop-filter: blur(18px);
}

.review-all-button svg {
  width: 16px;
  height: 16px;
}

.review-all-button:hover,
.review-all-button:focus-visible {
  color: #ffffff;
  border-color: rgba(191, 219, 254, 0.42);
}

.level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid transparent;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

span.level-pill,
.site-chip .level-pill,
.review-row .level-pill,
.finding-item .level-pill {
  color: var(--accent);
}

.level-monitor {
  border-color: rgba(125, 211, 252, 0.28);
  background: rgba(125, 211, 252, 0.12);
  color: #7dd3fc;
}

.level-review {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.level-high_concern {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.15);
  color: #fb7185;
}

span.level-high_concern,
.site-chip .level-high_concern,
.review-row .level-high_concern,
.finding-item .level-high_concern {
  color: #fb7185;
}

span.level-review,
.site-chip .level-review,
.review-row .level-review,
.finding-item .level-review {
  color: #fbbf24;
}

span.level-monitor,
.site-chip .level-monitor,
.review-row .level-monitor,
.finding-item .level-monitor {
  color: #7dd3fc;
}

.finding-item h3,
.region-item h3 {
  font-size: 14px;
}

.finding-item p,
.region-item p,
.note-copy {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot-color);
}

.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}

.review-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.review-filter::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--admin-logo-blue);
  border-bottom: 1.6px solid var(--admin-logo-blue);
  transform: translateY(-62%) rotate(45deg);
  pointer-events: none;
}

.review-filter select {
  min-width: 142px;
  min-height: 36px;
  appearance: none;
  padding: 0 34px 0 14px;
  border-color: rgba(255, 255, 255, 0.19);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045) 44%, rgba(99, 179, 255, 0.11)),
    rgba(10, 20, 36, 0.52);
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 760;
}

.review-card {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
}

.review-card-header {
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.review-title-group {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.review-title-group h2 {
  font-size: 18px;
  line-height: 1;
}

.review-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.review-list::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
  width: 10px;
}

.review-list::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
  background: rgba(203, 213, 225, 0.48);
  border-radius: 999px;
  border: 3px solid rgba(15, 23, 42, 0.7);
}

.review-row {
  width: 100%;
  border-radius: var(--radius-sm);
  min-height: 82px;
  padding: 14px 14px 14px 16px;
  color: inherit;
  display: grid;
  grid-template-columns: auto minmax(0, 1.05fr) minmax(190px, 0.95fr) auto;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.review-main strong,
.site-chip strong {
  display: block;
}

.review-main span,
.site-chip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.review-detail {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.25;
}

.review-event-line {
  color: var(--text);
  font-weight: 750;
}

.review-reason {
  color: var(--muted-strong);
  font-size: 13px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.review-arrow {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(191, 219, 254, 0.2);
  border-radius: 999px;
  color: var(--admin-logo-blue);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045) 45%, rgba(99, 179, 255, 0.1)),
    rgba(9, 18, 32, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 20px rgba(2, 8, 23, 0.18);
}

.review-arrow svg {
  width: 18px;
  height: 18px;
}

.evidence-empty {
  width: min(620px, 100%);
  margin: 0 auto;
  border-radius: var(--radius);
  padding: 22px;
  display: grid;
  gap: 8px;
  text-align: center;
}

.evidence-empty span {
  color: var(--muted-strong);
  line-height: 1.45;
}

.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 30;
  transform: translateX(-50%);
  isolation: isolate;
  overflow: visible;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(147, 197, 253, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(99, 179, 255, 0.32), rgba(99, 179, 255, 0.09) 48%, rgba(15, 31, 54, 0.72)),
    rgba(12, 25, 44, 0.84);
  backdrop-filter: blur(22px) saturate(1.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 38px rgba(8, 47, 73, 0.26);
}

.bottom-dock::before {
  content: none;
}

.dock-button {
  position: relative;
  z-index: 1;
  min-width: 86px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  padding: 0 13px;
  font-size: 13px;
  backdrop-filter: blur(18px) saturate(1.35);
}

.dock-button.active {
  border-color: rgba(191, 219, 254, 0.34);
  background:
    linear-gradient(145deg, rgba(219, 234, 254, 0.28), rgba(99, 179, 255, 0.16) 45%, rgba(59, 130, 246, 0.2)),
    rgba(22, 45, 76, 0.58);
  color: var(--text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 24px rgba(2, 8, 23, 0.24);
}

.drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  pointer-events: none;
}

.drawer.open {
  display: block;
  pointer-events: auto;
}

.drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 23, 0.42);
}

.drawer-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(520px, calc(100vw - 32px));
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  background: rgba(10, 19, 34, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateX(24px);
  opacity: 0;
  animation: drawer-in 180ms ease forwards;
}

@keyframes drawer-in {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.drawer-header {
  min-height: 74px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
  margin-top: 4px;
  font-size: 22px;
}

.drawer-close {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-size: 20px;
}

.drawer-body {
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px;
}

.drawer-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.6);
  padding: 14px;
  margin-bottom: 12px;
}

.drawer-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
}

.drawer-section p,
.drawer-section li,
.meta-grid span {
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.45;
}

.drawer-section ul {
  margin: 0;
  padding-left: 18px;
}

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

.meta-grid strong {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

.event-list {
  display: grid;
  gap: 8px;
}

.event-row {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding-top: 8px;
}

.event-card-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 13px;
  background: rgba(8, 18, 34, 0.46);
  padding: 10px;
}

.event-card-row strong {
  display: block;
  color: #f8fafc;
  font-size: 13px;
}

.event-card-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.tier-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.event-confidence {
  color: var(--muted-strong);
  font-size: 12px;
  white-space: nowrap;
}

.severity-tier-1 .tier-pill,
.tier-pill.severity-tier-1 {
  background: rgba(96, 165, 250, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.28);
  color: #93c5fd;
}

.severity-tier-2 .tier-pill,
.tier-pill.severity-tier-2 {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #fbbf24;
}

.severity-tier-3 .tier-pill,
.tier-pill.severity-tier-3 {
  background: rgba(239, 68, 68, 0.17);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fb7185;
}

.empty-copy {
  color: var(--muted-strong);
}

.drawer-section .reason-lead {
  color: #e2e8f0;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 680;
}

.trend-chart {
  width: 100%;
  height: 340px;
  min-height: 340px;
}

#toast-viewport {
  position: fixed;
  top: max(14px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  width: min(560px, calc(100vw - 28px));
  display: grid;
  gap: 8px;
  pointer-events: none;
}

#toast-viewport:empty {
  display: none;
}

.toast {
  --toast-accent: var(--muted);
  --toast-bg-a: rgba(18, 28, 48, 0.96);
  --toast-bg-b: rgba(14, 22, 38, 0.94);
  --toast-border: rgba(148, 163, 184, 0.22);
  --toast-text: var(--text);
  --toast-glow: rgba(148, 163, 184, 0.12);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 46px;
  padding: 12px 12px 12px 16px;
  border: 1px solid var(--toast-border);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18px 0, var(--toast-glow), transparent 46%),
    linear-gradient(180deg, var(--toast-bg-a), var(--toast-bg-b));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--toast-text);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-18px) scale(0.98);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid color-mix(in srgb, var(--toast-accent) 72%, transparent);
  opacity: 0.8;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-info {
  --toast-accent: #7dd3fc;
  --toast-text: #c5eaff;
  --toast-border: rgba(125, 211, 252, 0.32);
  --toast-bg-a: rgba(14, 45, 73, 0.96);
  --toast-bg-b: rgba(12, 36, 60, 0.94);
  --toast-glow: rgba(125, 211, 252, 0.16);
}

.toast-success {
  --toast-accent: #34d399;
  --toast-text: #b8f7d5;
  --toast-border: rgba(52, 211, 153, 0.34);
  --toast-bg-a: rgba(12, 53, 40, 0.96);
  --toast-bg-b: rgba(10, 39, 32, 0.94);
  --toast-glow: rgba(52, 211, 153, 0.18);
}

.toast-warning {
  --toast-accent: #fbbf24;
  --toast-text: #ffe7a3;
  --toast-border: rgba(251, 191, 36, 0.34);
  --toast-bg-a: rgba(74, 45, 7, 0.96);
  --toast-bg-b: rgba(61, 37, 8, 0.94);
  --toast-glow: rgba(251, 191, 36, 0.18);
}

.toast-error {
  --toast-accent: #fb7185;
  --toast-text: #ffd1da;
  --toast-border: rgba(251, 113, 133, 0.36);
  --toast-bg-a: rgba(73, 20, 34, 0.96);
  --toast-bg-b: rgba(57, 18, 30, 0.94);
  --toast-glow: rgba(251, 113, 133, 0.18);
}

.toast-body {
  position: relative;
  z-index: 1;
  flex: 1;
  color: var(--toast-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.toast-dismiss {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--toast-accent) 78%, #ffffff);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}

.toast-dismiss:hover,
.toast-dismiss:focus-visible {
  color: #ffffff;
}

@media (max-width: 820px) {
  .topbar {
    top: 10px;
    width: calc(100vw - 20px);
    border-radius: 22px;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .brand-block {
    display: grid;
    gap: 2px;
  }

  .brand-block strong {
    white-space: normal;
  }

  .topbar-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .week-picker {
    width: 100%;
    min-width: 0;
  }

  .week-stepper {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: center;
  }

  .activity-week-readout {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .week-step-button {
    flex: 0 0 auto;
  }

  .focus-shell {
    padding-top: 134px;
    padding-bottom: 108px;
  }

  .activity-timeline {
    top: 118px;
    width: calc(100vw - 20px);
    border-radius: 20px;
    padding: 9px 10px 10px;
  }

  .activity-mode-button {
    min-height: 34px;
    padding: 0 11px;
  }

  .timeline-control {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
  }

  .timeline-slider-wrap {
    grid-column: 1;
  }

  .activity-playback-button {
    grid-column: 2;
    grid-row: 1;
  }

  .timeline-edge-label {
    display: none;
  }

  .timeline-tick-label {
    display: none;
  }

  .timeline-tick:nth-child(4n + 1) .timeline-tick-label,
  .timeline-tick:last-child .timeline-tick-label {
    display: block;
  }

  .activity-range-meta {
    text-align: center;
    line-height: 1.25;
  }

  .activity-range-caption {
    top: 270px;
    width: calc(100vw - 28px);
    font-size: 11px;
  }

  .activity-analyte-shell {
    bottom: 84px;
    width: calc(100vw - 18px);
    justify-items: stretch;
  }

  .activity-select-mode-toggle {
    justify-self: center;
  }

  .activity-analytes {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: visible;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .activity-analytes::-webkit-scrollbar {
    display: none;
  }

  .activity-analyte-chip {
    flex: 0 0 auto;
    min-height: 38px;
  }

  .activity-filter-break {
    display: none;
  }

  .activity-family-menu {
    position: fixed;
    left: 50%;
    bottom: 148px;
    width: min(260px, calc(100vw - 32px));
  }

  .hero-heading {
    top: 134px;
    margin-bottom: max(270px, calc(72vh - 220px));
    padding-top: 4px;
  }

  .site-map-heading {
    top: 134px;
  }

  .site-map-heading h1 {
    font-size: 36px;
  }

  .site-map-heading p {
    font-size: 13px;
  }

  .portal-panel[data-panel="this-week"] .detail-sheet {
    margin-top: max(430px, calc(70vh - 70px));
  }

  body.this-week-map-unlocked .portal-panel[data-panel="this-week"] .detail-sheet {
    margin-top: max(520px, calc(100vh - 212px));
  }

  .hero-heading::before {
    content: none;
  }

  h1 {
    font-size: 38px;
  }

  .summary-grid,
  .question-stack,
  .brief-grid,
  .map-grid {
    grid-template-columns: 1fr;
  }

  .trend-card-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .trend-card-header > .muted,
  .trend-range-toggle,
  .trend-note {
    justify-self: start;
  }

  .trend-note {
    margin-top: -2px;
  }

  .analysis-trend-chart {
    height: 240px;
    min-height: 240px;
  }

  .detail-sheet.site-mode {
    border-radius: 26px 26px 0 0;
  }

  .site-detail-hero {
    display: grid;
  }

  .site-detail-toolbar {
    margin-top: -2px;
  }

  .site-evidence-grid {
    grid-template-columns: 1fr;
  }

  .snapshot-metrics,
  .event-card-row {
    grid-template-columns: 1fr;
  }

  .event-confidence {
    white-space: normal;
  }

  .sheet-trend-chart {
    height: 280px;
    min-height: 280px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .portal-panel[data-panel="review"] {
    top: 142px;
    bottom: 86px;
    width: calc(100vw - 24px);
  }

  .review-card {
    padding: 14px;
  }

  .review-card-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .review-title-group {
    justify-content: space-between;
  }

  .review-filter,
  .review-filter select {
    width: 100%;
  }

  .bottom-dock {
    width: calc(100vw - 22px);
    bottom: 12px;
    justify-content: space-between;
    border-radius: 24px;
  }

  .dock-button {
    min-width: 0;
    flex: 1;
    padding: 0 8px;
  }

  .drawer-panel {
    inset: 0;
    width: 100%;
    border-radius: 0;
  }

  .trend-chart {
    height: 300px;
    min-height: 300px;
  }

  .site-chip {
    grid-template-columns: 1fr;
  }

  .review-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    min-height: 112px;
  }

  .review-row .level-pill,
  .review-main,
  .review-detail {
    grid-column: 1;
  }

  .review-arrow {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
  }

  .review-reason {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 560px) {
  .focus-shell {
    padding-top: 152px;
  }

  .hero-heading {
    top: 152px;
    margin-bottom: max(250px, calc(66vh - 192px));
  }

  .site-map-heading {
    top: 152px;
  }

  .activity-timeline {
    top: 138px;
  }

  .activity-range-caption {
    top: 290px;
  }

  .portal-panel[data-panel="review"] {
    top: 156px;
  }

  .portal-panel[data-panel="this-week"] .detail-sheet {
    margin-top: max(400px, calc(66vh - 60px));
  }

  body.this-week-map-unlocked .portal-panel[data-panel="this-week"] .detail-sheet {
    margin-top: max(480px, calc(100vh - 202px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .fallback-marker.marker-high_concern::before,
  .google-site-marker.marker-high_concern::before,
  .map-fanout-marker.marker-high_concern::before,
  .fallback-marker.marker-activity-strong::before,
  .google-site-marker.marker-activity-strong::before,
  .map-fanout-marker.marker-activity-strong::before,
  .map-fanout-marker {
    animation: none;
  }

  .fallback-marker,
  .google-site-marker {
    animation: none;
    transition: none;
  }

  .portal-panel {
    animation: none;
  }
}

.action-login-page {
  min-height: 100vh;
  overflow: hidden;
  background: #07111f;
}

.action-login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 42%, rgba(56, 189, 248, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.82), rgba(3, 7, 18, 0.98)),
    #07111f;
}

.action-login-grid {
  position: absolute;
  inset: -16%;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(147, 197, 253, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 197, 253, 0.12) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: rotate(-7deg) scale(1.1);
}

.action-login-glow {
  position: absolute;
  width: 430px;
  height: 430px;
  border-radius: 999px;
  filter: blur(52px);
  opacity: 0.4;
}

.action-login-glow-one {
  left: 8%;
  top: 16%;
  background: rgba(99, 179, 255, 0.32);
}

.action-login-glow-two {
  right: 9%;
  bottom: 6%;
  background: rgba(34, 211, 238, 0.18);
}

.action-login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.action-login-card {
  width: min(520px, calc(100vw - 32px));
  padding: 26px;
  border: 1px solid rgba(191, 219, 254, 0.24);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 44%, rgba(99, 179, 255, 0.12)),
    rgba(8, 16, 30, 0.72);
  backdrop-filter: blur(24px) saturate(1.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 28px 90px rgba(2, 8, 23, 0.54);
}

.action-login-card.compact {
  width: min(480px, calc(100vw - 32px));
}

.action-login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.action-login-brand span {
  color: var(--admin-logo-blue);
  font-weight: 800;
  font-size: 19px;
  line-height: 1;
}

.action-login-brand strong {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.action-login-copy {
  margin-bottom: 22px;
}

.action-login-copy h1 {
  margin: 6px 0 10px;
  font-size: clamp(28px, 6vw, 46px);
  line-height: 0.98;
  letter-spacing: 0;
}

.action-login-copy p {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  line-height: 1.55;
}

.action-login-form {
  display: grid;
  gap: 14px;
}

.action-login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.action-login-form input {
  min-height: 48px;
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: 16px;
  background: rgba(4, 10, 20, 0.5);
  color: var(--text);
  padding: 0 15px;
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.action-login-form input:focus {
  border-color: rgba(99, 179, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 0 4px rgba(99, 179, 255, 0.14);
}

.action-login-submit {
  min-height: 48px;
  margin-top: 4px;
  border: 1px solid rgba(191, 219, 254, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(99, 179, 255, 0.42), rgba(59, 130, 246, 0.26)),
    rgba(14, 28, 49, 0.8);
  color: #f8fafc;
  font-weight: 800;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 34px rgba(15, 23, 42, 0.38);
}

.action-login-link {
  display: inline-flex;
  margin-top: 18px;
  color: #bfdbfe;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.action-login-link:hover,
.action-login-link:focus-visible {
  color: #f8fafc;
}

.action-login-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(248, 113, 113, 0.34);
  border-radius: 16px;
  background: rgba(127, 29, 29, 0.3);
  color: #fecaca;
  font-size: 13px;
  line-height: 1.4;
}

.action-login-alert.success {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(20, 83, 45, 0.28);
  color: #bbf7d0;
}

@media (max-width: 560px) {
  .action-login-shell {
    align-items: end;
    padding: 18px;
  }

  .action-login-card {
    padding: 22px;
    border-radius: 24px;
  }

  .action-login-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 26px;
  }
}
