/* Expresstimates — site design system.
   One stylesheet for the marketing/intake, status, and reviewer surfaces.
   Dependency-light: plain CSS, system fonts, no build step. */

:root {
  --navy:    #0f2a43;
  --navy-2:  #16395b;
  --ink:     #18222c;
  --muted:   #5b6b7a;
  --line:    #e2e8ef;
  --bg:      #f6f8fb;
  --card:    #ffffff;
  --gold:    #e0a526;   /* CTA / price — the premium accent */
  --gold-d:  #b9851a;
  --blue:    #2f6fb0;
  --green:   #1f8a55;
  /* severity palette (shared with the report) */
  --sev-safety:   #c0392b;
  --sev-major:    #d96420;
  --sev-moderate: #c9942b;
  --sev-minor:    #5b6b7a;
  --sev-monitor:  #2f6fb0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,42,67,.06), 0 8px 24px rgba(16,42,67,.07);
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--navy); line-height: 1.2; letter-spacing: -.01em; }

/* --- header / footer ----------------------------------------------------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 800; font-size: 1.35rem; color: var(--navy);
  letter-spacing: -.02em;
}
.brand span { color: var(--gold-d); }
.brand:hover { text-decoration: none; }
.site-header nav a { color: var(--muted); margin-left: 22px; font-weight: 600; font-size: .95rem; }
.site-header nav a:hover { color: var(--navy); text-decoration: none; }
.site-header nav .nav-cta {
  background: var(--navy); color: #fff; padding: 8px 16px; border-radius: 8px;
}
.site-header nav .nav-cta:hover { background: var(--navy-2); }

.site-footer {
  margin-top: 64px; padding: 32px 0;
  border-top: 1px solid var(--line); background: var(--card);
  color: var(--muted); font-size: .85rem;
}
.site-footer .disclaimer { max-width: 760px; }
.site-footer .copy { margin-top: 12px; font-weight: 600; }

/* --- buttons ------------------------------------------------------------- */
.btn {
  display: inline-block; cursor: pointer; border: none; border-radius: 10px;
  font-family: var(--font); font-weight: 700; font-size: 1.02rem;
  padding: 14px 26px; text-align: center; transition: transform .04s ease, background .15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #2a1e02; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--gold-d); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); color: #fff; }
.btn-block { display: block; width: 100%; }

/* --- hero ---------------------------------------------------------------- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 70%);
  color: #eaf1f8; padding: 72px 0 84px;
}
.hero h1 { color: #fff; font-size: 2.7rem; margin: 0 0 16px; max-width: 14ch; }
.hero .lede { font-size: 1.22rem; color: #c4d4e3; max-width: 56ch; margin: 0 0 28px; }
.hero .price-pill {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: rgba(224,165,38,.14); border: 1px solid rgba(224,165,38,.4);
  color: #ffd980; padding: 6px 14px; border-radius: 999px; font-weight: 700;
  margin-bottom: 24px; font-size: .95rem;
}
.hero .price-pill b { font-size: 1.05rem; color: #ffe2a3; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-cta .reassure { color: #9fb6cc; font-size: .9rem; }

/* --- generic sections ---------------------------------------------------- */
section.band { padding: 56px 0; }
section.band.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { text-align: center; font-size: 1.7rem; margin: 0 0 8px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 60ch; }

/* steps + features grids */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.step .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px; background: var(--navy); color: #fff;
  font-weight: 800; margin-bottom: 12px;
}
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }

.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature .ic {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
  background: #eaf1fa; color: var(--blue); display: grid; place-items: center;
  font-size: 1.2rem;
}
.feature h3 { margin: 2px 0 4px; font-size: 1.05rem; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }

/* --- intake form --------------------------------------------------------- */
.intake-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); }
.form-card h2 { margin: 0 0 4px; font-size: 1.4rem; }
.form-card .sub { color: var(--muted); margin: 0 0 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: .9rem; color: var(--navy); margin-bottom: 6px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.field input[type=text], .field input[type=email], .field textarea, .field input[type=file] {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px;
  font-family: var(--font); font-size: 1rem; background: #fcfdff;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.field textarea { resize: vertical; }
.fineprint { color: var(--muted); font-size: .82rem; margin-top: 14px; text-align: center; }
.upload-status { margin-top: 12px; text-align: center; font-size: .9rem; font-weight: 600; color: var(--blue); }

.sell-aside h3 { font-size: 1.15rem; margin: 0 0 14px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 8px 0 8px 30px; border-bottom: 1px solid var(--line); color: var(--ink); }
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 8px; color: var(--green); font-weight: 800;
}

/* banners */
.banner { padding: 14px 18px; border-radius: 10px; margin-bottom: 24px; font-weight: 600; }
.banner-warn { background: #fff6e6; border: 1px solid #f0d28a; color: #8a5a00; }
.banner-info { background: #eaf2fb; border: 1px solid #bcd6f0; color: #1c4f86; }

/* --- status timeline ----------------------------------------------------- */
.status-page { padding: 48px 0; }
.status-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); }
.status-card .addr { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin: 0 0 4px; }
.status-card .ref { color: var(--muted); font-size: .85rem; margin: 0 0 28px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 26px 36px; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li .dot {
  position: absolute; left: -9px; top: 0; width: 16px; height: 16px; border-radius: 999px;
  background: #fff; border: 2px solid var(--line);
}
.timeline li.done .dot { background: var(--green); border-color: var(--green); }
.timeline li.current .dot { background: var(--gold); border-color: var(--gold-d); box-shadow: 0 0 0 4px rgba(224,165,38,.2); }
.timeline li .t-title { font-weight: 700; color: var(--navy); }
.timeline li.pending .t-title { color: var(--muted); }
.timeline li .t-sub { color: var(--muted); font-size: .88rem; }

/* --- status badges ------------------------------------------------------- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem;
  font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
}
.badge.created   { background: #eef1f4; color: #5b6b7a; }
.badge.paid      { background: #eaf2fb; color: #1c4f86; }
.badge.processing{ background: #fff3e0; color: #9a6100; }
.badge.draft_ready { background: #fdf0d0; color: #8a5a00; }
.badge.approved  { background: #e6f4ec; color: #1f6f44; }
.badge.delivered { background: #1f8a55; color: #fff; }
.badge.error     { background: #fbe4e1; color: #a0271a; }

/* --- admin --------------------------------------------------------------- */
.admin { padding: 40px 0; }
.admin h1 { margin: 0 0 6px; }
.admin .meta { color: var(--muted); margin: 0 0 24px; }
table.jobs { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.jobs th, table.jobs td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .92rem; }
table.jobs th { background: #f0f4f8; color: var(--navy); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
table.jobs tr:last-child td { border-bottom: none; }
table.jobs tr:hover td { background: #fafcfe; }
table.jobs .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.admin-view { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; padding: 32px 0; }
.admin-side { position: sticky; top: 88px; }
.admin-side .card { padding: 20px; }
.admin-side dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-top: 14px; }
.admin-side dt:first-child { margin-top: 0; }
.admin-side dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.admin-side .cost { font-size: 1.4rem; color: var(--navy); font-weight: 800; }
.admin-side .margin { color: var(--green); font-weight: 700; font-size: .85rem; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); font-weight: 600; }

/* --- legal pages (terms / privacy) --------------------------------------- */
.legal { padding: 48px 0 8px; }
.legal .legal-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 44px 52px; box-shadow: var(--shadow);
}
.legal h1 { font-size: 2rem; margin: 0 0 4px; }
.legal .effective { color: var(--muted); font-size: .9rem; margin: 0 0 18px; }
.legal .lede { color: var(--ink); font-size: 1.02rem; margin: 0 0 8px; }
.legal h2 {
  font-size: 1.18rem; margin: 32px 0 8px; padding-top: 18px; border-top: 1px solid var(--line);
}
.legal h3 { font-size: 1.02rem; margin: 18px 0 6px; color: var(--ink); }
.legal p, .legal li { color: #2b3742; font-size: .97rem; }
.legal ul { padding-left: 22px; }
.legal li { margin: 5px 0; }
.legal table.subproc { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: .92rem; }
.legal table.subproc th, .legal table.subproc td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal table.subproc th { color: var(--navy); font-size: .76rem; text-transform: uppercase; letter-spacing: .03em; }
.legal .placeholder { background: #fff3d6; color: #8a5a00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
.legal .toc { background: #f3f7fb; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin: 18px 0 8px; }
.legal .toc ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.legal .toc li { margin: 3px 0; }
.legal .notice {
  background: #fff6e6; border: 1px solid #f0d28a; color: #6b4a00; border-radius: 10px;
  padding: 14px 18px; margin: 0 0 22px; font-size: .92rem;
}

/* intake consent + AI/PII notice */
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 18px; font-size: .9rem; color: var(--ink); }
.consent input { margin-top: 4px; flex: 0 0 auto; }
.pdf-notice { color: var(--muted); font-size: .8rem; margin: 6px 0 0; }

@media (max-width: 860px) {
  .grid-3, .grid-2, .intake-layout, .admin-view { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.1rem; }
  .admin-side { position: static; }
  .legal .legal-card { padding: 28px 24px; }
  .legal .toc ul { columns: 1; }
}

/* --- admin pipeline progress panel --------------------------------------- */
.prog-card { margin-top: 16px; }
.prog-stages { list-style: none; margin: 0 0 10px; padding: 0; font-size: .9rem; }
.prog-stages li { padding: 3px 0; color: var(--muted); }
.prog-stages li.active { color: var(--navy); font-weight: 700; }
.prog-stages li.done { color: var(--green); }
.prog-stages li.error { color: var(--sev-safety); font-weight: 700; }
.prog-detail { font-size: .88rem; color: var(--ink); margin: 6px 0; min-height: 1.2em; }
.prog-bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.prog-fill { height: 100%; width: 0; background: var(--gold); transition: width .4s ease; }
.prog-cost { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
table.jobs .stage-detail { color: var(--muted); font-size: .8rem; font-style: italic; }

/* --- admin tabs + activity log ------------------------------------------- */
.admin-main { min-width: 0; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.tabs .tab { background: none; border: none; cursor: pointer; font-family: var(--font);
  font-size: .95rem; font-weight: 700; color: var(--muted); padding: 10px 18px;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--navy); }
.tabs .tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.report-frame { width: 100%; height: 1200px; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; }
.log-card { margin-top: 16px; }
.log-title { font-size: 1rem; margin: 0 0 8px; }
.log { background: #0f1b2a; color: #cfe3f5; border-radius: 8px; padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem;
  line-height: 1.5; max-height: 360px; overflow-y: auto; white-space: pre-wrap;
  margin: 0; }

/* --- address-first funnel (/start): map + free area-stat tiles ------------- */
.map { width: 100%; height: 300px; border-radius: 10px; border: 1px solid var(--line);
  margin: 14px 0; overflow: hidden; }
#geocoder { width: 100%; }
#geocoder .mapboxgl-ctrl-geocoder { width: 100%; max-width: none; box-shadow: none;
  border: 1px solid var(--line); border-radius: 8px; }
/* keep the search icon clear of the typed text (default Mapbox padding/icon don't line up
   at our full width + font size, so the glass overlaps the first character) */
#geocoder .mapboxgl-ctrl-geocoder--input { height: 46px; line-height: 46px;
  padding: 0 16px 0 46px; font-size: 1rem; }
#geocoder .mapboxgl-ctrl-geocoder--icon-search { top: 50%; left: 15px; margin-top: 0;
  transform: translateY(-50%); width: 20px; height: 20px; }
#geocoder .mapboxgl-ctrl-geocoder--pin-right { top: 50%; transform: translateY(-50%); }
.area-tiles { margin: 8px 0 4px; }
.area-tile { text-align: center; padding: 16px 10px; }
.area-tile .area-val { font-size: 1.35rem; font-weight: 700; color: var(--navy);
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.area-tile .area-lbl { font-size: .8rem; color: var(--muted); margin-top: 4px; }

/* --- tier choice on /start ------------------------------------------------- */
.tier-card { display: flex; flex-direction: column; text-align: center; padding: 20px 16px; }
.tier-card h3 { margin: 0 0 4px; }
.tier-card .tier-price { font-size: 1.8rem; font-weight: 800; color: var(--navy); margin: 2px 0 8px; }
.tier-card .muted { flex: 1; }
.tier-card .btn { margin-top: 12px; }

/* --- marketing / SEO pages (pricing, sample, guides, faq) ----------------- */
.site-footer .footer-nav { margin: 0 0 6px; font-size: .9rem; }
.site-footer .footer-nav a { color: var(--navy); margin: 0 2px; }

.wrap.narrow .article h2 { margin-top: 1.4em; }
.article p, .article li { line-height: 1.6; }

.sample-table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: .95rem; }
.sample-table th, .sample-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sample-table thead th { background: #f0f4f8; }

a.guide-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
a.guide-card h3 { margin-top: 0; }
a.guide-card .muted { flex: 1; }
a.guide-card .readmore { color: var(--navy); font-weight: 600; font-size: .92rem; margin-top: 8px; }
a.guide-card:hover { border-color: var(--navy); }

/* old-home permit-norms bars */
.norm-row { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; margin: 7px 0; font-size: .92rem; }
.norm-label { color: var(--ink); }
.norm-bar { background: #eef2f7; border-radius: 6px; height: 14px; overflow: hidden; }
.norm-bar > span { display: block; height: 100%; background: var(--navy); border-radius: 6px; }
.norm-pct { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
#geocoder { margin: 6px 0 10px; }
#geocoder .mapboxgl-ctrl-geocoder { max-width: none; width: 100%; box-shadow: none; border: 1px solid var(--line); }
