/* San Diego page: harbor navy ink on warm coastal white, with the flag's
   crimson and gold as accents. Display type is Merriweather, the serif the
   city pairs with its own wordmark; everything stays flat — no cards, borders,
   or shadows around plots, charts, or maps. */
.sd-page {
  --sd-navy: #103c5c;
  --sd-blue: #16699c;
  --sd-crimson: #9e1b32;
  --sd-gold: #f4c430;
  --sd-gold-deep: #a87b00;
  --sd-ink: #16222e;
  --sd-paper: #fdfbf7;
  --sd-sand: #f4efe5;
  --sd-gray-dark: #4d5a66;
  --sd-gray-light: #d3d9de;
  --sd-gray-lightest: #f3f4f4;
  color: var(--sd-ink);
  background: var(--sd-paper);
  font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.sd-page * {
  box-sizing: border-box;
}

.sd-page a {
  color: inherit;
}

.sd-container {
  width: min(1200px, calc(100vw - 40px));
  margin: 0 auto;
}

/* Masthead: warm white field, harbor navy serif wordmark, and a small mark of
   the flag's three vertical bands (crimson, white, gold). */
.sd-masthead {
  background: var(--sd-paper);
  color: var(--sd-navy);
}

.sd-masthead-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 0 12px;
}

.sd-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sd-flag-mark {
  display: flex;
  width: 36px;
  height: 24px;
}

.sd-flag-mark span {
  flex: 1 1 0;
}

.sd-flag-mark .is-crimson {
  background: var(--sd-crimson);
}

.sd-flag-mark .is-white {
  background: #ffffff;
  border-top: 1px solid var(--sd-gray-light);
  border-bottom: 1px solid var(--sd-gray-light);
}

.sd-flag-mark .is-gold {
  background: var(--sd-gold);
}

.sd-wordmark {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5.4vw, 48px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0.005em;
  color: var(--sd-navy);
}

.sd-agency {
  margin-top: 4px;
  color: var(--sd-crimson);
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.sd-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  line-height: 20px;
  --site-header-control-text: var(--sd-navy);
  --site-header-control-bg: rgba(16, 60, 92, 0.04);
  --site-header-control-bg-hover: rgba(16, 60, 92, 0.1);
  --site-header-control-bg-active: rgba(16, 60, 92, 0.14);
  --site-header-control-border: rgba(16, 60, 92, 0.28);
}

.sd-nav a {
  color: var(--sd-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sd-nav .site-header-button,
.sd-nav .site-header-icon-button,
.sd-nav .site-header-icon-link {
  color: var(--sd-navy);
  text-decoration: none;
}

.sd-nav .site-city-switcher-link {
  color: var(--site-header-panel-text);
  text-decoration: none;
}

/* The flag laid flat: a thin rule split into the three vertical bands. */
.sd-triband-rule {
  height: 4px;
  background:
    linear-gradient(
      90deg,
      var(--sd-crimson) 0,
      var(--sd-crimson) 33.34%,
      #efe9dd 33.34%,
      #efe9dd 66.67%,
      var(--sd-gold) 66.67%,
      var(--sd-gold) 100%
    );
}

.sd-triband-rule.is-footer {
  margin-bottom: 24px;
}

.sd-error {
  padding: 28px 0;
}

.sd-error p,
.sd-error h2 {
  margin: 0;
}

.sd-error h2 {
  font-family: "Merriweather", Georgia, serif;
  color: var(--sd-navy);
}

.sd-error button {
  margin-top: 12px;
  border: 1px solid var(--sd-navy);
  background: var(--sd-paper);
  color: var(--sd-navy);
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.sd-loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background:
    linear-gradient(180deg, var(--sd-paper) 0%, var(--sd-paper) 56%, #e9f0f4 100%);
  color: var(--sd-ink);
}

.sd-loading-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background:
    linear-gradient(
      90deg,
      var(--sd-crimson) 0,
      var(--sd-crimson) 33.34%,
      #efe9dd 33.34%,
      #efe9dd 66.67%,
      var(--sd-gold) 66.67%,
      var(--sd-gold) 100%
    );
}

.sd-loading-shell {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: clamp(38px, 5.2vh, 56px) 0 clamp(20px, 3vh, 34px);
}

.sd-loading-head,
.sd-loading-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.sd-loading-kicker {
  margin-bottom: 10px;
  font-size: 11.9px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sd-crimson);
}

.sd-loading-title {
  margin: 0;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(46px, 8.6vw, 104px);
  line-height: 0.98;
  font-weight: 900;
  max-width: 11ch;
  color: var(--sd-navy);
}

.sd-loading-copy {
  max-width: 48rem;
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--sd-gray-dark);
}

.sd-loading-progress {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(64px, 10vw, 120px);
  line-height: 0.84;
  font-weight: 900;
  color: var(--sd-navy);
}

.sd-loading-progress-mark {
  color: var(--sd-gold-deep);
  font-size: 0.42em;
}

.sd-loading-stage {
  position: relative;
  min-height: min(56vh, 540px);
  overflow: hidden;
  border-top: 1px solid var(--sd-gray-light);
  border-bottom: 1px solid var(--sd-gray-light);
  background:
    linear-gradient(
      180deg,
      rgba(244, 239, 229, 0.4) 0%,
      rgba(253, 251, 247, 0.95) 36%,
      rgba(222, 235, 242, 0.9) 100%
    );
}

.sd-loading-image-layer {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: min(38vh, 300px);
  overflow: hidden;
}

.sd-loading-image-layer.is-base {
  opacity: 0.14;
}

.sd-loading-image-layer.is-reveal {
  clip-path: inset(0 var(--sd-loader-clip, 100%) 0 0);
  transition: clip-path 240ms ease-out;
}

.sd-loading-image {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: block;
  width: min(1500px, 118vw);
  height: auto;
  max-width: none;
  transform: translateX(-50%);
  user-select: none;
  pointer-events: none;
}

.sd-loading-foot {
  align-items: baseline;
  font-size: 13px;
  line-height: 18px;
  color: var(--sd-gray-dark);
}

.sd-loading-hint {
  opacity: 0.8;
}

/* Minimal hero: big headline, one dek, a single flat stat row with thin top
   rules, and one quiet middot-separated meta line. No boxes, no chips. */
.sd-hero {
  padding: 34px 0 30px;
}

.sd-hero-title {
  margin: 0 0 14px;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(34px, 5.2vw, 66px);
  line-height: 1.08;
  font-weight: 900;
  max-width: 24ch;
  color: var(--sd-navy);
}

.sd-hero-title span {
  color: var(--sd-crimson);
}

.sd-hero-dek {
  margin: 0;
  max-width: 70ch;
  font-size: 17px;
  line-height: 26px;
  color: var(--sd-gray-dark);
}

.sd-stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.sd-stat {
  border-top: 1px solid var(--sd-gray-light);
  padding-top: 10px;
}

.sd-stat-label,
.sd-section-tag,
.sd-repeat-head {
  font-size: 11.9px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sd-stat-label {
  color: var(--sd-gray-dark);
}

.sd-stat-value {
  margin-top: 6px;
  font-family: "Merriweather", Georgia, serif;
  font-size: 29px;
  line-height: 34px;
  font-weight: 700;
  color: var(--sd-navy);
}

.sd-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 20px 0 0;
  font-size: 13.5px;
  line-height: 18px;
  color: var(--sd-gray-dark);
}

.sd-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
}

.sd-meta-item + .sd-meta-item::before {
  content: "\00B7";
  margin-right: 14px;
  color: var(--sd-gray-light);
}

.sd-meta-item strong {
  font-weight: 700;
  color: var(--sd-ink);
}

.sd-hero-note {
  margin: 12px 0 0;
  max-width: 78ch;
  font-size: 14.5px;
  line-height: 22px;
  color: var(--sd-gray-dark);
}

.sd-page main {
  padding-top: 8px;
}

.sd-section {
  padding: 36px 0 24px;
}

.sd-section + .sd-section {
  margin-top: 8px;
}

.sd-section-head {
  max-width: 78ch;
}

.sd-section-tag {
  color: var(--sd-crimson);
}

.sd-section-head h2 {
  margin: 6px 0 8px;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.1;
  font-weight: 900;
  color: var(--sd-navy);
}

.sd-section-head p,
.sd-summary-item p,
.sd-footer p,
.sd-footer li {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: var(--sd-gray-dark);
}

.sd-ytd-section {
  padding-top: 24px;
}

.sd-ytd-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.sd-ytd-stat {
  min-height: 116px;
  border-top: 1px solid var(--sd-gray-light);
  padding-top: 12px;
}

.sd-ytd-stat.is-primary {
  border-top: 2px solid var(--sd-crimson);
}

.sd-ytd-label {
  font-size: 11.9px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sd-gray-dark);
}

.sd-ytd-value {
  margin-top: 8px;
  font-family: "Merriweather", Georgia, serif;
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 0.98;
  font-weight: 900;
  color: var(--sd-navy);
}

.sd-ytd-stat.is-primary .sd-ytd-value {
  color: var(--sd-crimson);
}

.sd-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 18px;
}

.sd-summary-item {
  padding: 12px 0 0;
  border-top: 1px solid var(--sd-gray-light);
}

.sd-summary-item h3 {
  margin: 0 0 6px;
  font-family: "Merriweather", Georgia, serif;
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
  color: var(--sd-navy);
}

.sd-toggle-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.sd-toggle-button {
  appearance: none;
  border: 1px solid var(--sd-navy);
  background: var(--sd-paper);
  color: var(--sd-navy);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  cursor: pointer;
}

.sd-toggle-button.is-active {
  background: var(--sd-navy);
  color: #ffffff;
  border-color: var(--sd-navy);
}

/* Flat chart areas: no cards, borders, or shadows around plots. */
.sd-chart-block {
  margin-top: 14px;
  background: none;
}

.sd-chart-shell {
  min-height: 320px;
  padding-top: 8px;
}

.sd-chart-shell.sd-chart-shell-short {
  min-height: 266px;
}

.sd-plot-root {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.sd-plot-root > * {
  width: 100%;
  height: 100%;
}

.sd-echart-root {
  width: 100%;
  height: 100%;
}

.sd-plot-root svg,
.sd-plot-root figure {
  display: block;
  overflow: visible;
}

.sd-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 12px;
}

.sd-note {
  font-size: 14px;
  line-height: 20px;
  color: var(--sd-gray-dark);
}

.sd-map-shell {
  position: relative;
  height: clamp(380px, 56vw, 560px);
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background: #eef2f5;
  box-shadow: none;
}

.sd-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 20px;
  color: var(--sd-gray-dark);
}

.sd-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.sd-map-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.sd-map-swatch.open {
  background: #c2442f;
}

.sd-map-swatch.closed {
  background: #3f7fae;
}

.sd-map-swatch.hotspot {
  background: #0e2a40;
}

.sd-community-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.sd-community-item {
  display: grid;
  grid-template-columns: 56px minmax(180px, 0.9fr) minmax(0, 2fr) 110px;
  gap: 8px 14px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--sd-gray-light);
}

.sd-community-rank {
  font-family: "Merriweather", Georgia, serif;
  font-size: 23px;
  line-height: 26px;
  font-weight: 700;
  color: var(--sd-crimson);
}

.sd-community-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
}

.sd-community-bar {
  position: relative;
  height: 14px;
  background: var(--sd-sand);
}

.sd-community-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--sd-navy);
}

.sd-community-count {
  text-align: right;
  font-family: "Merriweather", Georgia, serif;
  font-size: 21px;
  line-height: 24px;
  font-weight: 700;
  color: var(--sd-navy);
}

.sd-repeat-head,
.sd-repeat-item {
  display: grid;
  grid-template-columns: 68px 92px minmax(0, 1.9fr) minmax(110px, 0.9fr) minmax(110px, 0.9fr);
  gap: 8px 12px;
  justify-items: start;
}

.sd-repeat-head {
  padding: 0 0 8px;
  margin-top: 16px;
  border-bottom: 1px solid var(--sd-gray-light);
  color: var(--sd-gray-dark);
}

.sd-repeat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sd-repeat-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--sd-gray-light);
  align-items: start;
}

.sd-repeat-rank,
.sd-repeat-requests {
  font-family: "Merriweather", Georgia, serif;
  font-size: 23px;
  line-height: 26px;
  font-weight: 700;
}

.sd-repeat-rank {
  color: var(--sd-crimson);
}

.sd-repeat-requests {
  color: var(--sd-navy);
}

.sd-repeat-address {
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
}

.sd-repeat-date {
  font-size: 16px;
  line-height: 20px;
  color: var(--sd-gray-dark);
}

.sd-footer {
  background: var(--sd-sand);
  padding: 0 0 40px;
  margin-top: 28px;
}

.sd-footer .sd-triband-rule {
  background:
    linear-gradient(
      90deg,
      var(--sd-crimson) 0,
      var(--sd-crimson) 33.34%,
      #ffffff 33.34%,
      #ffffff 66.67%,
      var(--sd-gold) 66.67%,
      var(--sd-gold) 100%
    );
}

.sd-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  padding-top: 12px;
}

.sd-footer h2 {
  margin: 0 0 10px;
  font-family: "Merriweather", Georgia, serif;
  font-size: 24px;
  line-height: 28px;
  font-weight: 900;
  color: var(--sd-navy);
}

.sd-footer ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

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

.sd-source-list a {
  color: var(--sd-navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sd-page .leaflet-container {
  background: #eef2f5;
  font-family: "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Single-hue monochrome basemap: grayscale the CARTO tiles, then tint them
   toward a muted harbor blue so the map reads as one quiet Pacific surface. */
.sd-page .leaflet-tile-pane {
  filter: grayscale(1) sepia(1) saturate(1.15) hue-rotate(172deg) brightness(1.02) contrast(0.97);
}

.sd-page .leaflet-container a {
  color: var(--sd-navy);
}

.sd-page .leaflet-pane.sd-map-labels-pane {
  mix-blend-mode: multiply;
  opacity: 0.78;
}

.sd-page .leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 14px 32px rgba(14, 42, 64, 0.16);
}

.sd-page .leaflet-bar a,
.sd-page .leaflet-bar a:hover {
  width: 34px;
  height: 34px;
  line-height: 34px;
  border: none;
  border-bottom: 1px solid rgba(14, 42, 64, 0.1);
  background: rgba(255, 255, 255, 0.96);
  color: var(--sd-ink);
}

.sd-page .leaflet-bar a:last-child {
  border-bottom: none;
}

.sd-page .leaflet-bar a:hover {
  background: #ffffff;
  color: var(--sd-navy);
}

.sd-page .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.92) !important;
  color: #4f5d6b;
  padding: 2px 8px;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(14, 42, 64, 0.12);
  box-shadow: 0 16px 30px rgba(14, 42, 64, 0.16);
  background: rgba(255, 255, 255, 0.97);
  font-size: 13px;
  line-height: 18px;
  color: var(--sd-ink);
  min-width: 190px;
  max-width: 260px;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.97);
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-title {
  font-weight: 700;
  line-height: 17px;
  margin-bottom: 2px;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-meta,
.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-subtle,
.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-status-row {
  margin-top: 3px;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-status {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-status.is-open {
  background: rgba(158, 27, 50, 0.12);
  color: #7f1628;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-status.is-closed {
  background: rgba(22, 105, 156, 0.14);
  color: #11567f;
}

.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-id,
.sd-page .leaflet-tooltip.sd-pothole-tooltip .map-tooltip-subtle {
  color: #556270;
  font-size: 12px;
}

@media (max-width: 900px) {
  .sd-stat-row,
  .sd-summary-grid,
  .sd-ytd-grid,
  .sd-footer-grid {
    grid-template-columns: 1fr;
  }

  .sd-nav {
    display: none;
  }

  .sd-hero-title {
    max-width: none;
  }

  .sd-loading-head,
  .sd-loading-foot {
    flex-direction: column;
  }

  .sd-loading-progress {
    font-size: clamp(56px, 15vw, 100px);
  }

  .sd-loading-stage {
    min-height: min(48vh, 440px);
  }
}

@media (max-width: 720px) {
  .sd-container {
    width: min(100vw - 24px, 1200px);
  }

  .sd-wordmark {
    font-size: 30px;
  }

  .sd-meta-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .sd-meta-item + .sd-meta-item::before {
    content: none;
    margin-right: 0;
  }

  .sd-repeat-head {
    display: none;
  }

  .sd-repeat-item {
    grid-template-columns: 64px 72px minmax(0, 1fr);
    gap: 4px 10px;
  }

  .sd-repeat-address,
  .sd-repeat-date {
    grid-column: 3;
  }

  .sd-community-item {
    grid-template-columns: 48px minmax(0, 1fr) 80px;
  }

  .sd-community-bar {
    display: none;
  }

  .sd-loading-shell {
    gap: 18px;
    padding-top: 34px;
  }

  .sd-loading-title {
    font-size: clamp(36px, 14vw, 64px);
  }

  .sd-loading-copy {
    margin-top: 10px;
    font-size: 15px;
    line-height: 22px;
  }

  .sd-loading-stage {
    min-height: min(42vh, 340px);
  }

  .sd-loading-image-layer {
    height: min(26vh, 190px);
  }
}
