:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #182b3e;
  background: #fff;
  --ink: #182b3e;
  --muted: #465a6c;
  --line: #d7e0e9;
  --blue: #17559f;
  --blue-hover: #113f78;
  --paper: #f3f7fb;
  --gutter: clamp(20px, 5vw, 64px);
  --width: 1184px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--blue); text-underline-offset: .2em; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #4f93e6; outline-offset: 3px; }

.skip {
  position: fixed;
  z-index: 10;
  inset: 8px auto auto 8px;
  padding: 12px 18px;
  background: #fff;
  transform: translateY(-150%);
}
.skip:focus { transform: translateY(0); }

.nav, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav { min-height: 70px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.035em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { flex: none; }
.nav nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 28px);
  font-size: 14px;
  font-weight: 600;
}
.nav nav a { color: var(--ink); text-decoration: none; }
.nav nav a:hover { text-decoration: underline; }
.nav nav .nav-button {
  padding: 9px 13px;
  border: 1px solid #b8cce1;
  border-radius: 6px;
  color: var(--blue);
  white-space: nowrap;
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: max(560px, calc(100svh - 70px));
  padding: 72px var(--gutter);
  color: #fff;
  background: #233e56;
}
.hero-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  overflow: hidden;
}
.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% center;
  animation: settle 4.5s ease-out both;
}
.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgb(11 32 52 / 74%), rgb(11 32 52 / 67%) 58%, rgb(11 32 52 / 79%));
  content: "";
}
@keyframes settle {
  from { transform: scale(1.035); }
  to { transform: scale(1); }
}
.hero-copy {
  width: min(100%, 720px);
  text-align: center;
}
h1, h2, h3, p { margin: 0; }
h1 {
  font-size: clamp(38px, 6vw, 66px);
  font-weight: 720;
  letter-spacing: -.05em;
  line-height: 1.04;
  text-wrap: balance;
}
.intro {
  max-width: 530px;
  margin: 18px auto 30px;
  color: #eef5fc;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  text-wrap: pretty;
}
.lookup {
  width: min(100%, 654px);
  margin-inline: auto;
  padding: clamp(16px, 3vw, 24px);
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 36px rgb(13 31 48 / 22%);
  color: var(--ink);
  text-align: left;
  scroll-margin-top: 20px;
}
.field-label, .manual label {
  display: block;
  font-size: 14px;
  font-weight: 650;
}
.field-label { margin-bottom: 8px; }
.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}
.address-field { position: relative; min-width: 0; }
.search-icon {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 14px;
  height: 14px;
  border: 1.7px solid #52697e;
  border-radius: 50%;
  pointer-events: none;
}
.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 6px;
  height: 1.7px;
  background: #52697e;
  transform: rotate(45deg);
  content: "";
}
.lookup input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid #aebfd0;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
.lookup input::placeholder { color: #586a7b; }
#address { padding-left: 43px; }
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.primary:hover { background: var(--blue-hover); }
.primary:disabled { opacity: .65; cursor: wait; }
.search-options { margin-top: 10px; }
.text-button {
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.suggestions {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 6px) 0 auto;
  max-height: 230px;
  overflow: auto;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 25px rgb(18 40 64 / 16%);
  list-style: none;
}
.suggestions li { padding: 9px 12px; border-radius: 4px; cursor: pointer; }
.suggestions li:hover, .suggestions [aria-selected="true"] { background: #eaf2fc; }
.suggestions strong, .suggestions small { display: block; }
.suggestions small { margin-top: 2px; color: var(--muted); }
.manual {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.manual input { margin-top: 5px; }
.form-status { margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.form-status:empty { display: none; }
.partner { margin-top: 20px; color: #f0f6fc; font-size: 14px; line-height: 1.5; }
.partner a { color: #fff; font-weight: 650; }

.section {
  max-width: var(--width);
  margin-inline: auto;
  padding: clamp(42px, 7vw, 86px) var(--gutter);
  scroll-margin-top: 12px;
}
.section-heading { margin-bottom: 24px; }
h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.13;
  text-wrap: balance;
}
h3 { font-size: 18px; letter-spacing: -.02em; line-height: 1.3; }
.section-heading p, .step p, .review-copy p, .review-list ul, .questions details p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}
.step p { font-size: 15px; }
.review { border-block: 1px solid var(--line); background: var(--paper); }
.review-inner {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: 32px;
}
.review-copy p { max-width: 540px; }
.review-copy .primary { margin-top: 20px; }
.review-list {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.review-list ul { margin-bottom: 0; padding-left: 18px; font-size: 15px; }
.questions details {
  max-width: 820px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}
.questions details:last-child { border-bottom: 1px solid var(--line); }
.questions summary { font-weight: 650; }
.questions summary::marker { color: var(--blue); }
.questions details p { max-width: 65ch; }

.results {
  border-block: 1px solid var(--line);
  background: var(--paper);
  scroll-margin-top: 12px;
}
.results-inner { padding-block: clamp(26px, 4.2vw, 54px); }
.result-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
}
.result-heading h2 { overflow-wrap: anywhere; }
.result-label {
  margin-bottom: 5px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 650;
}
#result-address { margin-top: 4px; color: var(--muted); }
.new-search { padding-block: 6px; font-size: 14px; font-weight: 650; }

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
  align-items: start;
  gap: 16px;
}
.result-layout:has(.aerial[hidden]) { grid-template-columns: minmax(0, 1fr); }
.result-overview, .aerial, .permit-register {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.result-overview { padding: clamp(16px, 2.4vw, 24px); }
.result-state { color: var(--muted); font-size: 14px; line-height: 1.5; }
.result-state strong { display: block; color: var(--ink); font-size: 18px; line-height: 1.3; }
.result-state .result-count { font-size: 24px; letter-spacing: -.035em; }
.result-state p { margin-top: 4px; }
.permit-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 144px), 1fr));
  gap: 8px;
  margin: 16px 0 0;
}
.permit-highlights div {
  padding: 11px 12px;
  border-radius: 7px;
  background: var(--paper);
  overflow-wrap: anywhere;
}
.permit-highlights dt { color: var(--muted); font-size: 13px; }
.permit-highlights dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}
.result-coverage { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.result-coverage:empty { display: none; }
.result-coverage p + p { margin-top: 5px; }
.local-source { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.local-source a { font-weight: 600; }

.aerial { margin: 0; overflow: hidden; }
.aerial img { display: block; width: 100%; height: auto; background: var(--paper); }
.aerial figcaption {
  position: relative;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.aerial figcaption > div { padding-right: 44px; }
.aerial strong { color: var(--ink); }
#aerial-date { display: block; font-size: 12px; }
.aerial-info summary {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 700;
  list-style: none;
}
.aerial-info summary::-webkit-details-marker { display: none; }
.aerial-info summary:hover { background: var(--paper); }
.aerial-info p { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.permit-register { margin-top: 16px; overflow: hidden; }
.register-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.permit-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.permit-filters button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.permit-filters button:hover { background: var(--paper); }
.permit-filters button[aria-pressed="true"] {
  border-color: #a7c4e3;
  background: #eaf3fd;
  color: var(--blue-hover);
}
.filter-count { color: var(--muted); font-variant-numeric: tabular-nums; }

.permit-table { width: 100%; border-collapse: collapse; text-align: left; }
.permit-table th, .permit-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.permit-table thead { background: #f8fafc; color: var(--muted); font-size: 13px; }
.permit-table thead th:first-child { width: 37%; }
.permit-table thead th:nth-child(2) { width: 25%; }
.permit-table thead th:last-child { width: 130px; }
.permit-table tbody { font-size: 14px; line-height: 1.4; }
.permit-table tbody tr:hover { background: #f8fafc; }
.permit-work { font-weight: 400; }
.permit-name, .permit-meta, .permit-equipment, .permit-authority { display: block; }
.permit-name { font-size: 15px; font-weight: 700; }
.permit-meta { color: var(--muted); font-size: 13px; font-weight: 400; }
.permit-name + .permit-meta, .permit-authority + .permit-meta { margin-top: 3px; }
.permit-equipment { margin-top: 4px; color: var(--blue-hover); font-size: 13px; }
.permit-event { display: flex; flex-wrap: wrap; gap: 0 7px; }
.permit-event span { color: var(--muted); font-size: 13px; }
.permit-event time { font-size: 13px; font-variant-numeric: tabular-nums; }
.permit-action a {
  display: inline-block;
  padding: 1px 0;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.result-note { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 850px) {
  .result-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 265px); }
}
@media (max-width: 720px) {
  .results-inner { display: flex; flex-direction: column; }
  .result-layout { display: contents; }
  .aerial { order: 1; width: min(100%, 420px); margin-top: 16px; }
  .result-note { order: 2; }
  .permit-highlights { grid-template-columns: 1fr; gap: 0; border-radius: 7px; background: var(--paper); }
  .permit-highlights div {
    display: grid;
    grid-template-columns: minmax(0, 75px) minmax(0, 1fr);
    align-items: baseline;
    gap: 8px;
    padding: 8px 11px;
    border-radius: 0;
    background: transparent;
  }
  .permit-highlights div + div { border-top: 1px solid var(--line); }
  .permit-highlights dd { margin: 0; }
  .permit-filters { gap: 5px; }
  .permit-filters button { padding-inline: 8px; }
  .permit-table, .permit-table tbody { display: block; }
  .permit-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .permit-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 6px 14px;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
  }
  .permit-table tbody th, .permit-table tbody td { padding: 0; border: 0; }
  .permit-work { grid-column: 1; grid-row: 1; }
  .permit-dates, .permit-source { grid-column: 1 / -1; }
  .permit-action { grid-column: 2; grid-row: 1; }
  .permit-source .permit-authority, .permit-source .permit-meta { display: inline; }
  .permit-source .permit-meta::before { content: " · "; }
}
.footer {
  padding-block: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer .brand { font-size: 16px; }

@media (max-width: 720px) {
  .steps, .review-inner { grid-template-columns: 1fr; }
  .steps { gap: 20px; }
}
@media (max-width: 500px) {
  .nav { min-height: 62px; }
  .nav .brand { gap: 6px; font-size: 17px; }
  .nav .brand img { width: 27px; height: 27px; }
  .nav nav a:first-child { display: none; }
  .hero { min-height: max(510px, calc(100svh - 62px)); padding-block: 42px; }
  .search-bar { grid-template-columns: 1fr; }
  .search-options { text-align: center; }
  .footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo { animation: none; }
}

.source-checks { margin-top: 10px; }
.source-checks summary { color: var(--blue); font-weight: 600; }
.source-check { margin-top: 10px; }
.source-check p { margin-top: 3px; }
.coverage-link { display: inline-block; margin-top: 10px; font-size: 13px; }

.coverage-page h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.13; }
.coverage-intro { max-width: 760px; margin-top: 16px; color: var(--muted); line-height: 1.6; }
.coverage-total { margin-top: 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.coverage-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-block: 24px 16px;
}
.coverage-controls label { font-size: 14px; font-weight: 650; }
.coverage-controls input, .coverage-controls select {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid #aebfd0;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
#coverage-status { margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.coverage-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.coverage-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.5; }
.coverage-table th, .coverage-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); }
.coverage-table thead { background: var(--paper); color: var(--muted); font-size: 13px; }
.coverage-table tbody th { font-weight: 600; }
.coverage-table tbody tr:last-child th, .coverage-table tbody tr:last-child td { border-bottom: 0; }
.coverage-table .direct-connection { color: var(--blue-hover); font-weight: 600; }
.coverage-table a { white-space: nowrap; }
@media (max-width: 720px) {
  .coverage-controls { grid-template-columns: minmax(0, 1fr); }
  .coverage-table { min-width: 620px; }
}
