:root {
  --navy: #0f172a; --navy-soft: #1e293b; --cyan: #06b6d4; --cyan-dark: #0e7490;
  --emerald: #047857; --bg: #f1f5f9; --white: #fff; --text: #0f172a; --muted: #526072;
  --line: #e2e8f0; --radius: 14px; --red: #b91c1c; --amber-bg: #fff7ed;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 10px 28px rgba(15, 23, 42, .07);
  --tap: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--cyan-dark); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.top { background: var(--navy); color: var(--white); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; min-height: var(--tap); color: var(--white); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand .mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: var(--bg); }
.brand .mark img { display: block; }
.brand .by { margin-left: -4px; font-size: 12px; font-weight: 500; opacity: .85; align-self: flex-end; padding-bottom: 10px; }
.link-btn { min-height: var(--tap); background: none; border: 1px solid rgba(255,255,255,.5); color: var(--white); border-radius: 999px; padding: 6px 16px; font: inherit; font-size: 15px; cursor: pointer; }
h1 { font-size: 24px; margin: 24px 0 4px; }
h2 { font-size: 18px; margin: 28px 0 10px; }
h3 { font-size: 15px; margin: 18px 0 6px; color: var(--navy-soft); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
form.card { display: grid; gap: 8px; margin: 16px 0; }
label { font-weight: 600; font-size: 14px; }
input, select { font: inherit; min-height: var(--tap); padding: 10px 12px; border: 1px solid #94a3b8; border-radius: 10px; background: var(--white); color: var(--text); width: 100%; }
input:focus, select:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.btn { min-height: var(--tap); margin-top: 8px; background: var(--cyan-dark); color: var(--white); border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: #155e75; }
.btn:disabled { opacity: .6; }
.error { color: var(--red); margin: 4px 0 0; }
.note { background: var(--amber-bg); border-radius: 10px; padding: 10px 12px; margin: 12px 0 0; }
.demo-banner { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: #fef9c3; color: #713f12; font-weight: 600; font-size: 14px; }
.title-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px; }
.shop-pick { display: grid; gap: 2px; min-width: 200px; }
.who { margin: 4px 0 0; }

/* Stat strip: 2 x 2 on phones, 4 across from 640px. */
.counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.count { display: grid; gap: 2px; padding: 12px 14px; }
.count .label { font-size: 13px; line-height: 1.3; color: var(--muted); }
.num { font-size: 26px; line-height: 1.15; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.count.money .num { color: var(--emerald); }

/* Lead cards */
.leads { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lead { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 16px; border-left: 5px solid transparent; }
.lead.is-urgent { border-left-color: var(--red); }
.lead.is-spam { background: #fbfcfd; }
.lead.is-spam .phone { color: var(--muted); }
.lead-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.kind { font-weight: 700; color: var(--navy-soft); }
.kind::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan-dark); margin-right: 8px; vertical-align: middle; }
.kind.web_form::before { background: var(--emerald); }
.kind.voicemail::before, .kind.has-vm::before { background: #7c3aed; }
.kind.reply::before, .kind.opt_out::before, .kind.opt_in::before { background: #64748b; }
.when { color: var(--muted); }
.who-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; margin-top: 2px; }
.name { font-weight: 700; font-size: 18px; }
.phone { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 700; font-size: 18px; text-decoration: none; color: var(--cyan-dark); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pill { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; line-height: 1.2; border-radius: 999px; padding: 4px 10px; background: #ecfeff; color: #155e75; }
.pill.urgent { background: var(--red); color: var(--white); font-weight: 800; letter-spacing: .04em; }
.pill.lang { background: #ede9fe; color: #5b21b6; }
.pill.replied { background: #dcfce7; color: #166534; }
.pill.skip, .pill.hours { background: #f1f5f9; color: #475569; }
.pill.fail { background: #fef2f2; color: var(--red); }
.pill.spam { background: #fff7ed; color: #9a3412; }
.pill.spam.yes { background: #fef2f2; color: var(--red); }
.spam-why { margin: 6px 0 0; }
.answers { display: grid; gap: 0; margin: 10px 0 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.answer { display: grid; grid-template-columns: 112px 1fr; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); }
.answer:first-child { border-top: 0; }
.answer dt { font-size: 13px; color: var(--muted); padding-top: 1px; }
.answer dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.msg { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply { margin-top: 10px; padding: 10px 12px; background: #f8fafc; border-radius: 10px; }
.reply-head { font-size: 13px; font-weight: 600; color: var(--muted); }
.reply .msg { margin-top: 2px; }
.media { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: 10px; background: none; cursor: zoom-in; width: 96px; height: 96px; overflow: hidden; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.attach { display: inline-flex; align-items: center; min-height: var(--tap); }
.vm { margin-top: 10px; padding: 10px 12px; background: #f5f3ff; border-radius: 10px; }
.vm-label { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; color: #5b21b6; }
audio { display: block; width: 100%; height: var(--tap); margin-top: 4px; }
.vm-pending { margin: 8px 0 0; font-style: italic; }
.vm-summary { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.vm-full { margin-top: 6px; }
.vm-full > summary { display: flex; align-items: center; min-height: var(--tap); cursor: pointer; font-size: 14px; color: var(--cyan-dark); font-weight: 600; }
.lead.focus { outline: 3px solid var(--cyan); outline-offset: 2px; }
.transcript { margin: 0 0 4px; padding-left: 10px; border-left: 3px solid var(--line); color: var(--navy-soft); overflow-wrap: anywhere; }

/* Won $ */
.won { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.won-label { font-weight: 800; font-size: 15px; color: var(--navy); }
.won input { width: 132px; font-weight: 700; }
.won .btn { margin-top: 0; }
.won-msg { color: var(--muted); flex-basis: 100%; }
.won.is-won input { border-color: var(--emerald); background: #f0fdf4; }
.won.is-won .won-msg { color: var(--emerald); font-weight: 600; }
.small-btn { font-size: 15px; width: auto; }

/* Photo lightbox */
.lightbox { border: 0; padding: 12px; border-radius: var(--radius); max-width: min(96vw, 900px); background: var(--white); }
.lightbox::backdrop { background: rgba(15, 23, 42, .8); }
.lightbox img { display: block; max-width: 100%; max-height: 78vh; margin: 0 auto; border-radius: 8px; }
.lightbox form { display: flex; justify-content: center; }
.lightbox .btn { min-width: 120px; }

dl { margin: 0; display: grid; gap: 8px; }
dt { font-size: 13px; color: var(--muted); }
dd { margin: 0 0 4px; overflow-wrap: anywhere; }
.hours { border-collapse: collapse; width: 100%; max-width: 360px; }
.hours td { padding: 4px 0; border-bottom: 1px solid var(--line); }
.hours td:first-child { width: 56px; color: var(--muted); }
.foot { padding: 28px 16px 40px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.foot a { display: inline-flex; align-items: center; min-height: var(--tap); }
.foot .oak { gap: 6px; color: var(--navy-soft); font-weight: 600; text-decoration: none; }
.foot .oak img { display: block; }
label.check { display: flex; align-items: center; gap: 10px; min-height: var(--tap); margin-top: 8px; }
label.check input { width: 22px; height: 22px; min-height: 0; }
@media (min-width: 640px) {
  h1 { font-size: 28px; }
  .settings dl { grid-template-columns: 180px 1fr; }
  dt { padding-top: 2px; }
  .counts { grid-template-columns: repeat(4, 1fr); }
  .answer { grid-template-columns: 140px 1fr; }
  .thumb { width: 120px; height: 120px; }
  .won-msg { flex-basis: auto; }
}

.pill.held { background: #fef9c3; color: #713f12; }
.hold-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.btn.ghost { margin-top: 0; background: var(--white); color: var(--cyan-dark); border: 1px solid var(--cyan-dark); }
.btn.ghost:hover { background: #ecfeff; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.two label { display: grid; gap: 4px; }

.card.highlight { outline: 3px solid var(--cyan-dark); }

/* register.html: "What happens next" */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 10px 10px 10px 48px; margin: 0 0 6px; border-radius: 8px; line-height: 1.45; }
.steps li::before { content: counter(step); position: absolute; left: 10px; top: 10px; width: 28px; height: 28px; line-height: 28px; border-radius: 14px; text-align: center; font-weight: bold; background: #e4e7eb; color: #52606d; }
.steps li.done::before { content: "\2713"; background: #2f855a; color: #fff; }
.steps li.done .tag { color: #2f855a; }
.steps li.here { background: #eff6ff; border: 1px solid #bfdbfe; }
.steps li.here::before { background: #1d4ed8; color: #fff; }
.steps li.here .tag { color: #1d4ed8; font-weight: bold; }
.fw-ph{background:#fff4d6;border:1px dashed #c08a00;border-radius:4px;padding:0 4px;font-style:italic;color:#7a5600;white-space:nowrap}
.fw-nonum{background:#fff4d6;border-left:4px solid #c08a00;padding:8px 12px}
/* Login code step: large digits, phone friendly */
.code-form #code { font-size: 28px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.code-form .link-btn { border-color: var(--line, #d0d7de); color: inherit; padding: 6px 14px; }
.code-form .link-btn:disabled { opacity: .5; cursor: default; }
