:root {
  --ink: #10222e;
  --ink-soft: #4a5f6d;
  --paper: #f6f8f9;
  --card: #ffffff;
  --brand: #0c7a6e;
  --brand-dark: #085c53;
  --accent: #f4a300;
  --line: #dde5e9;
  --danger: #b3362b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  font-size: 16px;
}
main { padding: .7rem; max-width: 640px; margin: 0 auto; padding-bottom: 2rem; }

/* top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .45rem .7rem; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 700; text-decoration: none; color: var(--brand-dark); font-size: 1.05rem; }
nav { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
nav a { color: var(--ink-soft); text-decoration: none; font-size: .92rem; }
nav a:hover { color: var(--brand-dark); }

/* typography */
h1 { font-size: 1.2rem; margin: .3rem 0 .55rem; }
h2 { font-size: .95rem; margin: 1rem 0 .4rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; }
p  { margin: .35rem 0; }
.muted { color: var(--ink-soft); font-size: .9rem; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--brand-dark); }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .65rem .75rem; margin: .5rem 0;
}
.card h3 { margin: 0 0 .15rem; font-size: 1rem; }

/* hero photo placeholder */

/* chips */
.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin: .5rem 0; }
.chip {
  background: #e8f1f0; color: var(--brand-dark); border-radius: 999px;
  padding: .18rem .7rem; font-size: .85rem; font-weight: 600;
}
.chip.gray { background: #eceff1; color: var(--ink-soft); }
.chip.amber { background: #fdf1d7; color: #8a6100; }

/* forms */
label { display: block; font-weight: 600; margin: .55rem 0 .2rem; font-size: .95rem; }
input, select, textarea {
  width: 100%; padding: .5rem .6rem; font-size: 1rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
button, .btn {
  display: inline-block; width: 100%; margin-top: .55rem;
  background: var(--brand); color: #fff; border: 0; border-radius: 8px;
  padding: .6rem .85rem; font-size: 1rem; font-weight: 700; text-align: center;
  text-decoration: none; cursor: pointer;
}
button:active { background: var(--brand-dark); }
button.secondary, .btn.secondary { background: #fff; color: var(--brand-dark); border: 1px solid var(--brand); }
button.linkish {
  width: auto; margin: 0; padding: 0; background: none; color: var(--ink-soft);
  font-size: .92rem; font-weight: 400; text-decoration: underline;
}
form.inline { display: inline; }

/* compact inline actions (header rows, filter bars) */
button.inline, .btn.inline {
  width: auto; margin: 0; padding: .4rem .75rem; font-size: .9rem;
}

/* heading row: heading left, action right */
.h2row { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.h2row h1 { margin: .3rem 0 .55rem; }
.h2row h2 { margin: 1rem 0 .4rem; }

/* row-sized price */
.price.small { font-size: 1rem; font-weight: 700; margin: 0; }

/* either / or markers on the lead form */
.either, .or {
  text-align: center; font-weight: 700; color: var(--ink-soft);
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
}
.either { margin-top: .45rem; }
.or { display: flex; align-items: center; gap: .5rem; margin: .3rem 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* banners */
.banner { border-radius: var(--radius); padding: .6rem .75rem; margin: .5rem 0; font-size: .9rem; }
.banner.ok   { background: #e3f4ee; color: #0b5a44; border: 1px solid #b5e0d2; }
.banner.warn { background: #fdeeee; color: var(--danger); border: 1px solid #f0c9c5; }

/* stat row */
.stats { display: flex; gap: .6rem; }
.stat { flex: 1; text-align: center; }
.stat b { display: block; font-size: 1.35rem; color: var(--brand-dark); }

/* compact grid lists (admin console) */
.gridlist {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin: .5rem 0 1rem;
}
.gridrow {
  display: grid; grid-template-columns: 1fr auto;
  gap: .1rem .6rem; align-items: center;
  padding: .4rem .65rem; border-bottom: 1px solid var(--line);
  color: inherit; text-decoration: none; font-size: .92rem;
}
.gridrow:last-child { border-bottom: 0; }
.gridrow.head { display: none; }
.gridrow .mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 600; }
.gridrow .sub { grid-column: 1 / -1; }
.gridrow .chev { color: var(--ink-soft); font-size: 1.2rem; line-height: 1; }
.gridrow a { text-decoration: none; }
.gridrow a:hover { text-decoration: underline; }
.gridrow > span:last-child, .gridrow > span:nth-child(2) { white-space: nowrap; }
a.gridrow:active { background: #eef4f3; }

@media (min-width: 720px) {
  .gridrow { grid-template-columns: 11rem 8rem 1fr auto; padding: .35rem .65rem; }
  .gridrow.head {
    display: grid; background: #fafbfc; color: var(--ink-soft);
    font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  }
  .gridrow .sub { grid-column: auto; }
  .gridrow .chev { text-align: right; }
}

/* footer */
.footer { text-align: center; color: var(--ink-soft); font-size: .8rem; padding: 1rem 1rem 1.5rem; }

/* filter bars */
.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: .35rem 0 .6rem;
}
.filters input,
.filters select {
  flex: 1 1 10rem;
  margin: 0;
}
.filters button,
.filters .btn {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

@media (min-width: 720px) {
  main { max-width: 720px; }
}

/* ---- Visitor page (chrome-free layout) ---- */
/* The scan landing page serves street-side Visitors, not signed-in
   users: no topbar, no nav, no card chrome — typography and space
   only. Listing text is the hero; a CTA button reveals the form. */
body.visitor {
  font-size: 17px;
  background: #f6f8f7;
}
body.visitor main {
  max-width: 34rem; margin: 0 auto; padding: 2.2rem 1.2rem 2rem;
}
.listing-text {
  margin: 0; white-space: pre-line;
  font-size: 1.18rem; line-height: 1.55; font-weight: 450;
}
.cta-btn {
  display: block; margin: 1.6rem 0 0; padding: .95rem 1rem;
  background: var(--brand-dark); color: #fff; border-radius: 10px;
  text-align: center; text-decoration: none; font-weight: 700; font-size: 1.05rem;
}
.cta-btn:active { background: #14615a; }
.cta-open { margin: 1.6rem 0 0; }
.cta-open h2 { font-size: 1.3rem; color: var(--ink); text-transform: none; letter-spacing: 0; margin: 0 0 .4rem; }
.cta-sub { color: var(--ink-soft); margin: 0 0 1rem; }
.consent { margin-top: .55rem; font-size: .78rem; line-height: 1.45; }
.presented {
  margin: 1.6rem 0 0; color: var(--ink-soft); font-size: .95rem;
}
.presented b { color: var(--ink); }
.whisper {
  text-align: center; padding: 1.4rem 0 1.6rem;
  color: #a9b5b1; font-size: .78rem;
}
body.visitor .banner.warn { margin: 0 0 .8rem; }
