@font-face {
  font-family: "Source Sans 3";
  src: url("/static/assets/fonts/source-sans-3/SourceSans3VF-Upright.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/InterVariable.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/assets/fonts/source-sans-3/SourceSans3VF-Italic.woff2") format("woff2-variations");
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

: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);
  --motion-tooltip: 130ms;
  --motion-fast: 150ms;
  --motion-ui: 180ms;
  --motion-panel: 220ms;
  --motion-layout: 260ms;
  --motion-map: 360ms;
  --motion-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --stable-safe-top: env(safe-area-inset-top, 0px);
  --visual-bottom-inset: 0px;
  --pwa-bottom-lift: 0px;
  --browser-canvas-color: #101b2d;
  --browser-canvas-bg:
    radial-gradient(circle at 18% 24%, rgba(99, 179, 255, 0.18), transparent 26%),
    radial-gradient(circle at 76% 18%, rgba(56, 189, 248, 0.11), transparent 24%),
    radial-gradient(circle at 47% 78%, rgba(30, 64, 175, 0.14), transparent 36%),
    linear-gradient(180deg, #0c1728 0%, #111d31 46%, #08111f 100%);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.pwa-standalone {
  --pwa-bottom-lift: 40px;
}

@media (display-mode: standalone) {
  :root {
    --pwa-bottom-lift: 40px;
  }
}

* {
  box-sizing: border-box;
}

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

html {
  overflow-y: auto;
  scrollbar-width: none;
  background: var(--bg-primary);
}

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

body {
  margin: 0;
  color: var(--text);
  overflow-x: hidden;
  -ms-overflow-style: none;
  background-color: var(--browser-canvas-color);
  background-image: var(--browser-canvas-bg);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  z-index: 8500;
  pointer-events: none;
  background: var(--bg-primary);
}

body::before {
  top: 0;
  height: var(--stable-safe-top);
}

body::after {
  bottom: 0;
  height: calc(var(--visual-bottom-inset) + var(--safe-bottom));
}

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-color: var(--browser-canvas-color);
  background-image:
    radial-gradient(circle at 50% 45%, rgba(30, 64, 175, 0.22), transparent 38%),
    var(--browser-canvas-bg);
  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;
}

#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-color: var(--browser-canvas-color);
  background-image: var(--browser-canvas-bg);
}

.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);
}

.fallback-county-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
  filter: drop-shadow(0 8px 18px rgba(2, 8, 23, 0.18));
}

.fallback-state-focus-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  overflow: visible;
  pointer-events: none;
}

.fallback-state-focus-mask {
  fill: rgba(2, 6, 23, 0.39);
  stroke: none;
}

.fallback-state-focus-outline {
  fill: none;
  stroke: #727f94;
  stroke-width: 2.4;
  stroke-opacity: 0.94;
  vector-effect: non-scaling-stroke;
}

.google-state-focus-mask-layer {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
}

.google-state-focus-mask-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.google-state-focus-mask-shape {
  fill: rgba(2, 6, 23, 0.39);
  stroke: none;
}

.fallback-site-boundary-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: auto;
}

.fallback-site-boundary {
  fill: color-mix(in srgb, var(--boundary-color) 6%, transparent);
  stroke: var(--boundary-color);
  stroke-width: 1.9;
  stroke-opacity: .78;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  pointer-events: visiblePainted;
  transition: fill 160ms ease, stroke-opacity 160ms ease, stroke-width 160ms ease;
}

.fallback-site-boundary.is-radius {
  fill: color-mix(in srgb, var(--boundary-color) 2.5%, transparent);
  stroke-width: 1.4;
  stroke-opacity: .56;
  stroke-dasharray: 7 6;
}

.fallback-site-boundary.is-selected {
  fill: color-mix(in srgb, var(--boundary-color) 10%, transparent);
  stroke-width: 3;
  stroke-opacity: .96;
  pointer-events: none;
}

.fallback-site-boundary:not(.is-selected):hover,
.fallback-site-boundary:not(.is-selected):focus-visible {
  fill: color-mix(in srgb, var(--boundary-color) 12%, transparent);
  stroke-opacity: .96;
  stroke-width: 2.5;
  outline: none;
}

.fallback-site-boundary.is-radius.is-selected {
  fill: color-mix(in srgb, var(--boundary-color) 7%, transparent);
  stroke-width: 2.2;
  stroke-opacity: .92;
  stroke-dasharray: 7 5;
}

.fallback-county-layer.is-interactive {
  pointer-events: auto;
}

.fallback-county-shape {
  vector-effect: non-scaling-stroke;
  transition:
    fill-opacity 320ms ease,
    stroke-opacity 320ms ease,
    filter 240ms ease;
}

.fallback-county-layer.is-interactive .fallback-county-shape {
  cursor: pointer;
  pointer-events: visiblePainted;
}

.fallback-county-layer.is-interactive .fallback-county-shape.is-inactive {
  cursor: default;
  pointer-events: none;
}

.fallback-county-shape:hover,
.fallback-county-shape:focus,
.fallback-county-shape.is-selected {
  filter: drop-shadow(0 0 8px rgba(125, 211, 252, 0.34));
}

.fallback-county-shape.is-inactive:hover,
.fallback-county-shape.is-inactive:focus {
  filter: none;
}

.google-overdose-point-layer {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.fallback-overdose-point,
.google-overdose-point {
  position: absolute;
  left: var(--marker-x, 0);
  top: var(--marker-y, 0);
  width: 6px;
  height: 6px;
  border: 1px solid rgba(220, 252, 231, 0.82);
  padding: 0;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 7px rgba(34, 197, 94, 0.76), 0 2px 5px rgba(2, 8, 23, 0.52);
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
  z-index: 4;
  transition:
    width 220ms ease,
    height 220ms ease,
    opacity 280ms cubic-bezier(0.22, 0.74, 0.28, 1),
    transform 280ms cubic-bezier(0.22, 0.74, 0.28, 1);
}

.fallback-overdose-point {
  animation: overdose-point-in 280ms cubic-bezier(0.22, 0.74, 0.28, 1) both;
}

.google-overdose-point.is-overdose-entering,
.google-overdose-point.is-overdose-exiting {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.58);
}

.fallback-overdose-point:hover,
.fallback-overdose-point:focus-visible,
.google-overdose-point:hover,
.google-overdose-point:focus-visible {
  width: 9px;
  height: 9px;
  outline: 2px solid rgba(220, 252, 231, 0.72);
  outline-offset: 2px;
}

.google-overdose-point {
  left: 0;
  top: 0;
}

.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: 3;
}

@media (max-width: 720px) {
  .fallback-overdose-point,
  .google-overdose-point {
    width: 5px;
    height: 5px;
  }
}

.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: 6;
}

.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);
}

.google-site-marker.is-marker-data-changing {
  animation: marker-data-change 520ms cubic-bezier(0.22, 0.74, 0.28, 1) both;
}

.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;
}

.county-tooltip-card {
  min-width: 218px;
  max-width: min(286px, calc(100vw - 28px));
}

.county-tooltip-card span {
  white-space: normal;
}

.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-context,
.google-site-marker.marker-context {
  border-width: 1px;
  border-color: rgba(226, 246, 255, 0.72);
  background: color-mix(in srgb, var(--marker-color) 82%, rgba(15, 23, 42, 0.7));
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--marker-color) 12%, transparent),
    0 6px 14px rgba(2, 8, 23, 0.3);
}

.fallback-marker.marker-context::before,
.google-site-marker.marker-context::before {
  inset: -4px;
  border-width: 1px;
  border-color: color-mix(in srgb, var(--marker-color) 24%, transparent);
  opacity: 0.34;
}

.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 overdose-point-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.58);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes marker-data-change {
  0%, 100% {
    filter: brightness(1) saturate(1);
  }

  48% {
    filter: brightness(1.28) saturate(1.14);
  }
}

@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: max(18px, calc(var(--stable-safe-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);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}

.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-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

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

.brand-block strong span + span {
  margin-left: 4px;
}

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

.tn-statewide-map-legend {
  position: fixed;
  top: var(--tn-statewide-legend-top, calc(var(--stable-safe-top) + 84px));
  left: 50%;
  z-index: 19;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  opacity: 1;
  visibility: visible;
  transition: opacity 190ms ease, visibility 190ms ease, transform 190ms ease;
}

.tn-statewide-map-legend-track {
  width: max-content;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 5px 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  background: rgba(8, 16, 30, 0.72);
  color: var(--muted-strong);
  box-shadow: 0 8px 24px rgba(2, 8, 23, 0.2);
  backdrop-filter: blur(14px);
  font-size: 11px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.tn-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  margin: 0;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: pointer;
  opacity: 1;
  transition: opacity var(--motion-ui) ease, color var(--motion-ui) ease, background var(--motion-fast) ease;
}

.tn-map-legend-item:hover,
.tn-map-legend-item:focus-visible {
  outline: 0;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text);
}

.tn-map-legend-item.is-filtered-out {
  color: #64748b;
  opacity: 0.42;
}

.tn-map-legend-item.is-filtered-out i {
  filter: grayscale(1);
  box-shadow: none;
}

.tn-map-legend-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #64748b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.tn-map-legend-dot.tier-1 { background: #dc2626; }
.tn-map-legend-dot.tier-2 { background: #ea580c; }
.tn-map-legend-dot.tier-3 { background: #2563eb; }
.tn-map-legend-dot.tier-4 { background: #0f766e; }
.tn-map-legend-dot.no-data { background: #64748b; }
.tn-map-legend-dot.incident { background: #22c55e; }

.tn-map-legend-boundary {
  width: 18px;
  height: 0;
  flex: 0 0 18px;
  border-top: 2px solid #7dd3fc;
}

.tn-map-legend-boundary.radius {
  border-top-style: dashed;
}

body.this-week-site-selected .tn-statewide-map-legend,
body.activity-map-mode .tn-statewide-map-legend,
body.panel-dimmed .tn-statewide-map-legend,
body.panel-reporting .tn-statewide-map-legend {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -5px);
}

.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;
}

.week-loading-spinner {
  position: absolute;
  right: 34px;
  top: 50%;
  z-index: 2;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(148, 163, 184, 0.34);
  border-top-color: var(--admin-logo-blue);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
}

.week-picker.is-loading .week-loading-spinner {
  opacity: 1;
  animation: week-pill-spin 680ms linear infinite;
}

.week-picker.is-loading select {
  cursor: progress;
}

@keyframes week-pill-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

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 50px;
  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 {
  gap: 8px;
  min-width: 98px;
  font-size: 12px;
  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);
}

.topbar-icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  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);
  color: #dbeafe;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 10px 30px rgba(2, 8, 23, 0.22);
  backdrop-filter: blur(20px) saturate(1.45);
}

.topbar-icon-button:hover,
.topbar-icon-button:focus-visible {
  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.16)),
    rgba(12, 24, 42, 0.6);
}

.topbar-action-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.refresh-icon-stack {
  position: relative;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  transform-origin: center;
}

.refresh-icon {
  position: absolute;
  inset: 0;
  width: 15px;
  height: 15px;
  opacity: 0;
  transform: scale(0.82);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.refresh-icon-arrows {
  opacity: 1;
  transform: scale(1);
}

.refresh-button[data-refresh-state="refreshing"] .refresh-icon-arrows {
  opacity: 1;
  animation: refresh-spin 850ms linear infinite;
}

.refresh-button[data-refresh-state="success"] .refresh-icon-arrows,
.refresh-button[data-refresh-state="error"] .refresh-icon-arrows {
  opacity: 0;
  transform: scale(0.82);
}

.refresh-button[data-refresh-state="idle"] .refresh-icon-stack,
.refresh-button[data-refresh-state="success"] .refresh-icon-stack,
.refresh-button[data-refresh-state="error"] .refresh-icon-stack {
  animation: none;
}

.refresh-button[data-refresh-state="success"] .refresh-icon-check,
.refresh-button[data-refresh-state="error"] .refresh-icon-error {
  opacity: 1;
  transform: scale(1);
}

.refresh-button:disabled {
  cursor: default;
  opacity: 0.86;
}

@keyframes refresh-spin {
  from {
    transform: scale(1) rotate(0deg);
  }
  to {
    transform: scale(1) rotate(360deg);
  }
}

.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: 19;
  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 var(--motion-panel) var(--motion-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%);
}

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

.portal-panel[data-panel="users"] {
  position: fixed;
  left: 50%;
  top: 92px;
  bottom: 98px;
  width: min(1040px, 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: auto;
  bottom: calc(92px + var(--pwa-bottom-lift));
  z-index: 24;
  width: min(860px, calc(100vw - 34px));
  height: 142px;
  transform: translateX(-50%);
  display: grid;
  align-content: end;
  gap: 2px;
  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: auto;
  bottom: calc(244px + var(--pwa-bottom-lift));
  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;
}

.activity-empty-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 78;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border: 1px solid rgba(191, 219, 254, 0.2);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.045) 44%, rgba(99, 179, 255, 0.1)),
    rgba(6, 14, 26, 0.64);
  color: rgba(241, 248, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 54px rgba(2, 8, 23, 0.38);
  backdrop-filter: blur(16px) saturate(1.25);
  pointer-events: none;
}

.activity-empty-overlay[hidden] {
  display: 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:not(.is-labeled) .timeline-tick-line {
  height: 8px;
  background: rgba(203, 213, 225, 0.26);
}

.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-tick:not(.is-labeled) .timeline-tick-label {
  display: none;
}

.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%;
  top: 86px;
  bottom: auto;
  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;
  column-gap: 8px;
  row-gap: 4px;
  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;
  top: 100%;
  bottom: auto;
  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%;
  top: calc(100% + 6px);
  bottom: auto;
  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(1060px, 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);
}

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

.site-map-heading .level-pill {
  margin-bottom: 12px;
  min-height: 29px;
  padding: 5px 14px;
  font-size: 13px;
  box-shadow:
    0 16px 34px rgba(2, 8, 23, 0.58),
    0 4px 12px rgba(2, 8, 23, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.site-map-heading .level-high_concern {
  border-color: rgba(239, 68, 68, 0.58);
  background:
    linear-gradient(145deg, rgba(239, 68, 68, 0.5), rgba(88, 20, 32, 0.72)),
    rgba(14, 28, 49, 0.76);
}

.site-map-heading .level-review {
  border-color: rgba(245, 158, 11, 0.58);
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.46), rgba(84, 50, 10, 0.7)),
    rgba(14, 28, 49, 0.76);
}

.site-map-heading .level-monitor {
  border-color: rgba(125, 211, 252, 0.52);
  background:
    linear-gradient(145deg, rgba(125, 211, 252, 0.4), rgba(15, 65, 88, 0.66)),
    rgba(14, 28, 49, 0.76);
}

.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;
}

body[data-modern-portal="true"] .summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.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 22px 22px;
  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(520px, calc(100dvh - 220px));
}

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

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

.analysis-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.analysis-card-title-stack {
  min-width: 0;
  display: grid;
  gap: 10px;
  justify-items: start;
}

.analysis-card-header h2 {
  color: var(--text);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 850;
  line-height: 1.06;
  letter-spacing: 0;
  text-align: left;
}

.analysis-card-date {
  flex: 0 0 auto;
  max-width: 44%;
  padding-top: 5px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.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 {
  display: none;
}

.site-back-button,
.sheet-map-lock-button {
  z-index: 3;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(8, 16, 30, 0.78);
  color: #dbeafe;
  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 {
  position: static;
}

.analysis-back-button {
  position: absolute;
  top: -46px;
  left: 0;
  min-height: 38px;
  padding: 0 12px 0 10px;
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0);
  transition:
    opacity 190ms ease,
    visibility 0s linear 190ms;
}

.analysis-back-button.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

.sheet-map-lock-button {
  position: absolute;
  top: -46px;
  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: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-label-row h3 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  line-height: 1;
}

.section-label-row h3 .info-dot,
.trend-card-header h2 .info-dot,
.trend-card-header h3 .info-dot,
.card-title-row h2 .info-dot {
  flex: 0 0 auto;
}

.section-label-row h3 > .info-dot:first-child {
  margin-left: 0;
  margin-right: 2px;
}

.section-label-row span {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  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;
}

.reason-chip-row span,
.guardrail-chip-grid span {
  padding: 11px 16px;
  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);
}

.tn-site-snapshot,
.tn-chart-card,
.tn-guardrail-card {
  margin-top: 12px;
}

.tn-site-snapshot {
  margin-top: 0;
}

.tn-snapshot-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tn-snapshot-metrics .metric-tile {
  min-width: 0;
}

.tn-snapshot-metrics .metric-tile strong {
  overflow-wrap: anywhere;
}

.tn-snapshot-metrics .tn-tier-value,
.tn-snapshot-metrics .tn-confidence-value {
  font-size: 24px;
  line-height: 1.08;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(99, 179, 255, 0.32);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.14);
  color: #bfdbfe !important;
  padding: 4px 9px;
  font-size: 10px !important;
  font-weight: 750;
  line-height: 1.15 !important;
  text-transform: uppercase;
}

.confidence-rationale {
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 12px;
}

.confidence-rationale strong {
  color: var(--text);
  font-size: 12px;
}

.confidence-rationale p,
.tn-chart-footnote {
  margin: 5px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

.tn-chart-card .tn-site-chart {
  width: 100%;
}

.tn-analyte-header {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto;
}

.tn-analyte-picker {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.tn-analyte-picker select {
  min-width: 168px;
  max-width: 240px;
}

.tn-detail-grid {
  margin-top: 12px;
}

.tn-site-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
}

.tn-site-details div {
  min-width: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 10px 8px 10px 0;
}

.tn-site-details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.tn-site-details dd {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.tn-narrative-card .reason-lead {
  margin: 4px 0 0;
  font-size: 15px;
}

.tn-analyte-unavailable {
  min-height: 190px;
  justify-content: center;
}

.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: calc(100% + 14px);
  height: 260px;
  min-height: 260px;
  margin-left: -14px;
  margin-right: 0;
}

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

.trend-card-header h2,
.trend-card-header h3 {
  grid-column: 1;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  line-height: 1;
}

.trend-card-header > .muted {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  align-self: center;
  text-align: right;
  line-height: 1;
}

.trend-note {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  text-align: center;
  align-self: center;
  margin-top: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}

.trend-range-toggle {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-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-stack[hidden] {
  display: none;
}

.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;
}

.brief-grid {
  grid-template-areas: "priority narrative";
}

.priority-sites-card {
  grid-area: priority;
}

#statewideNarrativeCard {
  grid-area: narrative;
}

body[data-modern-portal="true"] .brief-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "priority";
}

body[data-modern-portal="true"] .priority-sites-card {
  width: 100%;
}

.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 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  margin: 0;
  line-height: 1;
}

.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: 1;
  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;
}

.tn-tier-priority-list {
  gap: 12px;
}

.tn-priority-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.tn-priority-column {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.tn-priority-column-heading {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.tn-priority-column-heading h3 {
  margin: 0;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.2;
}

.tn-priority-column-heading span {
  display: inline-grid;
  min-width: 26px;
  min-height: 26px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 800;
}

.tn-priority-tier-1 .tn-priority-column-heading span {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(239, 68, 68, 0.12);
  color: #fb7185;
}

.tn-priority-tier-2 .tn-priority-column-heading span {
  border-color: rgba(245, 158, 11, 0.36);
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.tn-priority-column-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 minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: inherit;
}

.site-chip-status {
  display: flex;
  align-items: center;
  justify-items: start;
  min-width: 0;
}

.site-chip-arrow {
  display: grid;
  position: relative;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  line-height: 0;
  flex: 0 0 30px;
  align-self: center;
  justify-self: end;
  border-radius: 999px;
  color: rgba(191, 219, 254, 0.86);
  background: rgba(99, 179, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.site-chip-arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-top: 2.2px solid currentColor;
  border-right: 2.2px solid currentColor;
  transform: translateX(-1px) rotate(45deg);
}

.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;
  width: max-content;
  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;
}

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

.reporting-card-header,
.report-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.reporting-card-header {
  min-height: 48px;
  margin-bottom: 14px;
}

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

.reporting-title-group h2,
.report-section h3 {
  margin: 0;
  line-height: 1;
}

.reporting-title-group h2 {
  font-size: 18px;
}

.report-section h3 {
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-section p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.35;
}

.reporting-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 17px;
  padding-right: 5px;
  overscroll-behavior: contain;
}

body[data-modern-portal="true"].panel-reporting {
  overflow-y: auto;
  background: #0b1422;
}

body[data-modern-portal="true"].panel-reporting .map-layer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

body[data-modern-portal="true"].panel-reporting .focus-shell {
  min-height: 100dvh;
  padding: 96px 0 112px;
  display: block;
  background: #0b1422;
}

body[data-modern-portal="true"].panel-reporting .portal-panel[data-panel="reporting"] {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: calc(100dvh - 208px);
  transform: none;
  padding: 0 clamp(18px, 4vw, 56px);
}

body[data-modern-portal="true"].panel-reporting .reporting-card {
  width: min(1060px, 100%);
  height: auto;
  min-height: 0;
  margin: 0 auto;
  padding: 20px 0 40px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-modern-portal="true"].panel-reporting .reporting-scroll {
  overflow: visible;
  padding-right: 0;
  overscroll-behavior: auto;
}

@media (max-width: 720px) {
  body[data-modern-portal="true"].panel-reporting .focus-shell {
    padding-top: 156px;
  }
}

.report-builder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 12px;
  align-items: end;
}

.unit-add-grid {
  grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto auto;
}

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

.report-template-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.report-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(7, 17, 31, 0.52);
}

.report-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.report-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-field input,
.report-field select {
  min-width: 0;
  min-height: 34px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(10, 20, 36, 0.72);
  color: var(--text);
  padding: 0 10px;
  font-size: 12px;
  outline: none;
}

.report-field select {
  appearance: none;
}

.report-segmented {
  display: flex;
  gap: 6px;
  height: 34px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(10, 20, 36, 0.56);
}

.report-segmented button {
  flex: 1;
  min-height: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.report-segmented button.active {
  background: rgba(99, 179, 255, 0.22);
  color: var(--text);
}

.report-action-button,
.report-small-button,
.report-create-button,
.report-remove-button,
.report-delete-button,
.report-download-button {
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 999px;
  background: rgba(14, 31, 54, 0.72);
  color: var(--text);
  font-weight: 800;
}

.report-action-button,
.report-small-button,
.report-delete-button,
.report-download-button {
  min-height: 34px;
  padding: 0 13px;
  font-size: 12px;
}

.report-small-button:disabled,
.report-delete-button:disabled,
.report-action-button:disabled {
  opacity: 0.48;
  cursor: default;
}

.report-danger-button {
  color: #fecdd3;
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(127, 29, 29, 0.52);
}

.report-create-button {
  min-height: 44px;
  padding: 0 20px;
  background: rgba(37, 99, 235, 0.5);
  font-size: 14px;
}

.report-create-button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.report-submit-row {
  display: flex;
  justify-content: flex-end;
}

.report-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.report-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--admin-logo-blue);
}

.report-row-stack,
.report-job-list {
  display: grid;
  gap: 10px;
}

.report-builder-row,
.report-job-row,
.report-empty {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 31, 54, 0.46);
  padding: 12px;
}

.report-builder-row {
  display: grid;
  gap: 10px;
}

.report-row-head,
.report-job-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.report-row-title,
.report-job-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.report-row-title strong,
.report-job-title strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-row-title span,
.report-job-title span,
.report-empty {
  color: var(--muted);
  font-size: 12px;
}

.report-remove-button {
  min-height: 24px;
  padding: 0 8px;
  background: rgba(127, 29, 29, 0.58);
  color: #fecdd3;
  border-color: rgba(248, 113, 113, 0.62);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-row-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr);
  gap: 10px;
}

.report-analyte-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.report-analyte-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.38);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 760;
}

.report-analyte-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--admin-logo-blue);
}

.report-job-row {
  display: grid;
  gap: 9px;
}

.report-job-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.report-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.report-progress span {
  display: block;
  height: 100%;
  width: var(--progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #63b3ff, #22c55e);
}

.report-job-row[data-report-status="failed"] .report-progress span {
  background: #ef4444;
}

.report-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

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

.users-card-header,
.users-toolbar,
.users-section-heading,
.users-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.users-card-header {
  min-height: 48px;
  margin-bottom: 12px;
}

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

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

.users-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.users-toolbar {
  margin-bottom: 12px;
}

.users-search-field {
  flex: 1 1 auto;
}

.users-status-field {
  width: 160px;
  flex: 0 0 160px;
}

.users-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.74fr) minmax(0, 1.26fr);
  gap: 14px;
}

.users-list,
.users-editor {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(7, 17, 31, 0.42);
}

.users-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.users-editor {
  padding: 14px;
}

.users-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 31, 54, 0.46);
  color: var(--text);
  padding: 10px;
  text-align: left;
}

.users-row:hover,
.users-row:focus-visible,
.users-row.selected {
  border-color: rgba(147, 197, 253, 0.42);
  background: rgba(37, 99, 235, 0.24);
}

.users-row-main,
.users-row-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.users-row-main strong {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-row-main small,
.users-row-meta small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-row-meta {
  justify-items: end;
}

.users-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.42);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.users-status-pill.active {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(37, 99, 235, 0.26);
}

.users-status-pill.inactive {
  color: #fed7aa;
  border-color: rgba(251, 146, 60, 0.42);
  background: rgba(124, 45, 18, 0.34);
}

.users-empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  padding: 18px;
}

.users-editor-empty {
  height: 100%;
}

.users-editor-form {
  display: grid;
  gap: 14px;
}

.users-editor-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.users-editor-heading h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.users-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(130px, 0.45fr) auto;
  align-items: end;
  gap: 10px;
}

.users-toggle {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.users-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-logo-blue);
}

.users-security-section {
  display: grid;
  gap: 12px;
}

.users-security-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted-strong);
  cursor: pointer;
}

.users-security-option input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: 0 0 auto;
  accent-color: var(--admin-logo-blue);
}

.users-security-option input:disabled {
  cursor: not-allowed;
}

.users-security-option span {
  display: grid;
  gap: 3px;
}

.users-security-option strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.users-security-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

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

.users-meta-grid span {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: rgba(15, 31, 54, 0.38);
  color: var(--muted-strong);
  padding: 10px 12px;
  font-size: 12px;
}

.users-meta-grid strong {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.users-program-section {
  display: grid;
  gap: 10px;
}

.users-section-heading h4 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.users-program-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.34fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 31, 54, 0.46);
  padding: 10px;
}

.users-program-row.is-disabled {
  opacity: 0.56;
}

.users-program-check,
.users-default-radio {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.users-program-check input,
.users-default-radio input {
  width: 17px;
  height: 17px;
  accent-color: var(--admin-logo-blue);
}

.users-program-check span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.users-program-check strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-program-check small {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.users-program-role {
  gap: 4px;
}

.users-form-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

.review-list::-webkit-scrollbar-thumb,
.users-list::-webkit-scrollbar-thumb,
.users-editor::-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 {
  min-width: 0;
}

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

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

.site-chip-main strong,
.site-chip-main .site-chip-meta {
  color: rgba(255, 255, 255, 0.94);
}

.site-chip-main .site-chip-reason {
  color: var(--muted-strong);
}

.site-chip .level-pill,
.site-chip .site-chip-status,
.site-chip .review-arrow,
.site-chip .review-arrow svg {
  margin-top: 0;
}

.site-chip .review-arrow {
  align-self: center;
  justify-self: end;
}

.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: max(
    calc(var(--visual-bottom-inset) + 22px + var(--pwa-bottom-lift)),
    calc(var(--visual-bottom-inset) + var(--safe-bottom) + 22px + var(--pwa-bottom-lift))
  );
  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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted-strong);
  padding: 0 13px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(18px) saturate(1.35);
  transition: color var(--motion-ui) ease, background var(--motion-ui) ease, border-color var(--motion-ui) ease, transform var(--motion-fast) ease;
}

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

.dock-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dock-button-label {
  line-height: 1;
}

.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, 6, 23, 0.42);
  backdrop-filter: blur(8px) saturate(1.12);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(520px, 100vw);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: #121928;
  box-shadow: -24px 0 70px rgba(2, 8, 23, 0.48);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateX(24px);
  opacity: 0;
  animation: drawer-in 180ms ease forwards;
}

body.activity-map-mode .drawer-panel {
  width: min(676px, 100vw);
}

.trafficking-drawer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.trafficking-drawer-summary > div {
  min-width: 0;
  padding: 18px;
}

.trafficking-drawer-summary > div + div {
  border-left: 1px solid rgba(148, 163, 184, 0.18);
}

.trafficking-drawer-summary span,
.trafficking-drawer-summary small,
.trafficking-day span,
.trafficking-day small {
  display: block;
  color: var(--muted);
}

.trafficking-drawer-summary strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--text);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 500;
}

.trafficking-drawer-section {
  padding: 22px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.trafficking-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.trafficking-day {
  min-width: 0;
  padding: 12px 7px;
  text-align: center;
}

.trafficking-day + .trafficking-day {
  border-left: 1px solid rgba(148, 163, 184, 0.14);
}

.trafficking-day strong {
  display: block;
  margin: 5px 0 2px;
  color: var(--text);
  font-size: 20px;
  font-weight: 500;
}

.trafficking-day.is-selected {
  background: rgba(99, 179, 255, 0.12);
}

.trafficking-day.is-empty {
  opacity: 0.54;
}

.trafficking-source-note p {
  margin: 0 0 16px;
  color: var(--muted-strong);
}

.trafficking-source-note dl {
  margin: 0;
}

.trafficking-source-note dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.trafficking-source-note dt { color: var(--muted); }
.trafficking-source-note dd { margin: 0; color: var(--text); text-align: right; }

@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 rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, rgba(30, 42, 58, 0.98), rgba(18, 30, 48, 0.94));
}

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

.drawer-close {
  min-width: 68px;
  width: auto;
  height: 38px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.48);
  color: var(--muted-strong);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 760;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  color: #ffffff;
  border-color: rgba(191, 219, 254, 0.38);
  background: rgba(30, 41, 59, 0.64);
}

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

.drawer-section {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(15, 23, 41, 0.74);
  padding: 14px;
  margin-bottom: 12px;
}

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

.drawer-section .section-label-row h3,
.drawer-section .trend-card-header h2,
.drawer-section .trend-card-header h3 {
  margin: 0;
  line-height: 1;
}

.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;
}

.site-group-pill {
  max-width: 112px;
  min-height: 30px;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
}

.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: calc(100% + 14px);
  height: 340px;
  min-height: 340px;
  margin-left: -14px;
  margin-right: 0;
}

#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;
}

/* Modern analysis sheet: flat, divider-led information bands. */
body[data-modern-portal="true"] {
  --tn-divider: rgba(148, 163, 184, 0.2);
  --tn-divider-strong: rgba(148, 163, 184, 0.3);
  --tn-sheet-tail: calc(118px + var(--safe-bottom));
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
}

body[data-modern-portal="true"] button,
body[data-modern-portal="true"] input,
body[data-modern-portal="true"] select,
body[data-modern-portal="true"] textarea {
  font-family: inherit;
}

body[data-program-key="tn_tbi"] .brand-block strong,
body[data-program-key="tn_tbi"] .dashboard-loading-card strong,
.program-picker-row[data-program-key="tn_tbi"] strong {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body[data-modern-portal="true"] .detail-sheet {
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  padding: 22px 28px calc(32px + var(--tn-sheet-tail));
}

body[data-modern-portal="true"]:not(.activity-map-mode):not(.panel-reporting):not(.panel-users) .focus-shell {
  padding-bottom: 0;
}

body[data-modern-portal="true"] .analysis-card-header {
  margin-bottom: 18px;
}

body[data-modern-portal="true"] .analysis-card-header h2 {
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.08;
}

body[data-modern-portal="true"] .analysis-card-date {
  color: var(--muted);
  font-size: 13px;
  font-weight: 450;
}

body[data-modern-portal="true"] .site-map-heading h1 {
  font-size: clamp(38px, 4.5vw, 52px);
  font-weight: 600;
}

body[data-modern-portal="true"] .site-map-heading p {
  font-weight: 400;
}

body[data-modern-portal="true"] .summary-grid {
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--tn-divider-strong);
  border-bottom: 1px solid var(--tn-divider-strong);
}

body[data-modern-portal="true"] .summary-card,
body[data-modern-portal="true"] .summary-card.summary-alert,
body[data-modern-portal="true"] .summary-card.summary-review {
  min-height: 142px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 20px 24px;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-modern-portal="true"] .summary-card + .summary-card {
  border-left: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"] .summary-card > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
}

body[data-modern-portal="true"] .summary-card > span::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 999px;
  background: #38bdf8;
}

body[data-modern-portal="true"] .summary-card.summary-alert > span {
  color: #fda4af;
}

body[data-modern-portal="true"] .summary-card.summary-alert strong {
  color: #ef4444;
}

body[data-modern-portal="true"] .summary-card.summary-alert > span::before {
  background: #ef4444;
}

body[data-modern-portal="true"] .summary-card.summary-review > span,
body[data-modern-portal="true"] .summary-card.summary-review strong {
  color: #fcd34d;
}

body[data-modern-portal="true"] .summary-card.summary-review > span::before {
  background: #f59e0b;
}

body[data-modern-portal="true"] .summary-card.summary-active-counties > span::before {
  background: currentColor;
}

body[data-modern-portal="true"] .summary-card strong {
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(46px, 5vw, 60px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 0.9;
}

body[data-modern-portal="true"] .summary-card p {
  max-width: 28ch;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
}

body[data-modern-portal="true"] .analysis-trend-card.glass-card,
body[data-modern-portal="true"] .weekly-narrative-card.glass-card,
body[data-modern-portal="true"] .priority-sites-card.glass-card {
  border: 0;
  border-top: 1px solid var(--tn-divider-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-modern-portal="true"] .weekly-narrative-card.glass-card {
  margin: 0;
  padding: 26px 0;
}

body[data-modern-portal="true"] .weekly-narrative-card .card-title-row {
  margin-bottom: 14px;
}

body[data-modern-portal="true"] .weekly-narrative-card .card-title-row h2 {
  font-size: 19px;
  font-weight: 600;
}

body[data-modern-portal="true"] .weekly-narrative-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-modern-portal="true"] .weekly-narrative-section {
  min-width: 0;
  padding: 18px 24px 20px 4px;
}

body[data-modern-portal="true"] .weekly-narrative-section:nth-child(even) {
  border-left: 1px solid var(--tn-divider);
  padding-right: 4px;
  padding-left: 24px;
}

body[data-modern-portal="true"] .weekly-narrative-section:nth-child(n + 3) {
  border-top: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"] .weekly-narrative-section h3 {
  margin: 0 0 8px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 600;
}

body[data-modern-portal="true"] .weekly-narrative-section p,
body[data-modern-portal="true"] .tn-site-narrative p {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}

body[data-modern-portal="true"] .analysis-trend-card.glass-card {
  margin: 0;
  padding: 26px 0 20px;
}

body[data-modern-portal="true"] .analysis-trend-card .trend-card-header h2,
body[data-modern-portal="true"] .priority-sites-card .card-title-row h2,
body[data-modern-portal="true"] .drawer-section .trend-card-header h3,
body[data-modern-portal="true"] .drawer-section .section-label-row h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
}

body[data-modern-portal="true"] .trend-range-toggle button,
body[data-modern-portal="true"] .trend-note,
body[data-modern-portal="true"] .source-badge {
  font-weight: 550;
}

body[data-modern-portal="true"] .brief-grid {
  display: block;
}

body[data-modern-portal="true"] .priority-sites-card.glass-card {
  padding: 26px 0 4px;
}

body[data-modern-portal="true"] .priority-sites-card .card-title-row {
  margin-bottom: 14px;
}

body[data-modern-portal="true"] .tn-priority-columns {
  gap: 30px;
}

body[data-modern-portal="true"] .tn-priority-column + .tn-priority-column {
  border-left: 1px solid var(--tn-divider);
  padding-left: 30px;
}

body[data-modern-portal="true"] .tn-priority-column-heading {
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"] .tn-priority-column-heading h3 {
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 500;
}

body[data-modern-portal="true"] .tn-priority-column-heading span {
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 600;
}

body[data-modern-portal="true"] .tn-priority-column-list {
  gap: 0;
}

body[data-modern-portal="true"] .priority-sites-card .site-chip {
  border: 0;
  border-bottom: 1px solid var(--tn-divider);
  border-radius: 0;
  background: transparent;
  padding: 14px 4px;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-modern-portal="true"] .priority-sites-card .site-chip:hover,
body[data-modern-portal="true"] .priority-sites-card .site-chip:focus-visible {
  border-color: rgba(191, 219, 254, 0.3);
  border-radius: 0;
  background: rgba(148, 163, 184, 0.065);
}

body[data-modern-portal="true"] .site-chip-main strong {
  font-size: 15px;
  font-weight: 600;
}

body[data-modern-portal="true"] .site-chip-main .site-chip-meta,
body[data-modern-portal="true"] .site-chip-main .site-chip-reason {
  font-weight: 400;
}

body[data-modern-portal="true"] .site-detail-view > .drawer-section,
body[data-modern-portal="true"] .drawer-body > .drawer-section {
  border: 0;
  border-top: 1px solid var(--tn-divider-strong);
  border-radius: 0;
  background: transparent;
  padding: 26px 0 12px;
  box-shadow: none;
}

body[data-modern-portal="true"] .site-evidence-grid {
  gap: 0;
  border-top: 1px solid var(--tn-divider-strong);
}

body[data-modern-portal="true"] .site-evidence-grid + .site-trend-card {
  margin-top: 0;
}

body[data-modern-portal="true"] .site-evidence-grid > .drawer-section {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 26px 24px 22px 0;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-modern-portal="true"] .site-evidence-grid > .drawer-section + .drawer-section {
  border-left: 1px solid var(--tn-divider);
  padding-right: 0;
  padding-left: 24px;
}

body[data-modern-portal="true"] .site-evidence-grid .section-label-row h3,
body[data-modern-portal="true"] .site-trend-card .trend-card-header h3 {
  font-size: 19px;
  font-weight: 600;
}

body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics {
  gap: 0;
  border-top: 1px solid var(--tn-divider);
  border-bottom: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics .metric-tile,
body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics .metric-emphasis {
  min-height: 132px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 18px;
}

body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics .metric-tile + .metric-tile {
  border-left: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics .metric-tile strong {
  font-weight: 500;
}

body[data-modern-portal="true"] .tn-site-snapshot {
  margin: 0;
  border-top: 0 !important;
  padding: 2px 0 28px !important;
  overflow: visible;
}

body[data-modern-portal="true"] .tn-site-snapshot .section-label-row {
  margin-bottom: 14px;
}

body[data-modern-portal="true"] .tn-snapshot-metrics {
  gap: 0;
  border-top: 1px solid var(--tn-divider-strong);
  border-bottom: 1px solid var(--tn-divider-strong);
}

body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile,
body[data-modern-portal="true"] .tn-snapshot-metrics .metric-emphasis {
  min-height: 148px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 20px 24px;
}

body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile + .metric-tile {
  border-left: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
}

body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile strong {
  margin-top: 10px;
  color: var(--text);
  font-size: 42px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 0.96;
}

body[data-modern-portal="true"] .tn-snapshot-metrics .tn-tier-value,
body[data-modern-portal="true"] .tn-snapshot-metrics .tn-confidence-value {
  font-size: 34px;
  line-height: 1.02;
}

body[data-modern-portal="true"] .tn-site-tier-1 .tn-tier-value {
  color: #fda4af;
}

body[data-modern-portal="true"] .tn-site-tier-2 .tn-tier-value {
  color: #fcd34d;
}

body[data-modern-portal="true"] .tn-site-tier-3 .tn-tier-value {
  color: #93c5fd;
}

body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile em {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

body[data-modern-portal="true"] .confidence-rationale {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  margin-top: 16px;
  border: 0;
  padding: 0 4px;
}

body[data-modern-portal="true"] .confidence-rationale strong {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

body[data-modern-portal="true"] .confidence-rationale p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

body[data-modern-portal="true"] .tn-chart-card {
  margin: 0;
}

body[data-modern-portal="true"] .tn-chart-card .trend-card-header {
  margin-bottom: 4px;
}

body[data-modern-portal="true"] .tn-site-chart {
  height: 330px;
  min-height: 330px;
}

body[data-modern-portal="true"] .tn-chart-footnote {
  color: var(--muted);
  font-weight: 400;
}

body[data-modern-portal="true"] .tn-overdose-relationship {
  margin: 0;
}

body[data-modern-portal="true"] .tn-relationship-header {
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  grid-template-rows: auto auto;
  align-items: end;
}

body[data-modern-portal="true"] .tn-relationship-picker {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: end;
  max-width: min(460px, 100%);
}

body[data-modern-portal="true"] .tn-relationship-note {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  align-self: start;
  text-align: left;
  margin-top: 2px;
  font-size: 12px;
}

body[data-modern-portal="true"] .tn-relationship-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

body[data-modern-portal="true"] .tn-relationship-grid > div {
  min-width: 0;
  padding: 5px 24px 6px 2px;
}

body[data-modern-portal="true"] .tn-relationship-grid > div + div {
  border-left: 1px solid var(--tn-divider);
  padding-left: 24px;
}

body[data-modern-portal="true"] .tn-relationship-grid span,
body[data-modern-portal="true"] .tn-context-grid > div > span {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 600;
}

body[data-modern-portal="true"] .tn-relationship-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.1;
}

body[data-modern-portal="true"] .tn-relationship-grid strong.is-unavailable {
  color: var(--muted);
  font-size: 13px;
  line-height: 37px;
}

body[data-modern-portal="true"] .tn-relationship-empty {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 4px 2px;
}

body[data-modern-portal="true"] .tn-relationship-empty strong,
body[data-modern-portal="true"] .tn-relationship-empty span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

body[data-modern-portal="true"] .tn-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

body[data-modern-portal="true"] .tn-context-grid > div {
  padding: 4px 24px 4px 2px;
}

body[data-modern-portal="true"] .tn-context-grid > div + div {
  border-left: 1px solid var(--tn-divider);
  padding-right: 2px;
  padding-left: 24px;
}

body[data-modern-portal="true"] .tn-context-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 24px;
  font-weight: 500;
}

body[data-modern-portal="true"] .tn-context-grid p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

body[data-modern-portal="true"] .tn-site-details-card {
  margin: 0;
}

body[data-modern-portal="true"] .tn-site-details {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-modern-portal="true"] .tn-site-details div {
  padding: 14px 18px 14px 0;
}

body[data-modern-portal="true"] .tn-site-details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
}

body[data-modern-portal="true"] .tn-site-details dd {
  margin-top: 5px;
  font-size: 15px;
  font-weight: 400;
}

@media (max-width: 820px) {
  .topbar {
    top: max(10px, calc(var(--stable-safe-top) + 10px));
    width: calc(100vw - 20px);
    border-radius: 22px;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    transition:
      transform 280ms cubic-bezier(0.2, 0.78, 0.2, 1),
      opacity 220ms ease;
    will-change: transform, opacity;
  }

  .tn-statewide-map-legend {
    top: var(--tn-statewide-legend-top, calc(var(--stable-safe-top) + 132px));
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    transform: translateX(-50%);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    transition:
      transform 280ms cubic-bezier(0.2, 0.78, 0.2, 1),
      opacity 220ms ease,
      visibility 0s linear 0s;
    will-change: transform, opacity;
  }

  .tn-statewide-map-legend::-webkit-scrollbar {
    display: none;
  }

  .tn-statewide-map-legend-track {
    min-width: max-content;
    justify-content: center;
    margin: 0 auto;
    padding-inline: 16px;
  }

  body.this-week-site-selected .tn-statewide-map-legend,
  body.activity-map-mode .tn-statewide-map-legend,
  body.panel-dimmed .tn-statewide-map-legend,
  body.panel-reporting .tn-statewide-map-legend {
    transform: translate(-50%, -5px);
  }

  body.mobile-analysis-chrome-hidden .topbar {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -240px);
  }

  body.mobile-analysis-chrome-hidden .tn-statewide-map-legend {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, -240px);
    transition:
      transform 280ms cubic-bezier(0.2, 0.78, 0.2, 1),
      opacity 220ms ease,
      visibility 0s linear 280ms;
  }

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

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

  .brand-block strong span {
    display: block;
  }

  .brand-block strong span + span {
    margin-left: 0;
    margin-top: 2px;
  }

  body[data-modern-portal="true"] .brand-block strong {
    display: inline-flex;
    gap: 4px;
    font-size: 16px;
    white-space: nowrap;
  }

  body[data-modern-portal="true"] .brand-block strong span {
    display: inline;
  }

  body[data-modern-portal="true"] .brand-block strong span + span {
    margin: 0;
  }

  .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: calc(134px + var(--safe-top));
    padding-bottom: 108px;
  }

  .activity-timeline {
    top: auto;
    bottom: calc(84px + var(--pwa-bottom-lift));
    width: calc(100vw - 20px);
    height: 138px;
    border-radius: 20px;
    padding: 9px 12px 10px 16px;
  }

  .activity-control-row {
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 2px 2px 0;
    scrollbar-width: none;
  }

  .activity-control-row::-webkit-scrollbar {
    display: none;
  }

  .activity-control-row > .info-dot {
    flex: 0 0 auto;
    margin-left: 0;
    margin-right: 2px;
  }

  .activity-mode-toggle,
  .activity-range-mode-toggle {
    flex: 0 0 auto;
  }

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

  .timeline-control {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 12px;
    padding-left: 4px;
  }

  .timeline-slider-wrap {
    grid-column: 1;
    min-width: 0;
    margin-right: 4px;
  }

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

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

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

  .timeline-tick.is-labeled .timeline-tick-label {
    display: block;
  }

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

  .activity-range-caption {
    top: auto;
    bottom: calc(228px + var(--pwa-bottom-lift));
    width: calc(100vw - 28px);
    font-size: 11px;
  }

  .activity-analyte-shell {
    left: 0;
    right: 0;
    top: calc(122px + var(--safe-top));
    bottom: auto;
    width: auto;
    transform: none;
    justify-items: stretch;
  }

  .activity-analyte-shell::before,
  .activity-analyte-shell::after {
    content: none;
  }

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

  .activity-analytes {
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    width: 100%;
    padding: 0 20px 2px;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    touch-action: pan-x;
    mask-image: none;
    -webkit-mask-image: 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: var(--family-menu-left, 50%);
    top: var(--family-menu-top, 200px);
    bottom: auto;
    width: min(260px, calc(100vw - 32px));
  }

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

  .site-map-heading {
    top: calc(134px + var(--safe-top));
  }

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

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

  .portal-panel[data-panel="this-week"] .detail-sheet {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: max(0px, calc(100vh - 354px));
    margin-top: max(0px, calc(100svh - 354px));
    transition:
      background 180ms ease,
      border-color 180ms ease,
      transform 180ms ease,
      width 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
      max-width 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
      margin-left 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
      margin-right 240ms cubic-bezier(0.2, 0.8, 0.2, 1),
      border-radius 240ms ease;
  }

  .analysis-card-header {
    gap: 10px;
    margin-bottom: 14px;
  }

  .analysis-card-title-stack {
    gap: 8px;
  }

  .analysis-card-header h2 {
    font-size: 22px;
  }

  .analysis-card-date {
    max-width: 42%;
    padding-top: 4px;
    font-size: 11px;
  }

  body.this-week-site-selected:not(.this-week-map-unlocked) .portal-panel[data-panel="this-week"] .detail-sheet.site-mode {
    margin-top: max(0px, calc(100vh - 354px));
    margin-top: max(0px, calc(100svh - 354px));
  }

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

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

  h1 {
    font-size: 38px;
  }

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

  .brief-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "priority"
      "narrative";
  }

  body[data-modern-portal="true"] .brief-grid {
    grid-template-areas: "priority";
  }

  body[data-modern-portal="true"] .summary-grid,
  .tn-priority-columns {
    grid-template-columns: 1fr;
  }

  .trend-card-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    justify-items: stretch;
    align-items: center;
    gap: 7px 10px;
  }

  .trend-card-header h2,
  .trend-card-header h3 {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .trend-card-header > .muted {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    text-align: right;
    white-space: nowrap;
  }

  .trend-note {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
    align-self: center;
    text-align: center;
    margin-top: 0;
    white-space: nowrap;
  }

  .trend-range-toggle {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
    margin-top: 4px;
  }

  .analysis-trend-chart {
    width: calc(100% + 32px);
    height: 240px;
    min-height: 240px;
    margin-left: -16px;
    margin-right: -16px;
  }

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

  .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;
  }

  .tn-snapshot-metrics,
  .tn-site-details {
    grid-template-columns: 1fr;
  }

  .tn-analyte-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }

  .tn-analyte-header h3 {
    grid-column: 1;
    grid-row: 1;
  }

  .tn-analyte-header .tn-analyte-picker {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .tn-analyte-header .tn-analyte-picker select {
    width: 100%;
    max-width: none;
  }

  .tn-analyte-header > .muted {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: start;
    text-align: left;
    white-space: normal;
  }

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

  .sheet-trend-chart {
    width: calc(100% + 10px);
    height: 292px;
    min-height: 292px;
    margin-left: -10px;
    margin-right: 0;
  }

  .filter-bar {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

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

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

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

  .review-card {
    padding: 14px;
  }

  .reporting-card {
    padding: 14px;
  }

  .users-card {
    padding: 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .reporting-card-header,
  .users-card-header,
  .report-section-heading,
  .report-row-head,
  .report-job-head {
    align-items: flex-start;
  }

  .report-builder-grid,
  .unit-add-grid,
  .report-template-grid,
  .report-row-controls,
  .users-layout,
  .users-form-grid,
  .users-meta-grid,
  .users-program-row {
    grid-template-columns: 1fr;
  }

  .users-layout {
    overflow: visible;
  }

  .users-list {
    max-height: none;
    overflow: visible;
  }

  .users-editor {
    overflow: visible;
  }

  .report-section {
    padding: 12px;
  }

  .report-section-heading,
  .report-row-head,
  .report-job-head,
  .report-submit-row,
  .users-card-header,
  .users-toolbar,
  .users-section-heading {
    flex-direction: column;
  }

  .report-action-button,
  .report-small-button,
  .report-create-button,
  .report-delete-button,
  .report-download-button {
    width: 100%;
  }

  .users-header-actions,
  .users-form-actions,
  .users-status-field {
    width: 100%;
  }

  .users-header-actions,
  .users-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .users-header-actions {
    grid-template-columns: 1fr 1fr;
  }

  .users-search-field {
    width: 100%;
  }

  .users-row {
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr);
  }

  .users-row-meta {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
  }

  .users-editor-heading,
  .users-program-check,
  .users-default-radio {
    align-items: flex-start;
  }

  .users-program-row {
    padding: 12px;
  }

  .users-program-role {
    width: 100%;
  }

  .users-default-radio {
    min-height: 38px;
  }

  .report-job-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-template-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .report-analyte-grid {
    max-height: 136px;
    overflow: auto;
  }

  .reporting-scroll {
    overscroll-behavior: contain;
  }

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

  .review-filter {
    flex: 0 0 auto;
  }

  .review-filter select {
    width: auto;
    min-width: 106px;
    max-width: 132px;
    min-height: 34px;
    padding: 0 28px 0 11px;
    font-size: 11px;
  }

  .bottom-dock {
    width: auto;
    max-width: calc(100vw - 22px);
    bottom: max(
      calc(var(--visual-bottom-inset) + 12px + var(--pwa-bottom-lift)),
      calc(var(--visual-bottom-inset) + var(--safe-bottom) + 12px + var(--pwa-bottom-lift))
    );
    justify-content: center;
    gap: 4px;
    padding: 7px;
    border-radius: 999px;
  }

  .dock-button {
    width: auto;
    min-width: 54px;
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0 10px;
    gap: 0;
    font-size: 12px;
  }

  .dock-icon {
    width: 16px;
    height: 16px;
  }

  .dock-button-label {
    display: none;
  }

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

  .trend-chart {
    width: calc(100% + 10px);
    height: 306px;
    min-height: 306px;
    margin-left: -10px;
    margin-right: 0;
  }

  .site-chip {
    grid-template-columns: auto minmax(0, 1fr) 34px;
    align-items: center;
    min-height: 66px;
    padding: 10px 11px;
    gap: 10px;
  }

  .site-chip-status {
    grid-column: 1;
    grid-row: 1;
  }

  .site-chip-main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .site-chip-main strong,
  .site-chip-main .site-chip-meta {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .site-chip-reason {
    display: none !important;
  }

  .site-chip .review-arrow {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }

  .review-row {
    grid-template-columns: auto minmax(0, 1fr) 34px;
    align-items: center;
    min-height: 82px;
    height: 82px;
    padding: 10px 11px;
    gap: 10px;
  }

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

  .review-main {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    min-width: 0;
  }

  .review-main strong {
    min-height: calc(1.2em * 2);
    overflow: hidden;
    display: -webkit-box;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
  }

  .review-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .review-detail {
    display: none;
  }

  .review-arrow {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }

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

  .card-title-row {
    align-items: center;
  }

  .card-title-row h2 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }

  .card-title-row > .muted,
  .section-label-row > span {
    margin-left: auto;
    max-width: 42%;
    text-align: right;
    align-self: center;
  }

  .section-label-row h3 .info-dot {
    flex: 0 0 auto;
  }

  .brief-grid .card-title-row h2 {
    flex: 1 1 auto;
    white-space: nowrap;
  }

  .brief-grid .card-title-row > .muted {
    max-width: 34%;
  }
}

/* Keep the legacy login rules above from overriding the new light surface. */
html[data-theme="light"] .action-login-card,
html[data-theme="light"] .action-login-card.compact {
  border-color: rgba(75, 91, 111, 0.22);
  color: var(--auth-text);
  background: #fff;
  box-shadow: 0 18px 42px rgba(35, 48, 64, 0.14);
  backdrop-filter: none;
}

html[data-theme="light"] .action-login-copy h1 { color: var(--auth-text); }
html[data-theme="light"] .action-login-copy p,
html[data-theme="light"] .action-login-form label { color: var(--auth-muted); }
html[data-theme="light"] .action-login-form input,
html[data-theme="light"] .action-login-form input[readonly] {
  border-color: rgba(75, 91, 111, 0.24);
  color: var(--auth-text);
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .action-login-form input:focus {
  border-color: rgba(22, 119, 216, 0.72);
  box-shadow: 0 0 0 4px rgba(22, 119, 216, 0.12);
}

html[data-theme="light"] .action-login-link { color: #176bb9; }
html[data-theme="light"] .action-login-secondary {
  border-color: rgba(75, 91, 111, 0.26);
  color: var(--auth-text);
  background: #fff;
}

@media (max-width: 430px) {
  body[data-modern-portal="true"] .brand-block strong {
    font-size: 15px;
  }

  .bottom-dock {
    padding: 6px;
  }

  .dock-button {
    width: auto;
    min-width: 52px;
    min-height: 40px;
    flex-basis: auto;
    padding: 0 9px;
  }
}

@media (max-width: 340px) {
  body[data-modern-portal="true"] .logout-button {
    width: 38px;
    min-width: 38px;
    padding-inline: 0;
  }

  body[data-modern-portal="true"] .logout-button span {
    display: none;
  }
}

@media (max-width: 719px) {
  .portal-panel[data-panel="this-week"] .analysis-back-button {
    left: max(0px, calc((100% - (100vw - 36px)) / 2));
  }

  .portal-panel[data-panel="this-week"] .sheet-map-lock-button {
    right: max(0px, calc((100% - (100vw - 36px)) / 2));
  }

  body.mobile-sheet-expanded .portal-panel[data-panel="this-week"] .detail-sheet {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border-radius: 28px 28px 0 0;
  }
}

/* Identity and account surfaces */
.action-login-page {
  --auth-bg: #0f1729;
  --auth-card: rgba(8, 18, 32, 0.78);
  --auth-border: rgba(180, 211, 232, 0.2);
  --auth-text: #f4f7fb;
  --auth-muted: #9eacbf;
  --auth-field: rgba(4, 12, 24, 0.7);
  --auth-blue: #3b9cff;
  margin: 0;
  color: var(--auth-text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--auth-bg);
}

html[data-theme="light"] .action-login-page {
  --auth-bg: #eceff3;
  --auth-card: #ffffff;
  --auth-border: rgba(75, 91, 111, 0.25);
  --auth-text: #172033;
  --auth-muted: #667085;
  --auth-field: #f8fafc;
}

.action-orbit-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--auth-bg);
}

.action-orbit-field,
.action-orbit-field svg {
  width: 100%;
  height: 100%;
}

.action-orbit-field .action-orbit-track {
  fill: none;
  stroke: rgba(92, 172, 255, 0.17);
  stroke-width: 1;
}

.action-orbit-field circle {
  fill: rgba(111, 190, 255, 0.68);
  filter: drop-shadow(0 0 7px rgba(59, 156, 255, 0.5));
}

html[data-theme="light"] .action-orbit-field .action-orbit-track { stroke: rgba(33, 93, 154, 0.19); }
html[data-theme="light"] .action-orbit-field circle { fill: rgba(33, 111, 190, 0.62); }

.action-login-shell {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  box-sizing: border-box;
  padding: max(22px, env(safe-area-inset-top)) 18px max(22px, env(safe-area-inset-bottom));
}

.action-login-container {
  width: min(382px, calc(100vw - 32px));
}

.action-login-wordmark {
  display: grid;
  justify-items: center;
  gap: 4px;
  margin: 0 0 22px;
  line-height: 1;
  letter-spacing: 0;
}

.action-login-wordmark span,
.account-wordmark span {
  color: var(--auth-blue, #3b9cff);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 25px;
  font-weight: 800;
}

.action-login-wordmark strong,
.account-wordmark strong {
  color: var(--auth-text, #f4f7fb);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.action-login-card,
.action-login-card.compact {
  width: 100%;
  box-sizing: border-box;
  padding: 30px 28px 26px;
  border: 1px solid var(--auth-border);
  border-radius: 22px;
  color: var(--auth-text);
  background: var(--auth-card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.18);
}

html[data-theme="light"] .action-login-card { box-shadow: 0 18px 38px rgba(35, 48, 64, 0.12); backdrop-filter: none; }

.action-login-copy { margin: 0 0 22px; }
.action-login-copy h1 { margin: 0 0 8px; color: var(--auth-text); font-size: 25px; font-weight: 620; line-height: 1.15; }
.action-login-copy p { margin: 0; color: var(--auth-muted); font-size: 14px; line-height: 1.45; }
.action-login-form { display: grid; gap: 9px; }
.action-login-form label { color: var(--auth-muted); font-size: 12px; font-weight: 650; text-transform: none; }
.action-login-form input {
  width: 100%; min-height: 45px; box-sizing: border-box; margin: 0 0 6px; padding: 0 13px;
  border: 1px solid var(--auth-border); border-radius: 10px; color: var(--auth-text); background: var(--auth-field); font: inherit; font-size: 15px;
}
.action-login-form input:focus { border-color: rgba(59, 156, 255, 0.82); box-shadow: 0 0 0 3px rgba(59, 156, 255, 0.14); outline: 0; }
.action-login-form .action-code-input { text-align: center; font-size: 24px; letter-spacing: 0.28em; font-variant-numeric: tabular-nums; }
.action-login-actions { display: grid; gap: 9px; margin-top: 8px; }
.action-login-submit,
.action-login-secondary {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; box-sizing: border-box; padding: 0 18px;
  border: 1px solid rgba(117, 190, 255, 0.42); border-radius: 10px; color: #fff; font: inherit; font-size: 14px; font-weight: 650; text-decoration: none; cursor: pointer;
}
.action-login-submit { margin: 0; background: #1677d8; box-shadow: 0 9px 24px rgba(10, 92, 175, 0.23); }
.action-login-secondary { background: transparent; color: var(--auth-text); border-color: var(--auth-border); }
.action-login-submit:hover, .action-login-submit:focus-visible { background: #2589ea; }
.action-login-secondary:hover, .action-login-secondary:focus-visible { border-color: #3b9cff; background: rgba(59, 156, 255, 0.08); }
.action-login-link { width: fit-content; margin: 1px 0 0; color: #65b2ff; font-size: 13px; font-weight: 550; }
.action-inline-form { display: inline-block; margin-right: 16px; }
.action-link-button { border: 0; padding: 0; background: none; cursor: pointer; }
.action-signout-form { display: inline; margin: 0; }
.action-signout-button { border: 0; padding: 0; color: inherit; background: none; font: inherit; cursor: pointer; }
.action-login-alert { margin: 0 0 16px; border-radius: 10px; }
.action-login-button-link { width: 100%; }
.action-auth-theme { display: block; margin: 16px auto 0; border: 0; color: var(--auth-muted); background: none; font: inherit; font-size: 12px; cursor: pointer; }

.account-page {
  --account-bg: #0a1321;
  --account-text: #eef4fb;
  --account-muted: #94a3b8;
  --account-line: rgba(148, 163, 184, 0.2);
  --account-field: #101d2d;
  min-height: 100dvh;
  margin: 0;
  color: var(--account-text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: var(--account-bg);
}
html[data-theme="light"] .account-page { --account-bg: #f3f5f8; --account-text: #172033; --account-muted: #667085; --account-line: #d5dbe4; --account-field: #fff; }
.account-page-header { display: flex; width: min(1080px, calc(100% - 40px)); min-height: 72px; align-items: center; justify-content: space-between; margin: 0 auto; border-bottom: 1px solid var(--account-line); }
.account-wordmark { display: flex; align-items: baseline; gap: 9px; color: inherit; text-decoration: none; }
.account-wordmark span { font-size: 17px; }
.account-wordmark strong { font-size: 11px; }
.account-page-header nav { display: flex; gap: 18px; }
.account-page-header nav a,
.account-page-header nav .action-signout-button { color: var(--account-muted); font-size: 13px; text-decoration: none; }
.account-page-main { width: min(940px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 90px; }
.account-page-title { padding-bottom: 30px; border-bottom: 1px solid var(--account-line); }
.account-page-title p { margin: 0 0 8px; color: #3b9cff; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.account-page-title h1 { margin: 0; font-size: 34px; font-weight: 560; }
.account-section { display: grid; grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr); gap: 52px; padding: 32px 0; border-bottom: 1px solid var(--account-line); }
.account-section h2 { margin: 0 0 6px; font-size: 18px; font-weight: 620; }
.account-section p { margin: 0; color: var(--account-muted); font-size: 13px; line-height: 1.5; }
.account-form { display: grid; gap: 14px; }
.account-form label, .account-dialog label { display: grid; gap: 6px; color: var(--account-muted); font-size: 12px; font-weight: 650; }
.account-form input, .account-dialog input { min-height: 42px; box-sizing: border-box; padding: 0 12px; border: 1px solid var(--account-line); border-radius: 8px; color: var(--account-text); background: var(--account-field); font: inherit; }
.account-form input:disabled { opacity: 0.76; }
.account-form button, .account-section > div > button, .account-dialog-actions button { width: fit-content; min-height: 40px; padding: 0 15px; border: 1px solid #399bf7; border-radius: 8px; color: #fff; background: #1677d8; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.account-programs { display: flex; flex-wrap: wrap; gap: 8px; }
.account-programs span { padding: 7px 10px; border-left: 2px solid #3b9cff; color: var(--account-text); background: rgba(59, 156, 255, 0.08); font-size: 13px; }
.account-security-status { display: grid; gap: 4px; }
.account-security-status strong { color: #55b1ff; font-size: 18px; }
.account-security-status span { color: var(--account-muted); font-size: 13px; }
.account-passkeys { margin-bottom: 14px; }
.account-passkey { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--account-line); }
.account-passkey span { display: grid; gap: 3px; }
.account-passkey small { color: var(--account-muted); }
.account-passkey button { border: 0; color: #f87171; background: none; cursor: pointer; }
.account-notice { margin: 20px 0 0; padding: 11px 0; border-bottom: 1px solid rgba(52, 211, 153, 0.45); color: #6ee7b7; }
.account-notice.error { border-color: rgba(248, 113, 113, 0.5); color: #fca5a5; }
.account-dialog { width: min(430px, calc(100% - 32px)); box-sizing: border-box; padding: 25px; border: 1px solid var(--account-line); border-radius: 12px; color: var(--account-text); background: var(--account-bg); }
.account-dialog::backdrop { background: rgba(1, 6, 14, 0.7); backdrop-filter: blur(7px); }
.account-dialog h2 { margin: 0 0 6px; font-size: 20px; }
.account-dialog p { margin: 0 0 20px; color: var(--account-muted); }
.account-dialog label { margin-bottom: 15px; }
.account-dialog-close { float: right; border: 0; color: var(--account-muted); background: none; font-size: 24px; cursor: pointer; }
.account-dialog-actions { display: flex; gap: 9px; }
.account-dialog-actions button.secondary { border-color: var(--account-line); color: var(--account-text); background: transparent; }

@media (max-width: 680px) {
  .action-login-container { width: min(342px, calc(100vw - 32px)); }
  .action-login-card, .action-login-card.compact { padding: 27px 22px 23px; }
  .action-orbit-field { width: 150%; margin-left: -25%; }
  .account-page-header { width: calc(100% - 28px); }
  .account-page-header nav { gap: 11px; }
  .account-page-main { width: calc(100% - 32px); padding-top: 36px; }
  .account-page-title h1 { font-size: 29px; }
  .account-section { grid-template-columns: 1fr; gap: 18px; padding: 26px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .action-orbit-field { opacity: 0.7; }
}

.action-environment-badge {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 10000;
  padding: 6px 10px;
  border: 1px solid rgba(125, 185, 244, 0.34);
  border-radius: 999px;
  background: rgba(8, 20, 36, 0.92);
  color: rgba(194, 224, 250, 0.9);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
  pointer-events: none;
}

.topbar-account-menu { position: relative; }
.topbar-account-menu summary { list-style: none; }
.topbar-account-menu summary::-webkit-details-marker { display: none; }
.topbar-account-popover {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 80; width: 220px; overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28); border-radius: 12px; background: #0c1727; box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
}
.topbar-account-popover > div { display: grid; gap: 4px; padding: 13px 14px; border-bottom: 1px solid rgba(148, 163, 184, 0.18); }
.topbar-account-popover > div strong { overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-account-popover > div span { color: var(--muted); font-size: 11px; }
.topbar-account-popover a,
.topbar-account-popover .action-signout-button { display: flex; width: 100%; min-height: 40px; align-items: center; box-sizing: border-box; padding: 0 14px; color: var(--muted-strong); font-size: 12px; text-align: left; text-decoration: none; }
.topbar-account-popover a:hover,
.topbar-account-popover .action-signout-button:hover { color: var(--text); background: rgba(148, 163, 184, 0.09); }

body[data-modern-portal="true"].panel-users .users-toolbar { display: grid; grid-template-columns: minmax(210px, 1.7fr) repeat(4, minmax(120px, 0.7fr)); align-items: end; }
body[data-modern-portal="true"].panel-users .users-status-field { width: auto; }
body[data-modern-portal="true"].panel-users .users-layout { display: block; }
body[data-modern-portal="true"].panel-users .users-directory { width: 100%; }
body[data-modern-portal="true"].panel-users .users-column-head,
body[data-modern-portal="true"].panel-users .users-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.6fr) minmax(140px, 1fr) 88px 88px minmax(110px, 0.8fr) 105px;
  align-items: center;
  gap: 14px;
}
body[data-modern-portal="true"].panel-users .users-column-head { min-height: 40px; padding: 0 4px; border-bottom: 1px solid var(--tn-divider-strong); color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
body[data-modern-portal="true"].panel-users .users-row { min-height: 66px; }
body[data-modern-portal="true"].panel-users .users-row > span { min-width: 0; overflow: hidden; color: var(--muted-strong); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body[data-modern-portal="true"].panel-users .users-row-main { display: grid; }
body[data-modern-portal="true"].panel-users .users-status-pill { width: fit-content; }
body[data-modern-portal="true"].panel-users .users-profile-label { color: #89c3ff; font-weight: 650; }
body[data-modern-portal="true"].panel-users .users-load-more { display: block; margin: 18px auto 0; }
body[data-modern-portal="true"].panel-users .users-load-more[hidden] { display: none; }
body[data-modern-portal="true"].panel-users .users-editor {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 220; width: min(560px, 100vw); overflow: auto; box-sizing: border-box;
  padding: 34px 30px 60px; border: 0; border-left: 1px solid var(--tn-divider-strong); background: #0b1422; box-shadow: -24px 0 70px rgba(0, 0, 0, 0.38);
  opacity: 0; visibility: hidden; transform: translateX(100%); transition: transform 220ms ease, opacity 180ms ease, visibility 180ms ease;
}
body[data-modern-portal="true"].panel-users .users-editor.open { opacity: 1; visibility: visible; transform: translateX(0); }
body[data-modern-portal="true"].panel-users .users-editor-close { border: 0; color: var(--muted); background: none; font-size: 27px; line-height: 1; cursor: pointer; }
body[data-modern-portal="true"].panel-users .users-form-grid { grid-template-columns: 1fr 1fr; }
body[data-modern-portal="true"].panel-users .users-meta-grid { grid-template-columns: repeat(3, 1fr); }
body[data-modern-portal="true"].panel-users .users-program-row { grid-template-columns: minmax(0, 1fr) auto; }

@media (max-width: 900px) {
  body[data-modern-portal="true"].panel-users .users-toolbar { grid-template-columns: 1fr 1fr; }
  body[data-modern-portal="true"].panel-users .users-search-field { grid-column: 1 / -1; }
  body[data-modern-portal="true"].panel-users .users-column-head { display: none; }
  body[data-modern-portal="true"].panel-users .users-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; padding-block: 12px; }
  body[data-modern-portal="true"].panel-users .users-row > span:nth-child(2),
  body[data-modern-portal="true"].panel-users .users-row > span:nth-child(5),
  body[data-modern-portal="true"].panel-users .users-row > span:nth-child(6) { display: none; }
  body[data-modern-portal="true"].panel-users .users-row > span:nth-child(3) { grid-column: 1; }
  body[data-modern-portal="true"].panel-users .users-row > span:nth-child(4) { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 600px) {
  body[data-modern-portal="true"].panel-users .users-toolbar { grid-template-columns: 1fr; }
  body[data-modern-portal="true"].panel-users .users-search-field { grid-column: auto; }
  body[data-modern-portal="true"].panel-users .users-editor { width: 100vw; padding: max(24px, env(safe-area-inset-top)) 18px max(44px, env(safe-area-inset-bottom)); border-left: 0; }
  body[data-modern-portal="true"].panel-users .users-form-grid,
  body[data-modern-portal="true"].panel-users .users-meta-grid { grid-template-columns: 1fr; }
}

@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;
  }

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

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

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

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

html.mobile-zoom-disabled,
html.mobile-zoom-disabled body {
  touch-action: pan-x pan-y;
}

html.mobile-zoom-disabled button,
html.mobile-zoom-disabled a,
html.mobile-zoom-disabled input,
html.mobile-zoom-disabled select,
html.mobile-zoom-disabled textarea {
  touch-action: manipulation;
}

@media (max-width: 1024px) {
  html.mobile-zoom-disabled input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
  html.mobile-zoom-disabled select,
  html.mobile-zoom-disabled textarea {
    font-size: 16px !important;
  }
}

/* Program selection mirrors the login composition without background artwork. */
.action-program-picker-page,
.action-program-picker-page .action-login-shell {
  background: #0f1729;
}

.action-program-picker-page .action-login-copy h2 {
  margin-bottom: 8px;
}

.action-program-picker-page .program-picker-list {
  display: grid;
  gap: 11px;
}

.action-program-picker-page .program-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  width: 100%;
  min-height: 58px;
  padding: 10px 13px;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(148, 163, 184, 0.05));
  color: var(--login-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 9px 24px rgba(2, 8, 23, 0.12);
  text-decoration: none;
  transform: none;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.action-program-picker-page .program-picker-row:hover,
.action-program-picker-page .program-picker-row:focus-visible {
  border-color: rgba(117, 190, 255, 0.5);
  outline: 0;
  background: linear-gradient(180deg, rgba(117, 190, 255, 0.18), rgba(59, 156, 255, 0.075));
  box-shadow: 0 0 0 3px rgba(59, 156, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transform: none;
}

.action-program-picker-page .program-picker-row.disabled {
  grid-template-columns: minmax(0, 1fr);
  opacity: 0.56;
}

.action-program-picker-page .program-picker-row strong,
.action-program-picker-page .program-picker-row small {
  display: block;
}

.action-program-picker-page .program-picker-row strong {
  overflow-wrap: anywhere;
  color: var(--login-text);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
}

.action-program-picker-page .program-picker-row small {
  margin-top: 3px;
  color: var(--login-muted);
  font-size: 12px;
  line-height: 1.3;
  text-transform: none;
}

.action-program-picker-page .program-picker-row svg {
  width: 17px;
  height: 17px;
  justify-self: center;
  color: var(--login-accent-strong);
}

.action-program-picker-page .action-program-signout {
  display: grid;
  margin-top: 18px;
  justify-items: center;
}

.action-program-picker-page .action-program-signout .action-login-link {
  justify-self: center;
}

@media (max-width: 640px) {
  .action-program-picker-page .program-picker-row {
    min-height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .tn-statewide-map-legend,
  .tn-map-legend-item,
  .dock-button,
  .account-card,
  .account-card-view {
    transition: none;
  }

  .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,
  .fallback-overdose-point,
  .google-overdose-point {
    animation: none;
    transition: none;
  }

  .portal-panel {
    animation: none;
  }
}

.action-login-page {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: var(--browser-canvas-color);
  background-image: var(--browser-canvas-bg);
  background-attachment: fixed;
}

.dashboard-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(99, 179, 255, 0.16), transparent 34%),
    rgba(3, 7, 18, 0.38);
  backdrop-filter: blur(18px) saturate(1.25);
  opacity: 1;
  transition: opacity 380ms ease, visibility 380ms ease;
}

.dashboard-loading-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dashboard-loading-card {
  width: min(360px, calc(100vw - 44px));
  padding: 22px;
  border: 1px solid rgba(191, 219, 254, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.045) 44%, rgba(99, 179, 255, 0.12)),
    rgba(8, 16, 30, 0.7);
  color: var(--text);
  text-align: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 28px 80px rgba(2, 8, 23, 0.48);
  backdrop-filter: blur(22px) saturate(1.36);
}

.dashboard-loading-kicker {
  display: block;
  color: var(--admin-logo-blue);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.dashboard-loading-card strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  font-weight: 850;
}

.dashboard-loading-bar {
  position: relative;
  height: 4px;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
}

.dashboard-loading-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(99, 179, 255, 0.25), rgba(99, 179, 255, 0.92), rgba(34, 211, 238, 0.5));
  box-shadow: 0 0 18px rgba(99, 179, 255, 0.58);
  animation: dashboard-loading-scan 840ms ease-in-out infinite alternate;
}

@keyframes dashboard-loading-scan {
  from {
    left: -8%;
  }
  to {
    left: 66%;
  }
}

.action-login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background-color: var(--browser-canvas-color);
  background-image:
    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)),
    var(--browser-canvas-bg);
}

.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: 49px 49px;
  transform: scale(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;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(28px, calc(var(--safe-top) + 18px))
    28px
    max(28px, calc(var(--safe-bottom) + 18px));
}

.action-login-card {
  width: min(442px, 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(442px, 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-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  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 4px;
  font-size: clamp(30px, 6vw, 40px);
  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;
  font-size: 16px;
  font-weight: 400;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.action-login-form input[readonly] {
  color: rgba(248, 250, 252, 0.78);
  background: rgba(4, 10, 20, 0.34);
}

.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 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  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: 400;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 14px 34px rgba(15, 23, 42, 0.38);
  cursor: pointer;
}

.action-login-submit:disabled {
  cursor: default;
  opacity: 0.88;
}

.action-login-spinner-shell {
  display: none;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
}

.action-login-submit.is-loading .action-login-spinner-shell {
  display: inline-flex;
}

.action-login-spinner {
  display: block;
  width: 23px;
  height: 23px;
  overflow: visible;
}

.action-login-spinner-track,
.action-login-spinner-arc {
  fill: none;
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.action-login-spinner-track {
  stroke: rgba(248, 250, 252, 0.26);
}

.action-login-spinner-arc {
  stroke: #f8fafc;
  stroke-linecap: round;
}

.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;
}

.program-picker-list {
  display: grid;
  gap: 10px;
}

.program-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(99, 179, 255, 0.08)),
    rgba(8, 16, 30, 0.56);
  color: var(--text);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.program-picker-row:hover,
.program-picker-row:focus-visible {
  border-color: rgba(99, 179, 255, 0.58);
  background:
    linear-gradient(145deg, rgba(99, 179, 255, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(8, 16, 30, 0.64);
  transform: translateY(-1px);
}

.program-picker-row.disabled {
  grid-template-columns: minmax(0, 1fr);
  opacity: 0.62;
}

.program-picker-row strong,
.program-picker-row small {
  display: block;
}

.program-picker-row strong {
  font-size: 15px;
  font-weight: 750;
}

.program-picker-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}

.program-picker-row svg {
  width: 18px;
  height: 18px;
  justify-self: center;
  color: #bfdbfe;
}

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

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

  .action-login-brand {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 26px;
  }

  .action-login-brand strong {
    padding-top: 2px;
    text-align: right;
  }
}

@media (max-width: 719px) {
  body[data-modern-portal="true"] {
    --tn-sheet-tail: calc(108px + var(--safe-bottom));
  }

  body[data-modern-portal="true"] .detail-sheet {
    background: #07101d;
    backdrop-filter: none;
    border-bottom: 0;
    border-radius: 28px 28px 0 0;
    padding: 18px 16px calc(30px + var(--tn-sheet-tail));
  }

  body[data-modern-portal="true"] .detail-sheet.site-mode {
    background: #07101d;
  }

  body[data-modern-portal="true"] .analysis-card-header h2 {
    font-size: 24px;
  }

  body[data-modern-portal="true"] .summary-grid {
    grid-template-columns: 1fr;
  }

  body[data-modern-portal="true"] .summary-card,
  body[data-modern-portal="true"] .summary-card.summary-alert,
  body[data-modern-portal="true"] .summary-card.summary-review {
    min-height: 0;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 16px;
    padding: 16px 4px;
  }

  body[data-modern-portal="true"] .summary-card + .summary-card {
    border-top: 1px solid var(--tn-divider);
    border-left: 0;
  }

  body[data-modern-portal="true"] .summary-card > span {
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
  }

  body[data-modern-portal="true"] .summary-card strong {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 44px;
    text-align: center;
  }

  body[data-modern-portal="true"] .summary-card p {
    grid-column: 2;
    grid-row: 2;
    margin: 2px 0 0;
    font-size: 12px;
  }

  body[data-modern-portal="true"] .analysis-trend-card.glass-card,
  body[data-modern-portal="true"] .weekly-narrative-card.glass-card,
  body[data-modern-portal="true"] .priority-sites-card.glass-card {
    padding-top: 22px;
  }

  body[data-modern-portal="true"] .weekly-narrative-grid {
    grid-template-columns: 1fr;
  }

  body[data-modern-portal="true"] .weekly-narrative-section,
  body[data-modern-portal="true"] .weekly-narrative-section:nth-child(even) {
    border-left: 0;
    padding: 16px 2px;
  }

  body[data-modern-portal="true"] .weekly-narrative-section + .weekly-narrative-section {
    border-top: 1px solid var(--tn-divider);
  }

  body[data-modern-portal="true"] .tn-priority-columns {
    gap: 22px;
  }

  body[data-modern-portal="true"] .tn-priority-column + .tn-priority-column {
    border-top: 1px solid var(--tn-divider-strong);
    border-left: 0;
    padding-top: 22px;
    padding-left: 0;
  }

  body[data-modern-portal="true"] .tn-priority-column-heading {
    padding-right: 2px;
    padding-left: 2px;
  }

  body[data-modern-portal="true"] .site-evidence-grid > .drawer-section {
    padding: 22px 0;
  }

  body[data-modern-portal="true"] .site-evidence-grid > .drawer-section + .drawer-section {
    border-top: 1px solid var(--tn-divider);
    border-left: 0;
    padding-left: 0;
  }

  body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics .metric-tile,
  body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics .metric-emphasis {
    min-height: 0;
    padding: 15px 4px;
  }

  body[data-modern-portal="true"] .site-evidence-grid .snapshot-metrics .metric-tile + .metric-tile {
    border-top: 1px solid var(--tn-divider);
    border-left: 0;
  }

  body[data-modern-portal="true"] .site-detail-view > .drawer-section,
  body[data-modern-portal="true"] .drawer-body > .drawer-section {
    padding-top: 22px;
  }

  body[data-modern-portal="true"] .tn-snapshot-metrics {
    grid-template-columns: 1fr;
  }

  body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile,
  body[data-modern-portal="true"] .tn-snapshot-metrics .metric-emphasis {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 58%);
    grid-template-rows: auto auto;
    align-items: center;
    padding: 15px 4px;
  }

  body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile + .metric-tile {
    border-top: 1px solid var(--tn-divider);
    border-left: 0;
  }

  body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile span {
    grid-column: 1;
    grid-row: 1;
  }

  body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile strong,
  body[data-modern-portal="true"] .tn-snapshot-metrics .tn-tier-value,
  body[data-modern-portal="true"] .tn-snapshot-metrics .tn-confidence-value {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    font-size: 30px;
    text-align: right;
    overflow-wrap: anywhere;
  }

  body[data-modern-portal="true"] .tn-snapshot-metrics .metric-tile em {
    grid-column: 1;
    grid-row: 2;
    margin-top: 4px;
  }

  body[data-modern-portal="true"] .confidence-rationale {
    grid-template-columns: 1fr;
    gap: 5px;
    padding: 0;
  }

  body[data-modern-portal="true"] .tn-analyte-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body[data-modern-portal="true"] .tn-analyte-picker {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    justify-content: center;
  }

  body[data-modern-portal="true"] .tn-analyte-picker select {
    width: min(240px, 100%);
  }

  body[data-modern-portal="true"] .tn-site-chart {
    height: 300px;
    min-height: 300px;
  }

  body[data-modern-portal="true"] .tn-relationship-header {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  body[data-modern-portal="true"] .tn-relationship-picker {
    grid-column: 1;
    grid-row: 3;
    justify-self: stretch;
    max-width: none;
  }

  body[data-modern-portal="true"] .tn-relationship-note {
    grid-column: 1;
    grid-row: 2;
  }

  body[data-modern-portal="true"] .tn-relationship-picker select {
    width: min(320px, 100%);
  }

  body[data-modern-portal="true"] .tn-relationship-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-modern-portal="true"] .tn-relationship-grid > div {
    padding: 14px 18px 14px 2px;
  }

  body[data-modern-portal="true"] .tn-relationship-grid > div + div {
    padding-left: 18px;
  }

  body[data-modern-portal="true"] .tn-relationship-grid > div:nth-child(3) {
    border-left: 0;
  }

  body[data-modern-portal="true"] .tn-relationship-grid > div:nth-child(n + 3) {
    border-top: 1px solid var(--tn-divider);
  }

  body[data-modern-portal="true"] .tn-context-grid {
    grid-template-columns: 1fr;
  }

  body[data-modern-portal="true"] .tn-context-grid > div,
  body[data-modern-portal="true"] .tn-context-grid > div + div {
    border-left: 0;
    padding: 14px 2px;
  }

  body[data-modern-portal="true"] .tn-context-grid > div + div {
    border-top: 1px solid var(--tn-divider);
  }

  body[data-modern-portal="true"] .tn-site-details {
    grid-template-columns: 1fr;
  }

  body[data-modern-portal="true"] .tn-site-details div {
    padding: 12px 2px;
  }
}

/* Reporting and Users use the same flat, divider-led page language as Analysis. */
body[data-modern-portal="true"].panel-users {
  overflow-y: auto;
  background: #0b1422;
}

body[data-modern-portal="true"].panel-users .map-layer {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

body[data-modern-portal="true"].panel-users .focus-shell {
  min-height: 100dvh;
  padding: 96px 0 112px;
  display: block;
  background: #0b1422;
}

body[data-modern-portal="true"].panel-users .portal-panel[data-panel="users"] {
  position: relative;
  inset: auto;
  width: 100%;
  min-height: calc(100dvh - 208px);
  transform: none;
  padding: 0 clamp(18px, 4vw, 56px);
}

body[data-modern-portal="true"].panel-users .users-card {
  width: min(1060px, 100%);
  height: auto;
  min-height: 0;
  margin: 0 auto;
  padding: 20px 0 40px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body[data-modern-portal="true"].panel-reporting .reporting-card-header,
body[data-modern-portal="true"].panel-users .users-card-header {
  min-height: 68px;
  margin: 0;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--tn-divider-strong);
}

body[data-modern-portal="true"].panel-reporting .reporting-title-group h2,
body[data-modern-portal="true"].panel-users .users-title-group h2 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  line-height: 1.05;
}

body[data-modern-portal="true"].panel-reporting .reporting-scroll {
  gap: 0;
}

body[data-modern-portal="true"].panel-reporting .reporting-scroll > .report-builder-grid {
  padding: 20px 0;
  border-bottom: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"].panel-reporting .report-section {
  gap: 18px;
  padding: 28px 0;
  border: 0;
  border-bottom: 1px solid var(--tn-divider-strong);
  border-radius: 0;
  background: transparent;
}

body[data-modern-portal="true"].panel-reporting .report-section h3,
body[data-modern-portal="true"].panel-users .users-section-heading h4 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

body[data-modern-portal="true"].panel-reporting .report-row-stack,
body[data-modern-portal="true"].panel-reporting .report-job-list {
  gap: 0;
  border-top: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"].panel-reporting .report-builder-row,
body[data-modern-portal="true"].panel-reporting .report-job-row,
body[data-modern-portal="true"].panel-reporting .report-empty {
  border: 0;
  border-bottom: 1px solid var(--tn-divider);
  border-radius: 0;
  background: transparent;
  padding: 15px 2px;
}

body[data-modern-portal="true"].panel-reporting .report-submit-row {
  padding: 24px 0;
  border-bottom: 1px solid var(--tn-divider-strong);
}

body[data-modern-portal="true"].panel-users .users-toolbar {
  margin: 0;
  padding: 20px 0;
  border-bottom: 1px solid var(--tn-divider-strong);
}

body[data-modern-portal="true"].panel-users .users-layout {
  gap: 0;
}

body[data-modern-portal="true"].panel-users .users-list {
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body[data-modern-portal="true"].panel-users .users-list {
  gap: 0;
  padding: 0 28px 40px 0;
}

body[data-modern-portal="true"].panel-users .users-editor {
  position: fixed;
  top: 92px;
  right: 18px;
  bottom: 92px;
  width: min(560px, calc(100vw - 36px));
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 28px 28px 40px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 16px;
  background: #0b1422;
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.38), 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: none;
}

body[data-modern-portal="true"].panel-users .users-row {
  min-height: 74px;
  border: 0;
  border-bottom: 1px solid var(--tn-divider);
  border-radius: 0;
  background: transparent;
  padding: 13px 4px;
}

body[data-modern-portal="true"].panel-users .users-row:hover,
body[data-modern-portal="true"].panel-users .users-row:focus-visible,
body[data-modern-portal="true"].panel-users .users-row.selected {
  border-color: rgba(147, 197, 253, 0.34);
  border-radius: 0;
  background: rgba(148, 163, 184, 0.075);
}

body[data-modern-portal="true"].panel-users .users-editor-form {
  gap: 22px;
}

body[data-modern-portal="true"].panel-users .users-security-section {
  padding-top: 18px;
  border-top: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"].panel-users .users-meta-grid {
  gap: 0;
  border-top: 1px solid var(--tn-divider);
  border-bottom: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"].panel-users .users-meta-grid span {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 14px 16px;
}

body[data-modern-portal="true"].panel-users .users-meta-grid span + span {
  border-left: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"].panel-users .users-program-section {
  gap: 14px;
  padding-top: 4px;
}

body[data-modern-portal="true"].panel-users .users-program-list {
  gap: 0;
  border-top: 1px solid var(--tn-divider);
}

body[data-modern-portal="true"].panel-users .users-program-row {
  border: 0;
  border-bottom: 1px solid var(--tn-divider);
  border-radius: 0;
  background: transparent;
  padding: 14px 2px;
}

body[data-modern-portal="true"].panel-users .users-empty {
  border: 0;
  border-radius: 0;
  background: transparent;
}

@media (max-width: 820px) {
  body[data-modern-portal="true"].panel-reporting .focus-shell,
  body[data-modern-portal="true"].panel-users .focus-shell {
    padding-top: 156px;
  }

  body[data-modern-portal="true"].panel-reporting .portal-panel[data-panel="reporting"],
  body[data-modern-portal="true"].panel-users .portal-panel[data-panel="users"] {
    padding-inline: 16px;
  }

  body[data-modern-portal="true"].panel-users .users-list {
    padding: 0 0 24px;
  }

  body[data-modern-portal="true"].panel-users .users-status-field {
    flex: 0 0 auto;
  }

  body[data-modern-portal="true"].panel-users .users-editor {
    top: calc(var(--stable-safe-top) + 128px);
    right: 12px;
    bottom: max(78px, calc(var(--visual-bottom-inset) + var(--safe-bottom) + var(--pwa-bottom-lift) + 78px));
    width: calc(100vw - 24px);
    padding: max(22px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 14px;
  }

  body[data-modern-portal="true"].panel-users .users-meta-grid span + span {
    border-top: 1px solid var(--tn-divider);
    border-left: 0;
  }
}

/* Keystone-parity Action Portal authentication */
.action-login-page {
  --login-accent: #3b9cff;
  --login-accent-strong: #75beff;
  --login-surface: rgba(8, 18, 32, 0.72);
  --login-border: rgba(180, 211, 232, 0.24);
  --login-text: #f3f8ff;
  --login-muted: rgba(202, 216, 228, 0.76);
  --login-field: rgba(20, 36, 58, 0.62);
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  color: var(--login-text);
  background: #0f1729;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.action-login-page::before,
.action-login-page::after {
  display: none;
}

.action-login-page .action-orbit-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #0f1729;
}

.action-login-page .action-orbit-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  transform: none;
  transform-origin: center;
}

.action-login-page .action-orbit-field[data-render-error="true"]::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 51%;
  width: min(1180px, 92vw);
  aspect-ratio: 1;
  border: 1px solid rgba(219, 233, 255, 0.11);
  border-radius: 50%;
  transform: translate(-50%, 0);
  box-shadow: 0 0 40px rgba(99, 179, 255, 0.06);
}

.action-login-page .action-orbit-bg,
.action-login-page .action-login-container {
  view-transition-name: none;
}

@supports (view-transition-name: action-auth-globe) {
  @view-transition { navigation: auto; }
  .action-login-page .action-orbit-bg { view-transition-name: action-auth-globe; }
  .action-login-page .action-login-container { view-transition-name: action-auth-card; }
  ::view-transition-old(action-auth-globe),
  ::view-transition-new(action-auth-globe),
  ::view-transition-old(action-auth-card),
  ::view-transition-new(action-auth-card) {
    animation-duration: 160ms;
    animation-timing-function: ease;
    mix-blend-mode: normal;
  }
}

.week-picker.is-all-program-data::after {
  display: none;
}

@media (max-width: 719px) {
  .trafficking-drawer-summary {
    grid-template-columns: 1fr;
  }

  .trafficking-drawer-summary > div + div {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    border-left: 0;
  }

  .trafficking-week-strip {
    overflow-x: auto;
    grid-template-columns: repeat(7, minmax(72px, 1fr));
  }

  body.activity-map-mode .drawer-panel {
    width: 100%;
  }
}

.action-login-page .action-meridian-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.action-login-page .action-orbit-field svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.action-login-page .action-topology-link {
  fill: none;
  stroke: rgba(219, 233, 255, 0.42);
  stroke-width: 1px;
  opacity: 0.12;
  vector-effect: non-scaling-stroke;
}

.action-login-page .action-topology-dot {
  fill: rgba(232, 246, 255, 0.72);
  stroke: rgba(127, 200, 255, 0.08);
  stroke-width: 6px;
  opacity: 0.24;
  filter: drop-shadow(0 0 6px rgba(189, 230, 255, 0.3));
  paint-order: stroke fill;
  transform: scaleY(var(--action-topology-dot-y-scale, 1));
  transform-box: fill-box;
  transform-origin: center;
  vector-effect: non-scaling-stroke;
}

.action-login-page .action-login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 0 20px;
}

.action-login-page .action-login-container {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 392px;
  justify-items: center;
  gap: 24px;
  padding: 0;
}

.action-login-page .action-login-wordmark {
  position: absolute;
  bottom: calc(100% + clamp(18px, 4vh, 28px));
  left: 50%;
  display: grid;
  width: min(180px, 40vw);
  margin: 0;
  justify-items: center;
  gap: 4px;
  color: var(--login-text);
  line-height: 1;
  text-align: center;
  transform: translateX(-50%);
  filter: drop-shadow(0 18px 36px rgba(2, 8, 16, 0.42));
}

.action-login-page .action-login-wordmark span {
  color: #3b9cff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
}

.action-login-page .action-login-wordmark strong {
  color: var(--login-text);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.14em;
}

.action-login-page .action-login-card,
.action-login-page .action-login-card.compact {
  position: relative;
  width: 100%;
  max-width: 392px;
  overflow: hidden;
  box-sizing: border-box;
  padding: 30px 28px 28px;
  border: 1px solid var(--login-border);
  border-radius: 26px;
  color: var(--login-text);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.025) 42%, rgba(59, 156, 255, 0.075)),
    var(--login-surface);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -1px 0 rgba(59, 156, 255, 0.1);
  backdrop-filter: blur(22px) saturate(1.34);
  -webkit-backdrop-filter: blur(22px) saturate(1.34);
  animation: action-auth-card-enter var(--motion-layout) var(--motion-ease) both;
}

.action-login-page .action-login-wordmark,
.action-login-page .action-login-version {
  animation: action-auth-copy-enter var(--motion-panel) ease both;
}

@keyframes action-auth-card-enter {
  from { opacity: 0; transform: translateY(9px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes action-auth-copy-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

.action-login-page .action-login-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  border-radius: 25px;
  background:
    linear-gradient(122deg, rgba(255, 255, 255, 0.14), transparent 34%),
    linear-gradient(322deg, rgba(59, 156, 255, 0.16), transparent 42%);
  opacity: 0.78;
  pointer-events: none;
}

.action-login-page .action-login-copy {
  margin: 0;
}

.action-login-page .action-login-copy h1,
.action-login-page .action-login-copy h2 {
  margin: 0 0 8px;
  color: var(--login-text);
  font-size: clamp(20px, 4vw, 25px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
  text-align: center;
}

.action-login-page .action-login-copy p {
  margin: 0 0 24px;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

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

.action-login-page .action-login-form label {
  display: block;
  color: rgba(218, 230, 241, 0.84);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
  text-transform: uppercase;
}

.action-login-page .action-login-form input {
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(170, 196, 220, 0.24);
  border-radius: 14px;
  outline: 0;
  background: var(--login-field);
  color: var(--login-text);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 12px 24px rgba(1, 7, 15, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font: inherit;
  font-size: 14px;
}

.action-login-page .action-login-form input:focus {
  border-color: rgba(117, 190, 255, 0.68);
  background: rgba(24, 44, 68, 0.74);
  box-shadow:
    0 0 0 3px rgba(59, 156, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.action-login-page .action-login-form input::placeholder {
  color: rgba(154, 174, 193, 0.68);
}

.action-login-page .action-login-link {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  justify-self: flex-start;
  color: rgba(197, 216, 230, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

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

.action-login-page .action-login-actions {
  display: grid;
  gap: 11px;
  margin-top: 9px;
}

.action-login-page .action-login-submit,
.action-login-page .action-login-secondary {
  position: relative;
  display: inline-flex;
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 0 15px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  border-radius: 15px;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 9px 24px rgba(2, 8, 23, 0.18);
  backdrop-filter: blur(18px) saturate(1.32);
  -webkit-backdrop-filter: blur(18px) saturate(1.32);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.action-login-page .action-login-submit {
  border: 1px solid rgba(191, 219, 254, 0.5);
  background: linear-gradient(145deg, rgba(130, 195, 255, 0.98), rgba(59, 156, 255, 0.94) 48%, rgba(22, 119, 216, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 30px rgba(22, 119, 216, 0.24);
}

.action-login-page .action-login-submit:hover,
.action-login-page .action-login-submit:focus-visible {
  border-color: rgba(219, 234, 254, 0.66);
  background: linear-gradient(145deg, rgba(164, 213, 255, 1), rgba(82, 171, 255, 0.96) 48%, rgba(31, 132, 229, 0.92));
}

.action-login-page .action-login-secondary {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(148, 163, 184, 0.055));
  color: var(--login-text);
}

.action-login-page .action-login-secondary:hover,
.action-login-page .action-login-secondary:focus-visible {
  border-color: rgba(203, 213, 225, 0.38);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(148, 163, 184, 0.08));
  color: #ffffff;
}

.action-login-page .action-login-submit:focus-visible,
.action-login-page .action-login-secondary:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(59, 156, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 12px 28px rgba(2, 8, 23, 0.22);
}

.action-login-page .action-login-submit:active,
.action-login-page .action-login-secondary:active {
  transform: translateY(1px);
}

.action-login-page .action-login-submit:disabled,
.action-login-page .action-login-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.action-login-page .action-login-spinner-shell,
.action-login-page .action-login-spinner {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.action-login-page .action-login-alert {
  margin: 0 0 16px;
  border-radius: 14px;
}

.action-login-page .action-login-version {
  position: absolute;
  top: calc(100% + clamp(18px, 4vh, 30px));
  left: 50%;
  width: min(100%, 340px);
  margin: 0;
  color: rgba(190, 207, 222, 0.68);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-align: center;
  text-transform: uppercase;
  transform: translateX(-50%);
}

@media (max-width: 640px) {
  .action-login-page .action-login-shell {
    padding: 0 16px;
    overflow-x: hidden;
  }

  .action-login-page .action-login-container {
    width: min(calc(100vw - 32px), 342px);
    max-width: 100%;
  }

  .action-login-page .action-login-wordmark {
    width: min(165px, 47vw);
  }

  .action-login-page .action-login-card,
  .action-login-page .action-login-card.compact {
    max-width: 342px;
    padding: 28px 22px 24px;
    border-color: rgba(180, 211, 232, 0.18);
    border-radius: 22px;
    background:
      linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018) 44%, rgba(59, 156, 255, 0.06)),
      rgba(8, 18, 32, 0.76);
    box-shadow:
      0 22px 54px rgba(0, 0, 0, 0.34),
      0 0 0 1px rgba(255, 255, 255, 0.025),
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      inset 0 -1px 0 rgba(59, 156, 255, 0.07);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
  }

  .action-login-page .action-login-card::before {
    inset: 0;
    border-radius: inherit;
    opacity: 0.32;
  }

  .action-login-page .action-login-version {
    max-width: 260px;
    line-height: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .action-login-page .action-topology-dot {
    opacity: 0.22;
  }

  .action-login-page .action-login-submit,
  .action-login-page .action-login-secondary {
    transition: none;
  }

  .action-login-page .action-login-card,
  .action-login-page .action-login-wordmark,
  .action-login-page .action-login-version {
    animation: none;
  }
}
