/* Ironwood Development Partners — Market Lookup
   Brand: navy #15202A, red #C82032, white #FFFFFF; Red Hat Display. */

:root {
  --navy: #15202A;
  --navy-2: #1d2c39;
  --red: #C82032;
  --red-dark: #a81a2a;
  --white: #FFFFFF;
  --bg: #eceef0;
  --card: #FFFFFF;
  --line: #dce0e4;
  --ink: #15202A;
  --muted: #5d6b76;
  --green: #1f8a55;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(21, 32, 42, .08), 0 6px 20px rgba(21, 32, 42, .06);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Red Hat Display", -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

a { color: var(--red); }

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

main.container { flex: 1 0 auto; padding-top: 32px; padding-bottom: 48px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-header__brand { display: flex; align-items: center; }
.site-header__logo { height: 38px; width: auto; display: block; }
.logout-link {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  text-decoration: none;
}
.logout-link:hover { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer {
  flex-shrink: 0;
  background: var(--navy);
  color: rgba(255, 255, 255, .55);
  padding: 20px 0;
  font-size: .78rem;
}
.site-footer p { margin: 0; }

/* ---------- Hero ---------- */
.eyebrow {
  margin: 0 0 6px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red);
}
.hero { margin-bottom: 24px; }
.hero__title {
  margin: 0 0 10px;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--navy);
}
.hero__lead {
  margin: 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Panels ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}
.panel--search { padding: 18px 24px; margin-bottom: 28px; }

/* ---------- Search form ---------- */
.search-form__row {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}
.search-form__location { flex: 1 1 auto; }
.search-form__submit { flex: 0 0 auto; }
.search-form__hint {
  margin: 12px 0 0;
  font-size: .85rem;
  color: var(--muted);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: .76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #c4cad0;
  border-radius: 8px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.text-input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 32, 50, .14);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .12s ease, transform .04s ease;
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-dark); }
.btn--primary:active { transform: translateY(1px); }
.btn--block { width: 100%; }

/* ---------- Alerts ---------- */
.alert {
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: .92rem;
}
.alert--error {
  background: #fdecee;
  border: 1px solid #f3b9c0;
  color: var(--red-dark);
}

/* ---------- Login ---------- */
.login-body {
  background: var(--navy);
  background-image: radial-gradient(
    ellipse at 50% 0%, #21323f 0%, var(--navy) 62%);
  align-items: center;
  justify-content: center;
}
.login-wrap {
  margin: auto;
  padding: 40px 24px;
  width: 100%;
  max-width: 380px;
  text-align: center;
}
.login-logo { width: 168px; height: auto; margin-bottom: 28px; }
.login-card {
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 30px 28px;
  text-align: left;
}
.login-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
}
.login-sub {
  margin: 2px 0 22px;
  font-size: .85rem;
  color: rgba(255, 255, 255, .55);
}
.login-form .field-label { color: rgba(255, 255, 255, .6); }
.login-form .text-input {
  background: #16222d;
  border-color: #33444f;
  color: var(--white);
  margin-bottom: 18px;
}
.login-foot {
  margin: 22px 0 0;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .35);
}

/* ---------- Result: location card ---------- */
.result { margin-top: 4px; }
.location-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
}
.location-card .eyebrow { color: #f08a95; }
.location-card__name {
  margin: 0 0 6px;
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.25;
}
.location-card__meta {
  margin: 0;
  font-size: .95rem;
  color: rgba(255, 255, 255, .7);
}
.location-card__meta .dot { margin: 0 8px; color: rgba(255, 255, 255, .35); }
.location-card__note {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
}

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}
.card--compare { margin-bottom: 22px; }
.card__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card__subtitle {
  margin: 2px 0 16px;
  font-size: .82rem;
  color: var(--muted);
}
.count-badge {
  font-size: .72rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--muted);
  border-radius: 20px;
  padding: 3px 10px;
}

/* ---------- Data tables ---------- */
.table-scroll { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.data-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 2px solid var(--line);
}
.data-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.trend--up { color: var(--green); }
.trend--down { color: var(--red); }
.trend--flat { color: var(--muted); }

/* ---------- Comparison table (1 / 3 / 5 mi) ---------- */
.compare-table th:first-child,
.compare-table td:first-child { width: 34%; }
.compare-table thead th.num { width: 22%; }
.compare-table tbody td:first-child {
  color: var(--muted);
  font-size: .88rem;
}
.compare-table tbody td.num {
  font-weight: 700;
  font-size: .98rem;
}
.compare-table tbody tr:hover td { background: #f6f7f8; }

.empty { color: var(--muted); font-size: .9rem; font-style: italic; }

/* ---------- Full detail ---------- */
.detail { margin-top: 2px; }
.detail__toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  user-select: none;
}
.detail__toggle::-webkit-details-marker { display: none; }
.detail__toggle::before {
  content: "+";
  font-size: 1.1rem;
  line-height: 1;
}
.detail[open] .detail__toggle::before { content: "\2212"; }
.detail__toggle-close { display: none; }
.detail[open] .detail__toggle-open { display: none; }
.detail[open] .detail__toggle-close { display: inline; }

.detail__body {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- Map ---------- */
.map-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-top: 22px;
}
.map {
  width: 100%;
  height: 480px;
  border-radius: 8px;
  margin-top: 12px;
  background: #e6e9ec;
}
.legend-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 4px 1px 4px;
  border: 1px solid rgba(0, 0, 0, .15);
}
.legend-dot--subject  { background: #FFD400; }
.legend-dot--existing { background: var(--green); }
.legend-dot--future   { background: var(--red); }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .hero__title { font-size: 2rem; }
  .search-form__row { flex-direction: column; align-items: stretch; }
  .btn--primary { width: 100%; }
  .site-header__logo { height: 32px; }
  .compare-table { font-size: .85rem; }
}
