:root {
  --ink: #17211d;
  --muted: #617068;
  --paper: #f7f8f3;
  --card: rgba(255, 255, 252, .88);
  --line: #dce2db;
  --green: #087c61;
  --green-dark: #075844;
  --lime: #c8f17e;
  --orange: #ff9f62;
  --shadow: 0 24px 70px rgba(26, 52, 42, .11);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .28;
  pointer-events: none;
}

.ambient-one { top: -18rem; right: -10rem; background: radial-gradient(circle, var(--lime), transparent 68%); }
.ambient-two { top: 35rem; left: -24rem; background: radial-gradient(circle, #a4ddd0, transparent 69%); }

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  color: white;
  background: var(--ink);
  border-radius: 10px 10px 10px 3px;
  font-family: Georgia, serif;
  font-size: 21px;
}

.status-pill,
.source-badge,
.verified-badge,
.result-source {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
}

.status-pill { gap: 8px; padding: 8px 12px; color: var(--green-dark); background: #e8f4ed; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #28a774; box-shadow: 0 0 0 4px rgba(40, 167, 116, .13); }

.hero { padding: 80px 0 54px; text-align: center; }

.eyebrow {
  color: var(--green);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .17em;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 850px;
  margin: 18px auto 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.055em;
}

h1 span { color: var(--green); font-style: italic; }

.hero-copy {
  max-width: 690px;
  margin: 0 auto 38px;
  color: var(--muted);
  font-size: clamp(16px, 2vw, 19px);
}

.search-card,
.result-card,
.helper-card {
  border: 1px solid rgba(207, 216, 207, .9);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-card {
  max-width: 900px;
  margin-inline: auto;
  padding: 20px;
  border-radius: 23px;
  text-align: left;
}

.search-card label { display: block; margin: 0 0 9px 3px; font-size: 13px; font-weight: 750; }
.input-row { display: flex; gap: 10px; }

.url-input-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  transition: border-color .2s, box-shadow .2s;
}

.url-input-wrap:focus-within { border-color: #48a991; box-shadow: 0 0 0 4px rgba(35, 139, 111, .11); }
.url-input-wrap svg { width: 21px; fill: none; stroke: #809087; stroke-width: 1.7; stroke-linecap: round; }
.url-input-wrap input { width: 100%; min-width: 0; height: 54px; border: 0; outline: 0; color: var(--ink); background: transparent; font: inherit; }
.url-input-wrap input::placeholder { color: #a0aaa4; }

button { font: inherit; }

.primary-button,
.secondary-button,
.text-button {
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 780;
  transition: transform .18s, background .18s, box-shadow .18s;
}

.primary-button { min-width: 150px; padding: 0 22px; color: #fff; background: var(--green); box-shadow: 0 9px 22px rgba(8, 124, 97, .2); }
.primary-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.secondary-button { padding: 12px 17px; color: var(--green-dark); background: #e7f2ed; }
.secondary-button:hover { background: #d9ebe3; transform: translateY(-1px); }
.text-button { padding: 12px 8px; color: var(--muted); background: transparent; }
.text-button:hover { color: var(--ink); }
.compact { min-width: 0; min-height: 42px; padding: 10px 15px; }

.spinner { display: none; width: 18px; height: 18px; margin: auto; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .button-label { display: none; }
.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.supported-row { display: flex; align-items: center; gap: 8px; margin: 13px 3px 0; color: #87928c; font-size: 11px; }
.source-badge { padding: 5px 8px; color: #5e6d65; background: #eef1ed; }

.verified-agencies {
  max-width: 900px;
  margin: 14px auto 0;
  padding: 13px 17px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 252, .64);
  border-radius: 15px;
  text-align: left;
}
.verified-agencies summary { cursor: pointer; color: var(--green-dark); font-size: 13px; font-weight: 780; }
.verified-agencies p { margin: 12px 2px 1px; color: var(--muted); font-size: 12px; }
.agency-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.agency-list span { padding: 6px 9px; color: #506158; background: #edf3ef; border-radius: 999px; font-size: 11px; font-weight: 720; }

.message {
  max-width: 900px;
  margin: 0 auto 20px;
  padding: 15px 18px;
  border: 1px solid #f3c7aa;
  color: #8b4116;
  background: #fff1e7;
  border-radius: 14px;
}

.result-card { max-width: 900px; margin: 14px auto 36px; padding: 28px; border-radius: 24px; }
.result-header { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.result-header h2 { margin: 7px 0 0; font-family: Georgia, serif; font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.result-source { padding: 5px 9px; color: var(--green-dark); background: #e8f4ed; text-transform: uppercase; letter-spacing: .09em; }
.verified-badge { align-self: flex-start; gap: 5px; padding: 8px 11px; color: #176a52; background: #e4f5ec; }
.verified-badge svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2.3; }

.listing-number-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 14px;
  padding: 22px;
  color: #fff;
  background: var(--ink);
  border-radius: 17px;
}

.listing-number-label { color: #9ad5c4; font-size: 11px; font-weight: 850; letter-spacing: .14em; }
.listing-number-value { margin-top: 3px; font-family: Georgia, serif; font-size: clamp(35px, 6vw, 52px); line-height: 1.05; overflow-wrap: anywhere; }
.listing-number-note { max-width: 620px; margin-top: 7px; color: #bbc8c1; font-size: 12px; }
.listing-number-source { display: inline-block; margin-top: 8px; color: #b7eadb; font-size: 12px; font-weight: 750; }
.listing-number-source:hover { color: #fff; }
.listing-number-source[hidden] { display: none; }
.listing-number-panel.is-missing { color: var(--ink); background: #fff1e7; border: 1px solid #f3c7aa; }
.listing-number-panel.is-missing .listing-number-label { color: #9a4b1f; }
.listing-number-panel.is-missing .listing-number-note { color: #76543f; }

.permit-panel { padding: 20px; border: 1px solid #cde0d7; background: #f1f8f4; border-radius: 17px; }
.permit-label { margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 780; }
.permit-link { display: block; color: var(--green-dark); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; overflow-wrap: anywhere; }
.permit-actions { display: flex; gap: 9px; margin-top: 16px; }

.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--line); border-radius: 16px; }
.detail-item { min-height: 93px; padding: 17px; background: #fff; }
.detail-label { margin-bottom: 7px; color: #7a8780; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.detail-value { font-weight: 720; overflow-wrap: anywhere; }

.technical-details { margin-top: 18px; color: var(--muted); font-size: 13px; }
.technical-details summary { cursor: pointer; font-weight: 720; }
.technical-details pre { max-height: 320px; padding: 15px; overflow: auto; color: #d9eee4; background: #17211d; border-radius: 13px; font-size: 11px; }

.helper-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; max-width: 900px; margin: 0 auto 85px; padding: 27px; border-radius: 22px; }
.helper-icon { display: grid; place-items: center; width: 52px; height: 52px; color: #fff; background: linear-gradient(145deg, #d9503f, #ef806d); border-radius: 15px; font-family: Georgia, serif; font-size: 27px; }
.dld-helper-card { margin-bottom: 24px; }
.dld-helper-icon { background: linear-gradient(145deg, var(--green-dark), #1c9b79); }
.helper-content h2 { margin: 7px 0 7px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.helper-content p { max-width: 700px; margin-bottom: 14px; color: var(--muted); }
.helper-actions { display: flex; align-items: center; gap: 10px; }
.instructions { margin-top: 15px; padding: 13px 16px; color: #526159; background: #f2f5f1; border-radius: 12px; font-size: 13px; }
.instructions ol { margin: 0; padding-left: 20px; }
.instructions li + li { margin-top: 5px; }

.how-it-works { padding: 15px 0 100px; }
.section-heading { text-align: center; }
.section-heading h2 { margin: 10px 0 30px; font-family: Georgia, serif; font-size: clamp(34px, 5vw, 49px); font-weight: 500; letter-spacing: -.04em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.steps article { padding: 27px 30px 10px 0; }
.steps article + article { padding-left: 30px; border-left: 1px solid var(--line); }
.steps span { color: var(--green); font-family: Georgia, serif; font-size: 13px; }
.steps h3 { margin: 14px 0 7px; font-size: 17px; }
.steps p { color: var(--muted); font-size: 14px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 0 35px; border-top: 1px solid var(--line); color: #7b8780; font-size: 12px; }

@media (max-width: 760px) {
  .site-header, main, footer { width: min(100% - 24px, 1120px); }
  .status-pill { display: none; }
  .hero { padding-top: 48px; }
  h1 { font-size: clamp(44px, 14vw, 67px); }
  .input-row { flex-direction: column; }
  .primary-button { min-height: 52px; }
  .details-grid, .steps { grid-template-columns: 1fr; }
  .steps article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .result-card { padding: 20px; }
  .result-header { align-items: flex-start; }
  .verified-badge { display: none; }
  .listing-number-panel { align-items: stretch; flex-direction: column; }
  .permit-actions, .helper-actions { align-items: stretch; flex-direction: column; }
  .helper-card { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}
