:root {
  --dark: #121111;
  --cream: #edebe7;
  --cream-50: #edebe780;
  --mid: #626262;
  --mid-50: #62626280;
  --gold: #be7d15;
  --border: #1211110d;
  --white: #ffffff;
  --red: #b5301b;
  --red-soft: #b5301b18;
  --amber: #a16207;
  --amber-soft: #a1620718;
  --green: #2d7a3a;
  --green-soft: #2d7a3a18;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--cream);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.nav-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dark);
  background: var(--white);
  padding: 8px 20px;
  border-radius: 100px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s;
}
.nav-pill:hover { background: var(--cream); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 32px 80px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mid);
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3.8rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.04em;
  line-height: 1.05;
  max-width: 680px;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--mid);
  line-height: 1.6;
  max-width: 440px;
  margin-bottom: 40px;
}

.search-area {
  width: 100%;
  max-width: 480px;
  position: relative;
}
.search-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 100px;
  border: 1px solid var(--border);
  padding: 6px 6px 6px 24px;
  box-shadow: 0 2px 8px rgba(18,17,17,0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.search-bar:focus-within {
  border-color: var(--mid-50);
  box-shadow: 0 4px 16px rgba(18,17,17,0.08);
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--dark);
  background: transparent;
  padding: 8px 0;
}
.search-bar input::placeholder { color: var(--mid-50); font-weight: 400; }
.search-bar button {
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 14px 26px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.search-bar button:hover { opacity: 0.85; }

/* Autocomplete dropdown — custom UI powered by Google Places Data API */
.autocomplete {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(18,17,17,0.08);
  overflow: hidden;
  z-index: 10;
}
.autocomplete.show { display: block; }
.autocomplete-item {
  padding: 14px 24px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--dark);
  transition: background 0.15s;
}
.autocomplete-item:hover { background: var(--cream); }
.autocomplete-item .secondary {
  color: var(--mid);
  font-size: 0.78rem;
  margin-top: 2px;
}

/* ── LOADING ── */
.loading {
  display: none;
  text-align: center;
  padding: 64px 32px;
}
.loading.show { display: block; }
.spinner {
  width: 24px; height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 0.85rem; font-weight: 500; color: var(--mid); }
.loading-sub { font-size: 0.78rem; color: var(--mid-50); margin-top: 4px; }

/* ── REPORT ── */
.report {
  display: none;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 32px 120px;
}
.report.visible { display: block; }

.rpt-header {
  text-align: center;
  padding: 80px 0 64px;
}
.rpt-eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mid);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}
.rpt-addr {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--dark);
  margin-bottom: 8px;
}
.rpt-meta {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--mid-50);
}

/* Big score */
.score {
  text-align: center;
  padding: 0 0 80px;
}
.score-num {
  font-size: 9rem;
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--dark);
}
.score-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 8px;
}
.score-desc {
  max-width: 440px;
  margin: 28px auto 0;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--mid);
  line-height: 1.7;
}
.score-desc strong { color: var(--dark); font-weight: 600; }

/* Risk bars */
.risk-bars {
  padding: 48px 0;
  max-width: 520px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.risk-row { margin-bottom: 24px; }
.risk-row:last-child { margin-bottom: 0; }
.risk-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.risk-name { font-size: 0.92rem; font-weight: 600; color: var(--dark); }
.risk-level {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.risk-level.high { color: var(--red); }
.risk-level.moderate { color: var(--amber); }
.risk-level.poor { color: var(--amber); }
.risk-level.low { color: var(--green); }
.risk-level.good { color: var(--green); }
.risk-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.risk-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s cubic-bezier(0.25, 1, 0.5, 1);
}
.risk-fill.red { background: var(--red); }
.risk-fill.amber { background: var(--amber); }
.risk-fill.green { background: var(--green); }

/* Verdict */
.verdict {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 0 56px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}
.verdict-box {
  padding: 28px 32px;
  border-radius: 0 16px 16px 0;
}
.verdict-box.red { background: var(--red-soft); border-left: 3px solid var(--red); }
.verdict-box.amber { background: var(--amber-soft); border-left: 3px solid var(--amber); }
.verdict-box.green { background: var(--green-soft); border-left: 3px solid var(--green); }
.verdict-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.verdict-box.red .verdict-title { color: var(--red); }
.verdict-box.amber .verdict-title { color: var(--amber); }
.verdict-box.green .verdict-title { color: var(--green); }
.verdict-body {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--mid);
  line-height: 1.75;
}
.verdict-body strong { color: var(--dark); font-weight: 600; }

/* Sections */
.section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.section-head {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.03em;
  margin-bottom: 36px;
}

/* Data rows */
.d-row {
  display: flex;
  align-items: baseline;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.d-row:first-child { border-top: 1px solid var(--border); }
.d-key {
  width: 180px;
  flex-shrink: 0;
  font-weight: 600;
  color: var(--dark);
}
.d-val { flex: 1; color: var(--mid); font-weight: 400; }
.d-val strong { color: var(--dark); font-weight: 600; }
.d-note {
  display: block;
  font-size: 0.82rem;
  color: var(--mid-50);
  margin-top: 4px;
}

/* Tags */
.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  border-radius: 100px;
  margin-left: 10px;
  vertical-align: middle;
}
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.green { background: var(--green-soft); color: var(--green); }

/* Timeline */
.tl-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.tl-item:first-child { border-top: 1px solid var(--border); }
.tl-item:last-child { border-bottom: none; }
.tl-date { font-size: 0.82rem; font-weight: 600; color: var(--mid-50); }
.tl-title { font-size: 0.95rem; font-weight: 600; color: var(--dark); margin-top: 4px; }
.tl-detail { font-size: 0.85rem; color: var(--mid); margin-top: 4px; line-height: 1.5; }

/* Bottom numbers */
.numbers {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
}
.num-label { font-size: 0.78rem; font-weight: 600; color: var(--mid); margin-bottom: 12px; }
.num-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  line-height: 1;
}
.num-desc { font-size: 0.85rem; font-weight: 400; color: var(--mid); line-height: 1.6; }

/* Email capture */
.email-capture {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 56px 0;
  border-top: 1px solid var(--border);
}
.email-capture-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.02em;
}
.email-capture-sub {
  font-size: 0.92rem;
  color: var(--mid);
  max-width: 360px;
  text-align: center;
  line-height: 1.6;
}
.email-bar {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 100px;
  border: 1px solid var(--border);
  padding: 6px 6px 6px 24px;
  box-shadow: 0 2px 8px rgba(18,17,17,0.04);
  width: 100%;
  max-width: 420px;
}
.email-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--dark);
  background: transparent;
  padding: 8px 0;
}
.email-bar input::placeholder { color: var(--mid-50); font-weight: 400; }
.email-bar button {
  background: var(--dark);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 14px 26px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.email-bar button:hover { opacity: 0.85; }
.email-success {
  display: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--green);
}

/* Provenance */
.provenance {
  padding: 56px 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--mid-50);
  line-height: 1.7;
  max-width: 520px;
  text-align: center;
  margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 810px) {
  nav { padding: 14px 24px; }
  .hero { padding: 100px 24px 64px; }
  .hero h1 { font-size: 2.6rem; }
  .report { padding: 0 24px 80px; }
  .rpt-addr { font-size: 1.8rem; }
  .rpt-header { padding: 56px 0 48px; }
  .score-num { font-size: 6rem; }
  .score { padding: 0 0 56px; }
  .section-head { font-size: 1.4rem; }
  .numbers { grid-template-columns: 1fr; gap: 32px; }
  .d-row { flex-direction: column; gap: 4px; }
  .d-key { width: auto; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .rpt-addr { font-size: 1.4rem; }
  .score-num { font-size: 4.5rem; }
  .section-head { font-size: 1.2rem; }
  .num-val { font-size: 1.8rem; }
  .search-bar { border-radius: 16px; padding: 4px 4px 4px 18px; }
  .search-bar button { border-radius: 12px; padding: 12px 20px; }
  .email-bar { border-radius: 16px; padding: 4px 4px 4px 18px; }
  .email-bar button { border-radius: 12px; padding: 12px 20px; }
}
