.cal-page {
  /* City of Calgary Summit Design System (summit.calgary.ca): brand red Pantone 186 C
     (#C8102E), Corporate Grey Pantone 7540 C (#4B4F55, the dominant structural colour),
     the official grey tint ramp (#5d6066 -> #f6f6f6), and Open Sans as the City's web
     typeface. Blue Sky City sky-blue (#00A3E0) is used only as a restrained secondary in
     the weather section, never as a structural or map colour. */
  --cal-red: #c8102e;
  --cal-red-deep: #a00c24;
  --cal-grey: #4b4f55;
  --cal-ink: #22252a;
  --cal-muted: #6f7277;
  --cal-line: rgba(75, 79, 85, 0.16);
  --cal-paper: #ffffff;
  --cal-tint: #f6f6f6;
  --cal-slate: #4b4f55;
  --cal-grey-mid: #939599;
  --cal-sky: #00a3e0;
  --cal-sky-text: #006f99;
  min-height: 100vh;
  background: var(--cal-paper);
  color: var(--cal-ink);
  font-family: "Open Sans", "Segoe UI", Roboto, Helvetica, Arial, system-ui, sans-serif;
}

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

.cal-page a {
  color: inherit;
}

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

/* Masthead */
.cal-masthead {
  background: #fff;
  color: var(--cal-grey);
  border-top: 5px solid var(--cal-red);
  border-bottom: 1px solid rgba(75, 79, 85, 0.2);
}

.cal-masthead-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cal-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cal-official-logo {
  display: block;
  width: clamp(168px, 20vw, 220px);
  height: auto;
}

.cal-dashboard-label {
  padding-left: 16px;
  border-left: 1px solid rgba(75, 79, 85, 0.24);
  color: var(--cal-grey);
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cal-mark {
  width: 46px;
  height: 46px;
  display: block;
  flex: none;
}

.cal-mark svg {
  width: 100%;
  height: 100%;
}

.cal-wordmark {
  font-size: clamp(30px, 4.6vw, 44px);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cal-agency {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  --site-header-control-text: var(--cal-grey);
  --site-header-control-bg: rgba(75, 79, 85, 0.04);
  --site-header-control-bg-hover: rgba(75, 79, 85, 0.1);
  --site-header-control-bg-active: rgba(75, 79, 85, 0.16);
  --site-header-control-border: rgba(75, 79, 85, 0.26);
}

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

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

/* Loading + error */
.cal-loading {
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: center;
  background: linear-gradient(180deg, rgba(228, 53, 48, 0.07), transparent 40%), var(--cal-paper);
}

.cal-loading[hidden],
.cal-error[hidden],
.cal-dashboard[hidden] {
  display: none;
}

.cal-loading-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) 1fr;
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
}

.cal-loading img {
  width: 100%;
  max-height: 360px;
}

.cal-loading h1 {
  max-width: 9ch;
  margin: 8px 0 14px;
  font-size: clamp(52px, 9vw, 112px);
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cal-red);
}

.cal-loading p {
  max-width: 34rem;
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  color: var(--cal-muted);
}

.cal-error {
  padding: 32px 0;
  background: var(--cal-paper);
  border-bottom: 1px solid var(--cal-line);
}

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

.cal-error h2 {
  color: var(--cal-red-deep);
  font-weight: 800;
}

.cal-error p {
  margin-top: 8px;
  color: var(--cal-muted);
}

.cal-error button {
  margin-top: 14px;
  border: 0;
  background: var(--cal-red);
  color: #fff;
  padding: 10px 16px;
  font-weight: 800;
  cursor: pointer;
}

/* Hero */
.cal-hero {
  padding: clamp(48px, 7vw, 92px) 0 clamp(34px, 5vw, 62px);
  background: linear-gradient(92deg, rgba(228, 53, 48, 0.08), transparent 52%), var(--cal-paper);
  border-bottom: 1px solid var(--cal-line);
}

.cal-kicker {
  margin: 0;
  color: var(--cal-red);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cal-hero h1 {
  max-width: 15ch;
  margin: 12px 0 18px;
  font-size: clamp(46px, 7.6vw, 104px);
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cal-hero h1 span {
  color: var(--cal-red);
  white-space: nowrap;
}

.cal-hero-dek {
  max-width: 720px;
  margin: 0;
  color: var(--cal-muted);
  font-size: 19px;
  line-height: 30px;
}

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

.cal-stat {
  border-top: 2px solid var(--cal-red);
  padding-top: 12px;
  min-width: 0;
}

.cal-stat-label {
  color: var(--cal-muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cal-stat-value {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cal-meta {
  margin: 26px 0 0;
  color: var(--cal-muted);
  font-size: 14px;
  line-height: 22px;
}

/* Sections */
.cal-section {
  padding: clamp(42px, 6vw, 78px) 0;
  border-bottom: 1px solid var(--cal-line);
}

.cal-section-tint {
  background: var(--cal-tint);
}

.cal-section-head {
  max-width: 760px;
}

.cal-section-head h2 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cal-section-head p:not(.cal-kicker) {
  margin: 0;
  color: var(--cal-muted);
  font-size: 18px;
  line-height: 28px;
}

/* YTD */
.cal-ytd-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.cal-ytd-stat {
  border-top: 1px solid var(--cal-line);
  padding-top: 12px;
  min-width: 0;
}

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

.cal-ytd-label {
  color: var(--cal-muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cal-ytd-value {
  margin-top: 6px;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cal-ytd-stat.is-primary .cal-ytd-value {
  color: var(--cal-red);
}

/* Charts (no cards: flat plot area only) */
.cal-chart-block {
  margin-top: 28px;
}

.cal-chart-shell {
  width: 100%;
  height: clamp(340px, 46vw, 460px);
}

.cal-chart-shell-short {
  height: clamp(280px, 38vw, 380px);
}

.cal-chart-shell-tall {
  height: clamp(420px, 58vw, 560px);
}

/* The freeze-and-thaw section is the one place the Blue Sky City sky-blue is used, as a
   restrained secondary that reads as prairie sky rather than a neon accent. */
.cal-section-weather .cal-kicker {
  color: var(--cal-sky-text);
}

.cal-plot-root {
  width: 100%;
  height: 100%;
}

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

.cal-notes {
  margin: 14px 0 0;
  color: var(--cal-muted);
  font-size: 14px;
  line-height: 22px;
}

.cal-backlog {
  margin: 22px 0 0;
  max-width: 820px;
  color: var(--cal-ink);
  font-size: 17px;
  line-height: 27px;
}

/* Map (no border/background/shadow) */
.cal-map-shell {
  width: 100%;
  height: clamp(380px, 54vw, 560px);
  background: var(--cal-tint);
  overflow: hidden;
}

.cal-map-shell .leaflet-tile-pane {
  /* Neutral, fully desaturated basemap tuned to the Corporate Grey brand: no hue, so it
     can never read neon or cyan, and the Calgary red is reserved for the report points. */
  filter: grayscale(1) brightness(1.02) contrast(0.97);
}

.cal-map-labels-pane {
  filter: grayscale(1) contrast(1.1) opacity(0.7);
}

.cal-map-legend {
  margin: 14px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--cal-muted);
  font-size: 14px;
  line-height: 20px;
}

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

.cal-map-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.cal-map-swatch.open {
  background: var(--cal-red);
}

.cal-map-swatch.closed {
  background: var(--cal-slate);
}

.cal-pothole-tooltip {
  font-size: 12px;
  line-height: 1.4;
}

/* Era comparison (flat columns, ruled tops) */
.cal-era-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.cal-era-card {
  border-top: 3px solid var(--cal-red);
  padding-top: 16px;
}

.cal-era-name {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.cal-era-term {
  margin: 4px 0 16px;
  color: var(--cal-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cal-era-metrics {
  display: grid;
  gap: 12px;
}

.cal-era-metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--cal-line);
  padding-bottom: 10px;
}

.cal-era-metric-label {
  color: var(--cal-muted);
  font-size: 14px;
  line-height: 20px;
}

.cal-era-metric-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* Methodology */
.cal-methodology {
  background: var(--cal-ink);
  color: #f3efec;
  border-bottom: 0;
}

.cal-methodology .cal-kicker {
  color: #ff8a86;
}

.cal-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 64px);
}

.cal-methodology h2 {
  margin: 8px 0 14px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cal-methodology p {
  margin: 0 0 12px;
  color: #ccc4bd;
  font-size: 16px;
  line-height: 26px;
}

.cal-methodology ul {
  margin: 6px 0 0;
  padding-left: 20px;
  color: #ccc4bd;
  font-size: 15px;
  line-height: 25px;
}

.cal-methodology li {
  margin-bottom: 8px;
}

.cal-methodology code {
  color: #ffb0ac;
  font-size: 0.94em;
}

.cal-source-list {
  display: grid;
  gap: 10px;
}

.cal-source-list a {
  color: #f3efec;
  font-size: 15px;
  line-height: 22px;
  border-bottom: 1px solid rgba(243, 239, 236, 0.28);
  padding-bottom: 8px;
  text-decoration: none;
}

.cal-source-list a:hover {
  color: #ff8a86;
}

@media (max-width: 860px) {
  .cal-container {
    width: min(100% - 28px, 1160px);
  }

  .cal-masthead-inner {
    min-height: 0;
    padding: 16px 0;
  }

  .cal-loading-grid,
  .cal-method-grid {
    grid-template-columns: 1fr;
  }

  .cal-loading {
    min-height: auto;
    padding: 34px 0;
  }

  .cal-stat-row,
  .cal-ytd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cal-era-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .cal-stat-row,
  .cal-ytd-grid {
    grid-template-columns: 1fr;
  }
}

/* Official-site translation, verified 2026-07-15: Peace Bridge landscape and compact status card. */
.cal-hero[data-hero-layout="calgary-peace-bridge-search"] {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  color: var(--cal-ink);
  background: var(--cal-tint);
  border-bottom: 0;
}

.cal-hero-landscape {
  position: absolute;
  inset: 0 0 174px;
  z-index: -1;
  overflow: hidden;
  background: var(--cal-grey);
}

.cal-hero-landscape::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(75, 79, 85, 0.06), rgba(75, 79, 85, 0.42));
}

.cal-hero-landscape img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cal-bridge-arch {
  position: absolute;
  z-index: 1;
  bottom: -64px;
  width: 420px;
  height: 250px;
  border: 14px solid #c8102e;
  border-bottom: 0;
  border-radius: 50% 50% 0 0;
  transform: skewX(-12deg);
  opacity: 0.92;
}

.cal-bridge-arch.is-one {
  left: -80px;
}

.cal-bridge-arch.is-two {
  left: calc(50% - 210px);
}

.cal-bridge-arch.is-three {
  right: -80px;
}

.cal-hero-stage {
  min-height: 570px;
  display: grid;
  place-items: center;
  padding: 72px 0 58px;
}

.cal-service-summary {
  width: min(720px, calc(100% - 24px));
  padding: 28px 30px 26px;
  background: #fff;
  border-left: 5px solid #c8102e;
  box-shadow: 0 12px 28px rgba(57, 62, 69, 0.2);
}

.cal-summary-heading {
  margin: 0 0 10px;
  color: #4b4f55;
  font-size: 14px;
  line-height: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cal-source-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 18px;
  color: #4b4f55;
  font-size: 13px;
  line-height: 19px;
}

.cal-source-note strong {
  color: #a00c24;
  font-size: 11px;
  line-height: 19px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-kicker {
  color: #c8102e;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] h1 {
  max-width: 32ch;
  margin: 8px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] h1 span {
  color: #c8102e;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-hero-dek {
  max-width: 68ch;
  margin: 10px 0 0;
  color: #6f7277;
  font-size: 15px;
  line-height: 23px;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-meta {
  margin: 12px 0 0;
  color: #4b4f55;
}

.cal-quick-metrics {
  color: #22252a;
  background: #f6f6f6;
  border-top: 1px solid #d6d7d9;
  border-bottom: 1px solid #d6d7d9;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0 auto;
  padding: 30px 0;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat {
  min-width: 0;
  padding: 0 26px;
  border-top: 0;
  border-left: 1px solid #c6c7c9;
  text-align: center;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat-label {
  color: #4b4f55;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat-value {
  color: #c8102e;
}

@media (max-width: 760px) {
  .cal-hero-landscape {
    bottom: 274px;
  }

  .cal-hero-landscape img {
    width: 100%;
    object-position: 64% center;
  }

  .cal-bridge-arch {
    bottom: -42px;
    width: 240px;
    height: 150px;
    border-width: 9px;
  }

  .cal-bridge-arch.is-one {
    left: -92px;
  }

  .cal-bridge-arch.is-two {
    left: calc(50% - 120px);
  }

  .cal-bridge-arch.is-three {
    right: -92px;
  }

  .cal-hero-stage {
    min-height: 0;
    padding: 48px 0 42px;
  }

  .cal-service-summary {
    padding: 23px 20px 22px;
  }

  .cal-dashboard-label {
    display: none;
  }

  .cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }

  .cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat:nth-child(odd) {
    border-left: 0;
  }
}

@media (max-width: 480px) {
  .cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat-row {
    grid-template-columns: 1fr;
  }

  .cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat {
    padding-left: 0;
    border-left: 0;
  }
}

/* Summit-style civic hierarchy: compact logo, plain provenance, and data-first summary. */
.cal-masthead-inner {
  min-height: 64px;
  padding: 7px 0;
}

.cal-official-logo {
  width: auto;
  height: 50px;
  max-width: 132px;
  object-fit: contain;
}

.cal-hero-stage {
  min-height: 450px;
  padding: 44px 0 38px;
}

.cal-service-summary {
  width: min(680px, calc(100% - 24px));
  padding: 22px 24px 21px;
}

.cal-hero[data-hero-layout="calgary-peace-bridge-search"] h1 {
  font-size: clamp(28px, 3.2vw, 42px);
}

.cal-quick-metrics .cal-stat-row {
  padding: 20px 0;
}

@media (max-width: 760px) {
  .cal-masthead-inner {
    min-height: 58px;
    padding: 6px 0;
  }

  .cal-official-logo {
    height: 44px;
    max-width: 118px;
  }

  .cal-hero-landscape {
    bottom: 224px;
  }

  .cal-hero-stage {
    min-height: 0;
    padding: 34px 0 30px;
  }

  .cal-service-summary {
    padding: 20px 18px 19px;
  }

  .cal-quick-metrics .cal-stat-row {
    padding: 18px 0;
  }
}

@media (min-width: 361px) and (max-width: 760px) {
  .cal-ytd-grid,
  .cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cal-hero[data-hero-layout="calgary-peace-bridge-search"] .cal-stat:nth-child(even) {
    padding-left: 18px;
    border-left: 1px solid #c6c7c9;
  }
}
