:root {
  --bg: #f3f5f8; --card: #ffffff; --ink: #1c2533; --muted: #5b6576; --line: #dde2ea; --field: #c9d1dc;
  --navy: #0a4f90; --navy-dark: #073a6b; --navy-soft: #e6eef7; --red: #c9372a; --red-dark: #a82c21;
  --new-bg: #fbe7e5; --new-fg: #9e2a20; --claim-bg: #e6eef7; --claim-fg: #0a4f90;
  --prog-bg: #fdf1dc; --prog-fg: #8a5200; --done-bg: #e3f3e8; --done-fg: #1d6b3a;
  --note-bg: #fff7e6; --note-line: #f0d9a8;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; padding-bottom: env(safe-area-inset-bottom); }
a { color: var(--navy); }
h1 { font-size: 26px; margin: 0; color: var(--navy); line-height: 1.2; }
h2 { font-size: 13px; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .08em; color: var(--navy); }
h2.big { font-size: 22px; text-transform: none; letter-spacing: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) 16px 10px; background: #fff; }
.top .logo { height: 28px; width: auto; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.rule { height: 3px; background: var(--red); box-shadow: 0 -2px 0 var(--navy); }
.rule.wide { width: min(420px, 100%); margin: 18px auto 22px; border-radius: 2px; }
.demo { background: #fff4d6; color: #6b4a00; text-align: center; font-size: 13px; padding: 6px 12px; }
.offline { background: #1c2533; color: #fff; text-align: center; font-size: 13px; padding: 8px 12px; }

main.phone { max-width: 560px; margin: 0 auto; padding: 16px 16px 140px; display: flex; flex-direction: column; gap: 14px; }
main.wide { max-width: 1280px; margin: 0 auto; padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 14px; }
.head { gap: 12px; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; gap: 8px; }
.gap { gap: 10px; }
.wrap { flex-wrap: wrap; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.fine { font-size: 12px; color: var(--muted); margin-top: 24px; }
.center { display: grid; place-items: center; min-height: 40vh; }
.center-text { text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--navy); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; background: #fff; color: var(--ink); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-dark); }
.btn.red { background: var(--red); color: #fff; }
.btn.red:hover { background: var(--red-dark); }
.btn.outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn.soft { background: var(--navy-soft); color: var(--navy); border-color: var(--navy); }
.btn.big { min-height: 56px; font-size: 17px; font-weight: 800; }
.btn.full { width: 100%; }
.btn.mapbtn { margin-top: 8px; }   /* View Map, under Open CAMA Card */
/* Parcel map picture: county parcel lines, roads and street names, lot highlighted, pin */
.pmapfig { margin: 10px 0 12px; }
.pmap { position: relative; width: 100%; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; background: #f4f1e8; border: 1px solid var(--line, #d8dde4); }
.pmap svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pmap-msg { display: flex; align-items: center; justify-content: center; gap: 10px; background: #f3f5f8; color: #5b6576; font-size: 14px; aspect-ratio: 5 / 2; }
.pmapfig figcaption { margin-top: 5px; }
.btn.sm { flex-direction: column; gap: 2px; font-size: 12px; min-height: 52px; padding: 4px; }
.btn.link, button.link { background: none; border: 0; color: var(--navy); font-weight: 600; cursor: pointer; padding: 6px 4px; min-height: 0; }
.btn[disabled], button[disabled] { opacity: .55; cursor: default; }
.danger { color: #9e2a20 !important; }

.pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.pill-new { background: var(--new-bg); color: var(--new-fg); }
.pill-claimed { background: var(--claim-bg); color: var(--claim-fg); }
.pill-progress { background: var(--prog-bg); color: var(--prog-fg); }
.pill-done { background: var(--done-bg); color: var(--done-fg); }

.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tabs a { text-align: center; padding: 12px 4px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--red); }
.list { display: flex; flex-direction: column; gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); text-decoration: none; }
.card.dim { background: #f7f8fa; opacity: .8; }
.card .addr { font-size: 17px; font-weight: 700; }

.signin { max-width: 460px; margin: 0 auto; padding: 18vh 20px 40px; text-align: center; }
.signin .logo-lg { width: min(360px, 90%); }
.signin h1 { margin-bottom: 6px; }
.err { color: #9e2a20; background: var(--new-bg); padding: 10px 12px; border-radius: 10px; }

.back { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 44px; padding: 0 16px 0 10px; border: 2px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; box-shadow: 0 1px 3px rgba(10,79,144,.18); }
.back:hover { background: var(--navy-soft); }
.back.light { color: #fff; background: rgba(255,255,255,.14); border-color: #fff; box-shadow: none; }
.back.light:hover { background: rgba(255,255,255,.26); }
.detail .hero .row { gap: 10px; flex-wrap: wrap; }
.detail .hero { background: var(--navy); color: #fff; margin: 0 -16px; padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.detail .hero .pill { align-self: flex-start; background: #fff; }
.detail .hero h1 { color: #fff; margin-top: 4px; }
.grid2 .btn { padding: 0 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid #eef1f5; font-size: 14px; }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--muted); flex-shrink: 0; }
.kv b { font-weight: 600; text-align: right; }
.note { background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 14px; padding: 12px 16px; }
.note h2 { color: var(--prog-fg); }
.note p { margin: 0; font-size: 15px; }
.lockline { display: flex; gap: 8px; align-items: flex-start; }
.notice { text-align: center; padding: 16px; border-radius: 12px; background: #eef1f5; color: #4a5566; font-weight: 700; }
.sticky { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); margin: 0 -16px; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; z-index: 5; }

.formhead { display: flex; flex-direction: column; gap: 2px; }
.formhead h1 { font-size: 22px; }
.saved { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--done-fg); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #4a5566; border: 0; padding: 0; margin: 0; }
.field input, .field textarea, .field select { font-weight: 400; font-size: 16px; min-height: 46px; padding: 10px 12px; border: 1px solid var(--field); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; }
.fields { gap: 16px; }
.hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.grid-city { display: grid; grid-template-columns: 2fr 0.8fr 1fr; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 15px; color: var(--ink); min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--navy); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.field .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg button { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--field); background: #fff; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.photos { display: flex; flex-direction: column; gap: 12px; }
.photo { display: flex; gap: 12px; align-items: center; }
.photo img { width: 100px; height: 76px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #eef1f5; }
.ph-wait { width: 100px; height: 76px; border-radius: 8px; flex-shrink: 0; background: #eef1f5; color: #5b6576; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.pcol { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pcol input { min-height: 40px; padding: 0 10px; border: 1px solid var(--field); border-radius: 8px; font-size: 15px; width: 100%; }
.info { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--navy-soft); color: #33506f; font-size: 13px; }

.done { text-align: center; align-items: center; padding-top: 18vh; }
.bigcheck { width: 84px; height: 84px; border-radius: 50%; background: var(--done-bg); color: var(--done-fg); display: grid; place-items: center; }
.bigcheck svg { width: 44px; height: 44px; }

.chips .chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--field); background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.chips .chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.table { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.thead, .trow { display: grid; grid-template-columns: 2.2fr 1fr 1.3fr 0.8fr; gap: 14px; padding: 12px 18px; align-items: center; }
.thead { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.trow { border-bottom: 1px solid #eef1f5; color: var(--ink); text-decoration: none; border-left: 4px solid transparent; }
.trow:hover { background: #f7f9fc; }
.trow.sel { background: #eef4fb; border-left-color: var(--navy); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; position: sticky; top: 12px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack .pill { align-self: flex-start; }
.timeline { list-style: none; margin: 6px 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 26px; display: flex; flex-direction: column; font-size: 13px; color: #8a94a3; }
.timeline li b { font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--field); background: #fff; box-sizing: border-box; }
.timeline li::after { content: ""; position: absolute; left: 6px; top: 19px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.on { color: var(--muted); }
.timeline li.on b { color: var(--ink); }
.timeline li.on::before { border-color: var(--navy); background: var(--navy); }
.timeline li.now::before { background: #fff; }
.warnline { margin: 0; font-size: 13px; color: var(--prog-fg); background: var(--prog-bg); padding: 8px 12px; border-radius: 8px; }
.only-narrow { display: none; }

#toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: min(520px, calc(100% - 32px)); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50; }
#toast.show { opacity: 1; }
.update { position: fixed; top: 0; left: 0; right: 0; z-index: 60; border: 0; background: var(--navy); color: #fff; font-weight: 700; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; cursor: pointer; }

@media (max-width: 900px) {
  main.wide { padding: 16px; }
  .split { grid-template-columns: 1fr; }
  .split.has-sel .table { display: none; }
  .split:not(.has-sel) .panel { display: none; }
  .only-narrow { display: inline-flex; }
  .agent-sel .head, .agent-sel .chips { display: none; }
  .thead { display: none; }
  .trow { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .trow > span:nth-child(2), .trow > span:nth-child(4) { font-size: 12px; color: var(--muted); }
  .panel { position: static; }
}

/* v0.1.1 */
.quick { display: grid; gap: 8px; }
.quick.q1 { grid-template-columns: 1fr; }
.quick.q2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick.q3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.claims { border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.claims.yes { background: var(--new-bg); border: 1px solid #efc2bc; }
.claims.yes h2 { color: var(--new-fg); }
.claim { margin: 0; font-size: 15px; }
.claim.yes { font-weight: 600; }
.pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; width: 100%; padding: 12px; border: 1px solid var(--field); border-radius: 10px; background: #fff; cursor: pointer; }
.pick span { font-size: 13px; color: var(--muted); }
.pick:hover { border-color: var(--navy); }
.searchrow { display: flex; gap: 8px; }
.searchrow input { flex: 1; min-width: 0; min-height: 46px; padding: 0 12px; border: 1px solid var(--field); border-radius: 10px; font-size: 16px; }

.me { display: inline-flex; align-items: center; gap: 6px; }
.role { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.role-inspector { background: var(--navy); color: #fff; }
.role-agent { background: var(--navy-soft); color: var(--navy); }
.viewswitch { display: inline-flex; background: var(--navy-soft); border-radius: 999px; padding: 2px; }
.viewswitch a { font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; color: var(--navy); padding: 5px 11px; border-radius: 999px; }
.viewswitch a.on { background: var(--navy); color: #fff; }
@media (max-width: 420px) { .me > span:first-child { display: none; } }
@media (max-width: 420px) {
  .top { gap: 8px; }
  .top .logo { height: 22px; }
  .who { gap: 8px; }
  .who .link { white-space: nowrap; }
  .viewswitch a { font-size: 11px; padding: 4px 8px; letter-spacing: .02em; }
}
@media (max-width: 370px) {
  .top { padding-left: 12px; padding-right: 12px; }
  .top .logo { height: 18px; }
  .viewswitch a { padding: 4px 6px; }
}

/* Request Inspection (from Quote Intake) */
.btn.mini { min-height: 36px; padding: 6px 12px; font-size: 13px; flex-shrink: 0; }
main.intake { display: flex; flex-direction: column; gap: 14px; }
main.intake .bigcheck { margin: 12px auto 0; }
main.intake h1 { margin: 0; }
.check.big { align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.check.big:first-of-type { border-top: 0; }
.check.big input { margin-top: 2px; flex-shrink: 0; }
.notice.warn { background: #fdecea; color: #8a1f14; text-align: left; font-weight: 600; }

/* Agency Tools on the website */
body.tools-on { overflow: hidden; }
.tools-frame { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; background: #f3f5f8; }
.tools-update { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center;
  background: #16202b; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 14px; max-width: calc(100% - 24px); }
.tools-signin .spinner { margin: 8px auto; }

/* Auxiliary heat warning (from the intake) */
.heat { background: #fdecea; border: 2px solid #c9372a; border-left-width: 6px; border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; gap: 4px; }
.heat h2 { color: #a3261b; display: flex; align-items: center; gap: 6px; }
.heat p { margin: 0; font-size: 16px; font-weight: 700; color: #7a1b12; }
.heat p.small { font-size: 13px; font-weight: 400; color: #7a1b12; }
.heat.compact { padding: 8px 12px; }
.heat.compact h2 { font-size: 13px; }
.heat.compact p { font-size: 15px; }
.heat-inline { color: #a3261b; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }

/* Admin */
.adminlink { position: relative; display: inline-flex; align-items: center; color: var(--navy); padding: 4px; border-radius: 8px; }
.adminlink.on { background: var(--navy-soft); }
.adminlink .dot { position: absolute; top: 0; right: 0; width: 9px; height: 9px; border-radius: 50%; background: #c9372a; border: 2px solid #fff; }
.adminq { flex: 1 1 260px; max-width: 420px; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; }
main.admin > .box { margin: 12px 0; }
.alertline { border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.alertline.ok { background: var(--done-bg); color: var(--done-fg); }
.alertline.bad { background: #fdecea; color: #8a1f14; border: 1px solid #efc2bc; }
.alertline + .alertline { margin-top: 8px; }
.small.bad { color: #a3261b; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.chip.warnchip { border-color: #c9372a; color: #a3261b; }
.admin .panel select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; font: inherit; background: #fff; }
@media (max-width: 420px) { .who .wide-only { display: none; } }
.bigx { width: 84px; height: 84px; border-radius: 50%; background: #fdecea; color: #c9372a; display: grid; place-items: center; font-size: 44px; font-weight: 800; margin: 12px auto 0; }
main.intake p.bad { color: #8a1f14; }
main.intake .box.prop { gap: 10px; }
