:root {
  --ink: #07111f;
  --ink-soft: #122235;
  --blue: #178cea;
  --blue-bright: #37a8ff;
  --ice: #eaf7ff;
  --silver: #a9b6c5;
  --muted: #647185;
  --line: #dbe3ec;
  --white: #ffffff;
  --success: #168c58;
  --success-bg: #e8f8ef;
  --outside: #c83e3e;
  --outside-bg: #fff0f0;
  --radius-lg: 28px;
  --shadow: 0 28px 80px rgba(0, 24, 56, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(43, 159, 255, 0.12), transparent 24rem),
    linear-gradient(180deg, #f8fbfe 0%, #eef4f9 68%, #e8eef4 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  transform: translateY(-150%);
  padding: 10px 16px;
  border-radius: 8px;
  color: #fff;
  background: #07111f;
}

.skip-link:focus { transform: none; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 2px solid #1c9fff;
  border-radius: 50%;
  background: linear-gradient(145deg, #101e30, #020813);
  box-shadow: inset 0 0 0 4px #d8e2ec, 0 8px 24px rgba(0, 77, 142, 0.2);
}

.brand-mark svg { width: 28px; fill: none; stroke: #63c2ff; stroke-linecap: round; stroke-width: 2; }
.brand strong { display: block; font-size: 0.86rem; letter-spacing: 0.12em; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

.header-call {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: var(--ink);
  text-decoration: none;
}

.header-call span { color: var(--muted); font-size: 0.74rem; }
.header-call strong { margin-top: 2px; color: var(--blue); font-size: 0.94rem; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero { max-width: 790px; padding: 66px 0 44px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #1778c5;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow span { width: 22px; height: 2px; background: var(--blue); }

h1 {
  max-width: 760px;
  margin: 18px 0 20px;
  color: var(--ink);
  font-size: clamp(2.5rem, 6vw, 5.2rem);
  font-weight: 760;
  letter-spacing: -0.058em;
  line-height: 0.98;
}

h1 em { color: var(--blue); font-style: normal; }
.hero > p { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.7; }

.checker-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(460px, 1.1fr);
  align-items: center;
  overflow: hidden;
  min-height: 630px;
  border: 1px solid rgba(127, 150, 175, 0.22);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.checker-panel { padding: clamp(28px, 4vw, 52px); }

.form-heading { display: flex; align-items: center; gap: 15px; }
.step-badge { display: grid; flex: 0 0 44px; height: 44px; place-items: center; border: 1px solid #9cd5ff; border-radius: 50%; color: #087bcc; background: #edf8ff; font-size: 0.75rem; font-weight: 800; }
h2 { margin: 0; font-size: 1.44rem; letter-spacing: -0.025em; }
.form-heading p { margin: 5px 0 0; color: var(--muted); font-size: 0.86rem; }

form { margin-top: 35px; }
label { display: block; margin-bottom: 10px; font-size: 0.82rem; font-weight: 750; }

.input-wrap { position: relative; }
.input-wrap svg { position: absolute; top: 50%; left: 16px; width: 20px; transform: translateY(-50%); fill: none; stroke: #748399; stroke-width: 1.7; }
input {
  width: 100%;
  height: 58px;
  padding: 0 16px 0 48px;
  border: 1.5px solid #cad5e1;
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #fbfdff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(23, 140, 234, 0.13); }
input::placeholder { color: #91a0b2; }
.field-help { margin: 10px 0 0; color: #788698; font-size: 0.74rem; line-height: 1.45; }

.primary-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 58px;
  margin-top: 20px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, #0d79d1, #1b9cf5);
  box-shadow: 0 12px 24px rgba(20, 139, 226, 0.24);
  cursor: pointer;
  font-weight: 780;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button:hover { transform: translateY(-1px); box-shadow: 0 15px 30px rgba(20, 139, 226, 0.3); }
.primary-button:focus-visible { outline: 3px solid #9ed7ff; outline-offset: 3px; }
.primary-button:disabled { cursor: wait; opacity: 0.75; transform: none; }
.primary-button svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
.primary-button.is-loading svg { animation: nudge 900ms infinite alternate ease-in-out; }

.result {
  display: flex;
  gap: 14px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #dbe6ef;
  border-radius: 15px;
  background: #f6f9fc;
}

.result-icon { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border-radius: 50%; color: #547087; background: #e5edf4; }
.result-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.result strong { display: block; margin-top: 1px; font-size: 0.9rem; }
.result p { margin: 5px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.result--success { border-color: #acdec5; background: var(--success-bg); }
.result--success .result-icon { color: #fff; background: var(--success); }
.result--success strong { color: #0d7043; }
.result--outside { border-color: #f0baba; background: var(--outside-bg); }
.result--outside .result-icon { color: #fff; background: var(--outside); }
.result--outside strong { color: #a92f2f; }
.result--error { border-color: #efc575; background: #fff8e9; }
.result--error .result-icon { color: #fff; background: #c78000; }
.distance-pill, .matched-address, .result-call { display: block; }
.distance-pill { margin-bottom: 4px; font-weight: 750; }
.matched-address { color: #627083; }
.result-call { margin-top: 7px; color: #a92f2f; font-weight: 750; }

.service-note { display: flex; gap: 13px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.note-icon { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border: 2px solid #9aa9b9; border-radius: 50%; color: #53657a; font-size: 0.69rem; font-weight: 850; }
.service-note p { margin: 0; color: var(--muted); font-size: 0.76rem; line-height: 1.55; }
.service-note strong { color: var(--ink-soft); }

.map-panel {
  position: relative;
  width: min(calc(100% - 56px), 560px);
  aspect-ratio: 1;
  justify-self: center;
  overflow: hidden !important;
  margin: 32px 28px 32px 0;
  border: 0;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  contain: paint;
  isolation: isolate;
  background: transparent;
  box-shadow: 0 24px 55px rgba(7, 29, 53, 0.2);
}
#service-area-map {
  display: block;
  width: 100%;
  height: 100%;
}
.map-road { fill: none; stroke: #aebdca; stroke-linecap: round; stroke-width: 3; }
.map-road--major { stroke: #92a8b8; stroke-width: 5; }
.map-river { fill: none; stroke: url(#river-fill); stroke-linecap: round; stroke-width: 13; opacity: 0.88; }
.map-river--south { stroke-width: 9; }
.state-line { fill: none; stroke: #71879a; stroke-dasharray: 8 8; stroke-width: 2; }
.state-name { fill: #7c91a2; font-size: 14px; font-weight: 850; letter-spacing: 0.22em; opacity: 0.72; }
.city-label circle { fill: #07111f; }
.city-label text { fill: #07111f; font-size: 16px; font-weight: 800; paint-order: stroke; stroke: #f2f8fc; stroke-width: 5px; stroke-linejoin: round; }
.city-label--small text { fill: #34495b; font-size: 12px; font-weight: 700; stroke-width: 4px; }
.shop-map-marker circle { fill: #07111f; stroke: #fff; stroke-width: 4; }
.shop-map-marker path { fill: none; stroke: #5bc0ff; stroke-linecap: round; stroke-width: 3; }
.service-boundary { fill: none; stroke: #168cea; stroke-width: 12; }
.radius-label rect { fill: #07111f; stroke: #58b9ff; stroke-width: 2; }
.radius-label text { fill: #fff; font-size: 12px; font-weight: 850; letter-spacing: 0.12em; }
#result-map-line { stroke-dasharray: 6 7; stroke-linecap: round; stroke-width: 3; opacity: 0.85; }
#result-map-marker { display: none; filter: url(#marker-shadow); }
.result-map-marker-ring { fill: #fff; stroke: #fff; stroke-width: 3; }
.result-map-marker-dot { fill: #168c58; }
#result-map-label { font-size: 11px; font-weight: 900; letter-spacing: 0.07em; paint-order: stroke; stroke: #fff; stroke-width: 5px; stroke-linejoin: round; }

.confidence-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 38px 0 0;
  overflow: hidden;
  border: 1px solid rgba(127, 150, 175, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.confidence-strip > div, .confidence-strip > a { display: flex; min-height: 94px; align-items: center; justify-content: center; gap: 12px; padding: 18px; border-right: 1px solid var(--line); text-decoration: none; }
.confidence-strip > :last-child { border-right: 0; color: #fff; background: var(--ink); }
.confidence-strip span:last-child { font-size: 0.76rem; font-weight: 700; line-height: 1.45; }
.confidence-strip .number { color: var(--blue); font-size: 1.65rem; font-weight: 820; letter-spacing: -0.05em; }
.confidence-strip .icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--blue); background: #e8f5ff; font-weight: 900; }
.confidence-strip a .icon { color: #fff; background: var(--blue); }
.confidence-strip small { color: #9fb2c6; font-size: 0.66rem; font-weight: 500; }

footer { display: flex; justify-content: space-between; gap: 30px; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 44px; color: #798697; font-size: 0.7rem; }
footer p { margin: 0; }

@keyframes nudge { to { transform: translateX(4px); } }

@media (max-width: 880px) {
  .hero { padding-top: 44px; }
  .checker-shell { grid-template-columns: 1fr; }
  .map-panel { width: min(calc(100% - 48px), 560px); margin: 10px auto 34px; }
  .confidence-strip { grid-template-columns: repeat(2, 1fr); }
  .confidence-strip > :nth-child(2) { border-right: 0; }
  .confidence-strip > :nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 28px, 1180px); }
  .site-header { padding: 16px 0; }
  .brand-mark { width: 44px; height: 44px; }
  .brand strong { font-size: 0.7rem; letter-spacing: 0.08em; }
  .brand small { font-size: 0.58rem; }
  .header-call span { display: none; }
  .header-call strong { padding: 9px 11px; border: 1px solid #b8ddf8; border-radius: 9px; font-size: 0.75rem; }
  .hero { padding: 38px 0 30px; }
  h1 { font-size: clamp(2.45rem, 13vw, 3.6rem); }
  .hero > p { font-size: 0.95rem; line-height: 1.6; }
  .checker-shell { border-radius: 20px; }
  .checker-panel { padding: 26px 20px 30px; }
  .form-heading { align-items: flex-start; }
  .form-heading p { line-height: 1.4; }
  form { margin-top: 28px; }
  input { font-size: 0.93rem; }
  .map-panel { width: calc(100% - 28px); margin: 6px auto 26px; border-width: 5px; }
  .confidence-strip { grid-template-columns: 1fr; }
  .confidence-strip > div, .confidence-strip > a { min-height: 80px; justify-content: flex-start; padding-left: 28px; border-right: 0; border-bottom: 1px solid var(--line); }
  .confidence-strip > :nth-child(3) { border-bottom: 1px solid var(--line); }
  footer { flex-direction: column; padding: 28px 0 34px; line-height: 1.55; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
