:root {
  --blue: #003da5;
  --blue-dark: #082f62;
  --ink: #17212b;
  --ink-soft: #465461;
  --green: #16736c;
  --gold: #e5b742;
  --red: #b84f5f;
  --paper: #ffffff;
  --mist: #f2f5f4;
  --fog: #e6ecea;
  --charcoal: #1d252c;
  --charcoal-2: #121a21;
  --line: #d6dfdd;
  --focus: #f4c542;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--blue);
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--green);
}

button,
input,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  color: var(--paper);
  background: var(--charcoal);
  border-radius: 4px;
}

.skip-link:focus {
  top: 1rem;
}

.contained {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.official-banner {
  color: var(--paper);
  background: var(--charcoal-2);
  font-size: 0.92rem;
}

.official-banner .contained {
  padding: 0.45rem 0;
}

.official-banner details {
  display: inline-block;
  margin-left: 0.75rem;
}

.official-banner summary {
  color: var(--paper);
  cursor: pointer;
  font-weight: 700;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.trust-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.75rem;
}

.trust-icon {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: var(--charcoal);
  background: var(--paper);
  font-weight: 800;
}

.site-header {
  background: var(--blue);
  color: var(--paper);
  border-bottom: 5px solid var(--gold);
}

.header-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: stretch;
  min-height: 92px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--paper);
  text-decoration: none;
}

.brand:hover,
.brand:focus,
.brand:focus-visible {
  color: var(--paper);
  outline: none;
}

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  color: var(--blue);
  background: var(--paper);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-name {
  display: block;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 800;
  line-height: 1;
}

.brand-subtitle {
  display: block;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: stretch;
}

.header-action {
  display: inline-grid;
  min-width: 112px;
  place-items: center;
  padding: 0 1rem;
  color: var(--paper);
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  text-decoration: none;
}

.header-action:hover,
.header-action:focus,
.header-action[aria-current="page"] {
  color: var(--paper);
  background: var(--blue-dark);
}

.main-nav {
  background: var(--blue-dark);
}

.main-nav .contained {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
}

.main-nav a {
  display: block;
  padding: 0.72rem 1rem;
  color: var(--paper);
  font-size: 0.95rem;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--gold);
}

.page-kicker {
  margin: 0 0 1.25rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.band {
  padding: 2.25rem 0;
}

.band-light {
  background: var(--mist);
}

.band-white {
  background: var(--paper);
}

.band-blue {
  color: var(--paper);
  background: var(--blue);
}

.band-blue a {
  color: var(--paper);
}

.section-heading {
  margin: 0 0 1.25rem;
  font-size: clamp(1.45rem, 2.2vw, 2.05rem);
  line-height: 1.2;
}

.section-lede {
  max-width: 760px;
  margin: 0.5rem 0 1.5rem;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1rem;
}

.feature-side {
  display: grid;
  gap: 1rem;
}

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  box-shadow: 0 1px 0 rgba(18, 26, 33, 0.05);
}

.feature-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.feature-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
}

.card h2,
.card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.18rem;
  line-height: 1.25;
}

.card p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.icon-card {
  display: grid;
  min-height: 0;
  grid-template-columns: 74px 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem;
}

.avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--green);
  font-size: 1rem;
  font-weight: 800;
}

.avatar-gold {
  color: var(--ink);
  background: var(--gold);
}

.avatar-red {
  background: var(--red);
}

.services-grid,
.news-grid,
.stats-grid,
.officials-grid,
.quick-grid {
  display: grid;
  gap: 1rem;
}

.quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.services-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.service-card {
  min-height: 148px;
  padding: 1rem;
}

.service-card .avatar {
  margin-bottom: 0.85rem;
}

.news-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.news-card {
  padding: 1rem;
}

.meta {
  display: block;
  margin-top: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 1.1rem;
}

.stat-number {
  display: block;
  color: var(--blue);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 800;
  line-height: 1;
}

.officials-grid {
  grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.official-photo {
  overflow: hidden;
}

.official-photo img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.official-card {
  padding: 1rem;
}

.portrait {
  display: grid;
  width: 82px;
  height: 82px;
  margin-bottom: 1rem;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: linear-gradient(135deg, var(--blue), var(--green));
  font-size: 1.45rem;
  font-weight: 800;
}

.cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border: 2px solid var(--blue);
  border-radius: 4px;
  color: var(--paper);
  background: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.button:focus {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

.button-secondary {
  color: var(--blue);
  background: var(--paper);
}

.band-blue .button-secondary {
  color: var(--blue);
}

.about-bar {
  color: var(--paper);
  background: var(--blue);
}

.about-bar .contained {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 1rem 0;
}

.about-bar h2 {
  margin: 0;
  font-size: 1.08rem;
}

.about-bar a {
  color: var(--paper);
}

.site-footer {
  color: var(--paper);
  background: var(--charcoal);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.8fr));
  gap: 2rem;
  padding: 2rem 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
}

.site-footer a {
  color: var(--paper);
  font-weight: 700;
}

.site-footer ul,
.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li,
.link-list li {
  margin: 0.45rem 0;
}

.report-problem {
  margin-top: 1rem;
}

.report-problem summary {
  cursor: pointer;
  font-weight: 800;
}

.report-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
  margin-top: 0.75rem;
  padding: 1rem;
  color: var(--ink);
  background: var(--paper);
  border-radius: 4px;
}

.report-list a {
  color: var(--blue);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-bottom .contained {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  padding: 1rem 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.page-title-band {
  padding: 2.4rem 0;
  background: var(--mist);
  border-bottom: 1px solid var(--line);
}

.page-title-band h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.filter-bar input,
.search-form input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 2px solid var(--line);
  border-radius: 4px;
}

.filter-bar input:focus,
.search-form input:focus,
.button:focus,
a:focus,
summary:focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

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

.department-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  padding: 1rem;
}

.department-card[hidden],
.search-item[hidden] {
  display: none;
}

.department-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.18rem;
}

.phone {
  color: var(--ink-soft);
  font-weight: 700;
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.pay-card {
  padding: 1.1rem;
}

.search-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 2rem;
  align-items: center;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
}

.search-results-list {
  display: grid;
  gap: 0.9rem;
}

.search-item {
  padding: 1rem;
}

.status {
  min-height: 1.5rem;
  color: var(--ink-soft);
  font-weight: 700;
}

.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.layout-2col {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.sidebar h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}

.sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar li {
  margin: 0.35rem 0;
}

.dept-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.dept-meta > div {
  min-width: 0;
}

.dept-meta dt {
  margin: 0 0 0.15rem;
  font-weight: 800;
  color: var(--blue-dark);
  font-size: 0.95rem;
}

.dept-meta dd {
  margin: 0 0 0.5rem;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dept-meta dd a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose h2 {
  margin-top: 1.75rem;
  font-size: 1.4rem;
}

.prose h3 {
  margin-top: 1.35rem;
  font-size: 1.15rem;
}

.prose ul,
.prose ol {
  margin: 0.5rem 0 1rem 1.25rem;
}

.prose li {
  margin: 0.3rem 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.5rem 0 1.25rem;
}

.tag-list span {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--fog);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue-dark);
}

.crumbs {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.crumbs a {
  color: var(--blue);
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  margin: 0.5rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.toc-grid li {
  margin: 0;
}

.ordinance-titles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ord-title-card {
  padding: 1.05rem 1.1rem;
}

.ord-title-card span.kicker {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.45rem;
  border-radius: 4px;
  background: var(--fog);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chapter {
  padding: 1.1rem 1.2rem;
  margin: 1rem 0;
  border-left: 4px solid var(--blue);
  background: var(--mist);
  border-radius: 4px;
}

.chapter h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.chapter h3 {
  margin: 1rem 0 0.35rem;
  font-size: 1rem;
  color: var(--blue-dark);
}

.chapter p {
  margin: 0.45rem 0;
  color: var(--ink);
}

.section-cite {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

@media (max-width: 980px) {
  .layout-2col,
  .ordinance-titles,
  .dept-meta,
  .toc-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 980px) {
  .feature-grid,
  .officials-grid,
  .search-hero {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .news-grid,
  .stats-grid,
  .pay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 740px) {
  .official-banner details {
    display: block;
    margin: 0.35rem 0 0;
  }

  .trust-list,
  .department-grid,
  .services-grid,
  .news-grid,
  .stats-grid,
  .pay-grid,
  .quick-grid,
  .footer-grid,
  .report-list {
    grid-template-columns: 1fr;
  }

  .header-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .brand {
    min-height: 84px;
  }

  .header-actions {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
  }

  .header-action {
    min-height: 54px;
    flex: 1;
    border-left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
  }

  .cta,
  .filter-bar,
  .search-form {
    grid-template-columns: 1fr;
  }

  .department-card,
  .icon-card {
    grid-template-columns: 1fr;
  }
}

#chatbot-host {
  position: fixed;
  inset: auto 0 0 auto;
  z-index: 9999;
  pointer-events: none;
}

#chatbot-host > * {
  pointer-events: auto;
}
