@font-face {
  font-family: Inter;
  src: url('/assets/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
:root {
  font-family: Inter, system-ui, sans-serif;
  color: #142b37;
  background: #f3f6f7;
  font-synthesis: none;
  --ink: #142b37;
  --muted: #5f727c;
  --line: #dfe7ea;
  --brand: #087f8c;
  --nav: #102d39;
  --soft: #e7f4f5;
  --good: #187454;
  --warn: #9a5c0a;
  --bad: #ba4347;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 600;
  color: var(--ink);
  min-height: 40px;
}
button:hover {
  background: #f3f7f8;
  border-color: #b9cbd1;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
button.primary:hover {
  background: #086b76;
}
button.danger {
  color: var(--bad);
}
button.link {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 4px 0;
  min-height: 30px;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
input,
select,
textarea {
  padding: 10px 12px;
  border: 1px solid #bfcdd2;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  width: 100%;
  min-height: 42px;
}
textarea {
  resize: vertical;
  min-height: 92px;
}
label {
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
}
input[type='checkbox'] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--brand);
}
.check {
  flex-direction: row;
  align-items: center;
  font-weight: 400;
}
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #91ccd2;
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.7px;
}
h2 {
  font-size: 18px;
  line-height: 1.4;
}
h3 {
  font-size: 15px;
}
.muted,
small {
  color: var(--muted);
}
small {
  font-size: 12px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.between {
  justify-content: space-between;
}
.grow {
  flex: 1;
}
.end {
  justify-content: flex-end;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f4f5;
  color: var(--muted);
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag.good {
  color: var(--good);
  background: #e6f3ec;
}
.tag.warn {
  color: var(--warn);
  background: #fff3da;
}
.tag.bad {
  color: var(--bad);
  background: #fcecef;
}
.tag.info {
  color: var(--brand);
  background: var(--soft);
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--nav);
  color: #c5d4d9;
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 24px 16px 20px;
  gap: 24px;
  overflow-y: auto;
}
.mobile-city-context {
  display: none;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: white;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand);
}
.brand-mark img {
  width: 20px;
  height: 20px;
}
.city-context {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #254854;
  border-radius: 6px;
  color: #fff;
}
.city-context small {
  color: #c5d4d9;
  display: block;
}
.city-monogram {
  font-size: 12px;
  font-weight: 700;
}
.city-switcher {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: #254854;
  border-radius: 6px;
  min-width: 0;
}
.city-switcher label {
  color: #fff;
  font-size: 12px;
}
.city-switcher select {
  min-width: 0;
  text-overflow: ellipsis;
}
.city-switcher small {
  color: #c5d4d9;
  font-size: 11px;
}
.onboarding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px;
  max-width: 640px;
}
.onboarding p {
  color: var(--muted);
  max-width: 480px;
}
.nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-label {
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 11px;
  color: #8b9aa1;
  margin: 0 12px 6px;
}
.nav-group a {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: #c5d4d9;
  border-radius: 6px;
  text-decoration: none;
}
.nav-group a:hover,
.nav-group a.active {
  background: #254854;
  color: #fff;
}
.nav-group img {
  width: 20px;
  height: 20px;
}
.user-context {
  margin-top: auto;
  padding: 0 8px;
}
.user-context small {
  display: block;
  color: #8b9aa1;
  margin-top: 4px;
}
.user-context button {
  margin-top: 12px;
  background: transparent;
  border-color: #365460;
  color: #c5d4d9;
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: white;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.topbar small {
  font-size: 12px;
}
.global-search {
  width: 300px;
  max-width: 40vw;
  display: flex;
  gap: 6px;
}
.global-search input {
  background: #f3f6f7;
  border: 0;
  font-size: 12px;
  min-height: 34px;
}
.global-search button {
  padding: 4px 9px;
  min-height: 34px;
  font-size: 12px;
}
.content {
  padding: 24px;
  max-width: 1800px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.page-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.page-title p {
  color: var(--muted);
  margin-top: 6px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-label {
  font-size: 12px;
  color: var(--muted);
}
.metric-value {
  font-size: 30px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.7px;
}
.metric small {
  font-size: 12px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  min-width: 0;
  overflow: hidden;
}
.panel-head {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.panel-body {
  padding: 20px;
}
.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}
.map {
  background: #e8efed;
  position: relative;
  min-height: 380px;
  overflow: hidden;
}
.map svg {
  display: block;
  width: 100%;
  height: 500px;
}
.map.detail-map svg {
  height: 300px;
}
.map.detail-map {
  min-height: 300px;
}
.map-label {
  position: absolute;
  left: 16px;
  bottom: 12px;
  background: #ffffffde;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}
.map-empty {
  display: grid;
  place-items: center;
  height: 430px;
  padding: 40px;
  text-align: center;
}
.map svg a {
  cursor: pointer;
}
.map svg a:focus {
  outline: none;
}
.map svg a:focus circle {
  stroke-width: 4;
  stroke: #102d39;
}
.legend {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
.event-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.event-row:hover {
  background: #f6fafb;
  text-decoration: none;
}
.event-row strong {
  font-weight: 650;
}
.event-row small {
  font-size: 12px;
}
.event-row .row {
  gap: 6px;
}
.event-time {
  margin-left: auto;
}
.panel-footer {
  padding: 12px 16px;
}
.note {
  padding: 13px 16px;
  background: var(--soft);
  border: 1px solid #c5e2e5;
  color: #27606a;
  border-radius: 7px;
  font-size: 13px;
}
.note.warning {
  background: #fff8e8;
  border-color: #f1ddb3;
  color: #83550d;
}
.note.error,
.form-error {
  background: #fff1f2;
  color: #a6343c;
  border: 1px solid #f0ced0;
  border-radius: 6px;
  padding: 12px;
}
.note strong {
  display: block;
  margin-bottom: 3px;
}
.empty {
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
}
.empty h2 {
  color: var(--ink);
  margin-bottom: 8px;
}
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.filters label {
  flex: 1;
  min-width: 160px;
  font-size: 12px;
}
.filters .filter-search {
  flex: 2;
}
.filters button {
  align-self: flex-end;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  text-align: left;
}
th {
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
td a {
  font-weight: 650;
}
td small {
  display: block;
  margin-top: 3px;
}
tbody tr:hover {
  background: #f8fbfc;
}
tbody tr:last-child td {
  border-bottom: none;
}
.pagination {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.photo {
  width: 100%;
  height: 310px;
  object-fit: contain;
  background: #e8efed;
  display: block;
  border-radius: 6px;
}
.photo.placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 20px;
}
.photo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 12px;
}
.photo-toolbar select {
  width: auto;
  max-width: 70%;
  font-size: 12px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.facts dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.facts dd {
  font-weight: 600;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.facts.full {
  grid-template-columns: 1fr;
}
.fact-wide {
  grid-column: 1/-1;
}
.section-caption {
  font-size: 12px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.audit-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.audit-item:first-child {
  padding-top: 0;
}
.audit-item:last-child {
  border: 0;
  padding-bottom: 0;
}
.audit-item p {
  margin-top: 6px;
}
.audit-item pre {
  font-family: inherit;
  font-size: 12px;
  white-space: pre-wrap;
  color: var(--muted);
  background: #f5f8f8;
  padding: 8px;
  border-radius: 6px;
}
.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(400px, 1.1fr) minmax(380px, 1fr);
}
.auth-story {
  background: var(--nav);
  padding: 48px 9vw;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  gap: 60px;
}
.auth-story h1 {
  font-size: 48px;
  letter-spacing: -1.8px;
  max-width: 520px;
  line-height: 1.15;
}
.auth-story p {
  color: #b9cdd4;
  font-size: 16px;
  max-width: 410px;
  margin-top: 24px;
}
.auth-feature {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 0;
  color: #c5d4d9;
  border-bottom: 1px solid #31505c;
}
.auth-feature span {
  color: #5dc5cd;
  font-size: 22px;
}
.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-form {
  width: 100%;
  max-width: 380px;
}
.auth-form h2 {
  font-size: 28px;
  letter-spacing: -0.6px;
}
.auth-form form {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-form .note {
  margin-top: 24px;
}
.loading {
  display: grid;
  place-items: center;
  min-height: 60vh;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  max-width: 440px;
  background: #102d39;
  color: #fff;
  border-radius: 8px;
  padding: 14px 20px;
  box-shadow: 0 6px 30px #102d3925;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  max-width: 600px;
  width: calc(100% - 32px);
  color: var(--ink);
}
dialog::backdrop {
  background: #102d3980;
}
dialog .panel-head {
  border-radius: 12px 12px 0 0;
}
.secret {
  overflow-wrap: anywhere;
  background: #f3f6f7;
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 6px;
  font-family: monospace;
  user-select: all;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-error:empty {
  display: none;
}
.health-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.health-card {
  padding: 20px;
}
.health-card .facts {
  margin: 20px 0 0;
}
.mobile-menu {
  display: none;
}
.mobile-label {
  display: none;
}
.break {
  overflow-wrap: anywhere;
}
.span-all {
  grid-column: 1/-1;
}
.hidden {
  display: none !important;
}
@media (min-width: 1600px) {
  .map svg {
    height: 560px;
  }
  .event-row {
    padding: 18px 20px;
  }
  .photo {
    height: 390px;
  }
}
@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }
  .sidebar {
    padding: 24px 12px;
  }
  .content {
    padding: 20px;
  }
  .live-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, 1fr);
  }
  .metrics {
    gap: 8px;
  }
  .metric {
    padding: 14px;
  }
  .metric-value {
    font-size: 26px;
  }
  .topbar {
    padding: 0 20px;
  }
  .topbar small {
    display: none;
  }
}
@media (max-width: 960px) {
  .live-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .global-search {
    max-width: 60vw;
  }
  .map svg {
    height: 420px;
  }
  .photo {
    height: 330px;
  }
  .auth-page {
    grid-template-columns: 1fr 1fr;
  }
  .auth-story {
    padding: 40px;
  }
  .auth-story h1 {
    font-size: 36px;
  }
}
@media (max-width: 680px) {
  body {
    font-size: 14px;
  }
  .layout {
    display: block;
  }
  .sidebar {
    position: fixed;
    visibility: hidden;
    left: 0;
    top: 0;
    width: 240px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.15s;
  }
  .sidebar.open {
    visibility: visible;
    transform: translateX(0);
    box-shadow: 20px 0 0 100vw #102d3970;
  }
  .mobile-menu {
    display: block;
    padding: 4px 10px;
    font-size: 20px;
  }
  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  .topbar .global-search {
    flex: 1;
    max-width: none;
    width: auto;
  }
  .topbar .city-name {
    display: none;
  }
  .mobile-city-context {
    display: block;
    padding: 8px 16px;
    background: var(--soft);
    color: var(--brand);
    font-size: 12px;
    overflow-wrap: anywhere;
  }
  .content {
    padding: 20px 16px;
  }
  .page-title {
    align-items: flex-start;
    gap: 14px;
  }
  h1 {
    font-size: 24px;
  }
  .metric {
    padding: 14px;
  }
  .metric-value {
    font-size: 28px;
  }
  .metrics {
    gap: 10px;
  }
  .metric small {
    font-size: 11px;
  }
  .panel-head {
    padding: 14px 16px;
  }
  .panel-body {
    padding: 16px;
  }
  .map {
    min-height: 340px;
  }
  .map svg {
    height: 340px;
  }
  .filters label {
    min-width: 130px;
  }
  .filters .filter-search {
    flex-basis: 100%;
  }
  .filters button {
    width: 100%;
  }
  .photo {
    height: 240px;
  }
  .auth-page {
    display: block;
  }
  .auth-story {
    padding: 24px 24px 32px;
    gap: 30px;
  }
  .auth-story h1 {
    font-size: 32px;
    margin-top: 14px;
  }
  .auth-story p {
    font-size: 14px;
    margin-top: 12px;
  }
  .auth-story .auth-features,
  .auth-story > small {
    display: none;
  }
  .auth-form-wrap {
    padding: 32px 24px;
  }
  .auth-form h2 {
    font-size: 24px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  #toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
  .facts {
    gap: 14px;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .global-search button {
    display: none;
  }
}
