/* GoneFor — simple, modern, mobile-first. System type, white, one accent. */

:root {
  --ink: #111113;
  --body: #37363b;
  --muted: #6f6e77;
  --faint: #a9a8b0;
  --bg: #ffffff;
  --surface: #f7f7f8;
  --line: #e8e8ea;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --green: #16a34a;
  --green-soft: #f0fdf4;
  --radius: 10px;
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--ui);
  color: var(--body);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 20px 72px;
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}
.logo span { color: var(--accent); }
.site-header { gap: 8px; }
.site-header nav { display: flex; align-items: center; gap: 2px; }
.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 12px;
  white-space: nowrap;
}
.logo { flex-shrink: 0; }
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  border-radius: 999px;
}

/* ---------- Type ---------- */
h1 {
  color: var(--ink);
  font-weight: 750;
  font-size: 1.65rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 26px 0 6px;
}
h2 {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin: 36px 0 12px;
}
.sub { color: var(--muted); margin: 0 0 24px; }
.hint { color: var(--muted); font-weight: 400; font-size: 0.85rem; }
.muted { color: var(--muted); }

/* ---------- Forms ---------- */
.post-form label {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 20px 0 6px;
}
.post-form input[type="text"],
.post-form input[type="email"],
.post-form input[type="url"],
.post-form input[type="date"],
.post-form select {
  width: 100%;
  font-size: 1.02rem;            /* ≥16px stops iOS zoom-on-focus */
  font-family: var(--ui);
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.12s, box-shadow 0.12s;
  appearance: none;
}
.post-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236f6e77' stroke-width='1.7' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.post-form input:focus, .post-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.post-form ::placeholder { color: var(--faint); }
.range-row { display: flex; gap: 10px; align-items: center; }
.range-row input { flex: 1; }
.range-row span { color: var(--faint); }

fieldset.outcome { border: 0; padding: 0; margin: 22px 0 0; }
fieldset.outcome legend {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0;
  margin-bottom: 6px;
}
.segmented {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 4px;
}
.segmented input[type="radio"] { position: absolute; opacity: 0; }
.segmented label {
  flex: 1;
  text-align: center;
  margin: 0;
  padding: 11px 4px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.12s;
}
.segmented input:checked + label {
  background: var(--bg);
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(17, 17, 19, 0.12);
}
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-primary, .btn-secondary {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 650;
  padding: 14px;
  margin-top: 28px;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.12s, transform 0.05s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(79, 70, 229, 0.28); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: var(--bg);
  color: var(--accent);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); }

.fine-print { color: var(--faint); font-size: 0.8rem; text-align: center; margin-top: 14px; }

/* Google sign-in */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 650;
  padding: 13px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(17, 17, 19, 0.08);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.btn-google:hover { border-color: var(--faint); box-shadow: 0 2px 6px rgba(17, 17, 19, 0.12); }
.btn-google svg { flex-shrink: 0; }
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: 0.85rem;
  margin: 18px 0 2px;
}
.or-divider::before, .or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

details.manual-address, details.more-fields { margin-top: 12px; }
details summary {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 6px 0;
}
details summary:hover { color: var(--accent-hover); }

/* ---------- Autocomplete ---------- */
.autocomplete { position: relative; }
.ac-list {
  position: absolute;
  z-index: 10;
  left: 0; right: 0;
  margin: 6px 0 0;
  padding: 5px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(17, 17, 19, 0.08), 0 12px 40px rgba(17, 17, 19, 0.06);
}
.ac-list li { padding: 11px 12px; cursor: pointer; border-radius: 7px; color: var(--ink); }
.ac-list li:hover { background: var(--accent-soft); }

/* ---------- Flashes ---------- */
.flash {
  padding: 12px 15px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 18px 0;
  font-size: 0.93rem;
}
.flash-ok { background: var(--green-soft); border-color: #d1f0dd; color: #14532d; }
.flash-error { background: var(--red-soft); border-color: #f6d5d5; color: var(--red); }

/* ---------- Result page ---------- */
.result-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  margin-top: 20px;
}
.result-card h1 { margin: 0 0 2px; font-size: 1.35rem; }
.result-date { color: var(--muted); margin: 0 0 22px; font-size: 0.88rem; }

.verdict { margin-bottom: 20px; }
.verdict-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.verdict-sold .verdict-label { background: var(--green-soft); color: var(--green); }
.verdict-passed_in .verdict-label, .verdict-withdrawn .verdict-label {
  background: var(--surface); color: var(--muted);
}
.verdict-price {
  display: block;
  font-weight: 800;
  font-size: 2.7rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.verdict-none {
  display: block;
  font-weight: 650;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--muted);
}

/* Quote-vs-sold gap bar */
.gap-viz { margin: 4px 0 22px; }
.gap-track {
  position: relative;
  height: 10px;
  background: var(--surface);
  border-radius: 999px;
  margin: 24px 0 10px;
}
.gap-quote {
  position: absolute;
  top: 0; bottom: 0;
  background: #c7d2fe;
  border-radius: 999px;
}
.gap-sold-marker {
  position: absolute;
  top: -5px;
  width: 3px;
  height: 20px;
  border-radius: 2px;
  background: var(--red);
  transform: translateX(-50%);
}
.gap-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}
.gap-labels .gap-sold-label { color: var(--red); font-weight: 650; }
.gap-callout {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: #3730a3;
}
.gap-callout strong { color: var(--red); font-weight: 750; }
.gap-callout.gap-ok strong { color: var(--green); }

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 18px;
  margin: 0 0 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 600; color: var(--ink); }
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: capitalize;
}
.badge-reported { background: var(--surface); color: var(--muted); }
.badge-verified { background: var(--green-soft); color: var(--green); }
.badge-disputed { background: var(--red-soft); color: var(--red); }
.crowd-photo { width: 100%; border-radius: var(--radius); margin-bottom: 18px; }

/* Vetting votes */
.vote-box {
  margin: 4px 0 6px;
  padding: 16px;
  background: var(--surface);
  border-radius: var(--radius);
}
.vote-q { margin: 0 0 10px; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.vote-box .hint { margin: 10px 0 0; }
.vote-row { display: flex; gap: 10px; }
.vote-row form { flex: 1; display: flex; }
.vote-btn {
  flex: 1;
  display: block;
  text-align: center;
  font-family: var(--ui);
  font-size: 0.95rem;
  font-weight: 650;
  padding: 12px 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.12s;
}
.vote-confirm:hover { border-color: var(--green); color: var(--green); }
.vote-dispute:hover { border-color: var(--red); color: var(--red); }
.vote-confirm.active { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.vote-dispute.active { background: var(--red-soft); border-color: var(--red); color: var(--red); }

/* ---------- Home ---------- */
.hero { padding: 36px 0 12px; text-align: center; }
.hero h1 { font-size: 2rem; margin-bottom: 10px; }
.hero .sub { max-width: 26rem; margin-left: auto; margin-right: auto; }
.hero .btn-primary { max-width: 240px; margin-left: auto; margin-right: auto; }

.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--body);
}
.result-list li:last-child a { border-bottom: 0; }
.result-list .addr { font-weight: 550; color: var(--ink); }
.result-list .price {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.result-list .price.muted { color: var(--muted); font-weight: 550; font-size: 0.9rem; }

/* ---------- Agency gap hero ---------- */
.gap-hero {
  text-align: center;
  padding: 26px 20px 22px;
  background: var(--surface);
  border-radius: 16px;
  margin: 18px 0 14px;
}
.gap-hero-red { background: var(--red-soft); }
.gap-hero-value {
  display: block;
  font-weight: 800;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.gap-hero-red .gap-hero-value { color: var(--red); }
.gap-hero-label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  margin-top: 6px;
}
.gap-hero-basis {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}
.fact-link { color: var(--accent); text-decoration: none; }
.fact-link:hover { text-decoration: underline; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Feed ---------- */
.stats-row { display: flex; gap: 10px; margin: 18px 0 22px; }
.stat {
  flex: 1;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
}
.stat-value {
  display: block;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-value.stat-red { color: var(--red); }
.stat-label { color: var(--muted); font-size: 0.8rem; }

.feed-list .feed-main { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.feed-list .feed-side { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.feed-list .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick { color: var(--green); font-weight: 800; }
.chip {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
}
.chip-gap { background: var(--red-soft); color: var(--red); }
.chip-disputed { background: var(--red-soft); color: var(--red); }

.empty-state {
  text-align: center;
  padding: 36px 20px;
  background: var(--surface);
  border-radius: 16px;
  margin: 20px 0;
}
.empty-state .btn-primary { max-width: 240px; margin: 20px auto 0; }

.feed-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 26px;
  font-size: 0.9rem;
}
.feed-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.feed-nav a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  color: var(--faint);
  font-size: 0.83rem;
  padding: 28px 20px 44px;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.site-footer a { color: var(--faint); }
