:root {
  color-scheme: light;
  --ink: #14211f;
  --ink-soft: #53625f;
  --green: #102a27;
  --green-2: #1d4f48;
  --cream: #f5f1e8;
  --paper: #fffdf8;
  --line: #ddd8cd;
  --orange: #d46b3c;
  --orange-dark: #a94521;
  --gold: #e9b949;
  --red: #a83a35;
  --blue: #2d6683;
  --shadow: 0 12px 30px rgba(16, 42, 39, .1);
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--cream); }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid rgba(212, 107, 60, .42);
  outline-offset: 2px;
}
.skip-link { position: fixed; left: 8px; top: -80px; z-index: 100; background: #fff; padding: 10px 14px; border-radius: 10px; color: var(--green); }
.skip-link:focus { top: 8px; }

.app-shell { width: min(100%, 840px); margin: 0 auto; min-height: 100dvh; background: var(--cream); }
.topbar {
  position: sticky; top: 0; z-index: 20; height: calc(68px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 18px 0; display: flex; align-items: center; justify-content: space-between;
  background: rgba(245, 241, 232, .94); border-bottom: 1px solid rgba(20, 33, 31, .08); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; color: var(--green); background: none; text-align: left; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 19px; line-height: 1; letter-spacing: -.25px; }
.brand small { display: block; margin-top: 4px; color: var(--orange-dark); font-size: 9px; font-weight: 900; letter-spacing: 1.8px; }
.brand-mark { position: relative; width: 35px; height: 35px; display: grid; place-items: end center; border-radius: 10px; background: var(--green); overflow: hidden; }
.brand-mark::before { content: ""; width: 21px; height: 19px; background: var(--paper); clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); }
.brand-mark span { position: absolute; bottom: 0; width: 8px; height: 15px; background: var(--orange); }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 14px; color: #fff; background: var(--green); box-shadow: 0 7px 16px rgba(16, 42, 39, .22); }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

main { padding: 18px 16px calc(104px + var(--safe-bottom)); }
.page { animation: page-in .2s ease-out; }
@keyframes page-in { from { opacity: .65; transform: translateY(4px); } }
.eyebrow { margin: 0 0 7px; color: var(--orange-dark); font-size: 11px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-family: Georgia, serif; font-size: clamp(31px, 9vw, 46px); line-height: 1.04; letter-spacing: -1.2px; }
h2 { margin-bottom: 10px; font-family: Georgia, serif; font-size: 24px; line-height: 1.15; }
h3 { margin-bottom: 6px; font-size: 16px; }
.lede { max-width: 580px; margin-bottom: 22px; color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.muted { color: var(--ink-soft); }
.small { font-size: 12px; line-height: 1.45; }
.strong { font-weight: 800; }
.section { margin-top: 25px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.section-head h2, .section-head h3 { margin: 0; }
.section-head button { flex: none; }

.hero {
  position: relative; overflow: hidden; margin: -2px 0 16px; padding: 23px 21px; border-radius: 24px;
  color: #fff; background: var(--green); box-shadow: var(--shadow);
}
.hero::after { content: ""; position: absolute; width: 170px; height: 170px; right: -70px; top: -85px; border: 32px solid rgba(233,185,73,.14); border-radius: 50%; }
.hero .eyebrow { color: #f2ce79; }
.hero h1 { max-width: 510px; margin-bottom: 10px; }
.hero p { position: relative; z-index: 1; max-width: 570px; margin: 0; color: rgba(255,255,255,.75); line-height: 1.45; }

.coach-card { padding: 18px; border: 1px solid rgba(233, 185, 73, .38); border-left: 5px solid var(--gold); border-radius: var(--radius); background: #fffaf0; box-shadow: 0 5px 18px rgba(16,42,39,.05); }
.coach-card .label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 9px; color: #77560a; font-size: 10px; font-weight: 900; letter-spacing: 1.15px; text-transform: uppercase; }
.coach-card h3 { font-family: Georgia, serif; font-size: 20px; }
.coach-card p:last-child { margin-bottom: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 18px; }
.stat { min-width: 0; padding: 13px 8px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); text-align: center; }
.stat strong { display: block; font-family: Georgia, serif; font-size: 25px; line-height: 1; }
.stat span { display: block; margin-top: 6px; overflow: hidden; color: var(--ink-soft); font-size: 10px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }

.card { padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 5px 18px rgba(16,42,39,.04); }
.card + .card { margin-top: 10px; }
.card-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-row > div { min-width: 0; }
.address { margin-bottom: 5px; font-size: 16px; font-weight: 850; line-height: 1.3; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.reason { margin: 11px 0 0; padding-top: 11px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.reason strong { color: var(--ink); }
.badge { display: inline-flex; align-items: center; flex: none; padding: 5px 8px; border-radius: 999px; color: var(--green-2); background: #dcebe6; font-size: 10px; font-weight: 900; letter-spacing: .35px; text-transform: uppercase; }
.badge.warn { color: #7b450e; background: #f7e5bf; }
.badge.danger { color: #7d211d; background: #f5d8d4; }
.badge.neutral { color: #4c5553; background: #e9e8e3; }
.badge.blue { color: #1b526d; background: #dbeaf2; }

.primary, .secondary, .tertiary, .danger-button, .text-button {
  min-height: 46px; border-radius: 14px; font-weight: 850; cursor: pointer;
}
.primary { padding: 12px 18px; border: 1px solid var(--green); color: #fff; background: var(--green); box-shadow: 0 6px 14px rgba(16,42,39,.16); }
.primary.orange { border-color: var(--orange); background: var(--orange); }
.secondary { padding: 11px 16px; border: 1px solid var(--green); color: var(--green); background: transparent; }
.tertiary { padding: 10px 14px; border: 1px solid var(--line); color: var(--ink); background: var(--paper); }
.danger-button { padding: 11px 16px; border: 1px solid #d5aaa6; color: var(--red); background: #fff7f6; }
.text-button { min-height: 38px; padding: 5px 2px; border: 0; color: var(--orange-dark); background: transparent; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.button-row > * { flex: 1 1 130px; }
.full { width: 100%; }
.quick-knock { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 56px; border: 0; border-radius: 17px; color: #fff; background: var(--orange); font-size: 17px; font-weight: 900; box-shadow: 0 10px 22px rgba(169,69,33,.22); }
.quick-knock svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.field { display: block; margin-bottom: 15px; }
.field > span { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 850; }
.field small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 12px 13px; border: 1px solid #c8c5bd; border-radius: 13px; color: var(--ink); background: #fff;
}
textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
.input-action { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.input-action button { min-width: 50px; padding: 0 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0; font-size: 13px; line-height: 1.45; }
.check input { flex: none; width: 20px; min-height: 20px; margin: 0; accent-color: var(--green); }
.error { margin: -6px 0 12px; color: var(--red); font-size: 12px; font-weight: 750; }

.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.outcome {
  min-height: 72px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: var(--paper); text-align: left;
}
.outcome strong { display: block; margin-bottom: 4px; font-size: 13px; }
.outcome span { display: block; color: var(--ink-soft); font-size: 10px; line-height: 1.3; }
.outcome.selected { border-color: var(--orange); background: #fff3ea; box-shadow: inset 0 0 0 1px var(--orange); }
.outcome.dnc { color: var(--red); }

.script {
  position: relative; margin: 14px 0; padding: 17px; border-radius: 16px; color: #fff; background: var(--green);
}
.script::before { content: "SAY THIS"; display: block; margin-bottom: 8px; color: #f2ce79; font-size: 9px; font-weight: 900; letter-spacing: 1.5px; }
.script blockquote { margin: 0; font-family: Georgia, serif; font-size: 18px; line-height: 1.45; }
.objection-flow { display: grid; gap: 9px; margin: 14px 0; }
.flow-line { padding: 11px 12px; border-radius: 12px; background: #f1eee6; font-size: 12px; line-height: 1.45; }
.flow-line strong { display: block; margin-bottom: 3px; color: var(--orange-dark); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; }
.flow-line.response { color: #fff; background: var(--green-2); }
.flow-line.response strong { color: #f2ce79; }

.stepper { display: flex; gap: 6px; margin: 0 0 19px; }
.stepper span { height: 4px; flex: 1; border-radius: 99px; background: #d8d4ca; }
.stepper span.on { background: var(--orange); }
.property-pick { display: block; width: 100%; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; text-align: left; }
.property-pick:last-child { border-bottom: 0; }
.property-pick strong, .property-pick span { display: block; }
.property-pick span { margin-top: 4px; color: var(--ink-soft); font-size: 11px; }

.tabs { display: flex; gap: 5px; overflow-x: auto; margin: 0 -16px 15px; padding: 0 16px 3px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; min-height: 39px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-soft); background: var(--paper); font-size: 12px; font-weight: 800; }
.tabs button.active { border-color: var(--green); color: #fff; background: var(--green); }
.queue-actions { display: flex; gap: 7px; margin-top: 12px; }
.queue-actions button { min-height: 40px; flex: 1; padding: 8px; font-size: 11px; }

.timeline { position: relative; margin-left: 6px; padding-left: 23px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: 7px; width: 1px; background: #cfcac0; }
.event { position: relative; padding: 0 0 20px; }
.event::before { content: ""; position: absolute; left: -23px; top: 4px; width: 11px; height: 11px; border: 3px solid var(--cream); border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.event h3 { margin-bottom: 3px; font-size: 14px; }
.event p { margin-bottom: 5px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.event time { color: #7a817f; font-size: 10px; font-weight: 750; }

.method { counter-reset: method; margin: 0; padding: 0; list-style: none; }
.method li { position: relative; min-height: 42px; padding: 1px 0 17px 50px; line-height: 1.45; }
.method li::before { counter-increment: method; content: counter(method); position: absolute; left: 0; top: -4px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--green); font-family: Georgia, serif; font-weight: 800; }
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { padding: 15px 2px; font-weight: 850; cursor: pointer; }
.accordion details > div { padding: 0 2px 16px; }
.warning-box { padding: 13px; border: 1px solid #efd29d; border-radius: 13px; color: #654611; background: #fff8e8; font-size: 12px; line-height: 1.45; }
.empty { padding: 28px 20px; border: 1px dashed #c7c2b7; border-radius: var(--radius); color: var(--ink-soft); text-align: center; }
.empty .empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 18px; color: var(--orange-dark); background: #f8e5d8; font-family: Georgia, serif; font-size: 25px; }
.empty h3 { color: var(--ink); }
.empty p { margin-bottom: 14px; font-size: 13px; line-height: 1.45; }

.bottom-nav {
  position: fixed; z-index: 30; left: 50%; bottom: 0; width: min(100%, 840px); height: calc(72px + var(--safe-bottom));
  transform: translateX(-50%); display: grid; grid-template-columns: repeat(5, 1fr); padding: 7px 6px var(--safe-bottom);
  border-top: 1px solid rgba(20,33,31,.1); background: rgba(255,253,248,.96); backdrop-filter: blur(18px);
}
.bottom-nav button { position: relative; min-width: 0; border: 0; border-radius: 13px; color: #6a7471; background: transparent; font-size: 9px; font-weight: 800; }
.bottom-nav button[aria-current="page"] { color: var(--green); background: #e7eee9; }
.bottom-nav svg { width: 22px; height: 22px; display: block; margin: 1px auto 4px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bottom-nav b { position: absolute; top: 2px; left: calc(50% + 7px); min-width: 16px; height: 16px; padding: 2px 4px; border-radius: 99px; color: #fff; background: var(--orange); font-size: 9px; }

.sheet { position: fixed; z-index: 80; inset: 0; display: grid; align-items: end; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; border: 0; background: rgba(9,26,24,.54); backdrop-filter: blur(2px); }
.sheet-panel { position: relative; width: min(100%, 720px); max-height: 90dvh; margin: 0 auto; overflow-y: auto; padding: 12px 18px calc(24px + var(--safe-bottom)); border-radius: 26px 26px 0 0; background: var(--paper); box-shadow: 0 -20px 50px rgba(0,0,0,.18); animation: sheet-up .22s ease-out; }
@keyframes sheet-up { from { transform: translateY(45px); opacity: .5; } }
.sheet-handle { width: 42px; height: 5px; margin: 0 auto 17px; border-radius: 99px; background: #d0cbc1; }
.sheet-panel h2 { padding-right: 32px; }
.sheet-close { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border: 0; border-radius: 13px; color: var(--ink-soft); background: #efede7; font-size: 20px; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: calc(88px + var(--safe-bottom)); width: max-content; max-width: calc(100% - 30px); transform: translateX(-50%); padding: 12px 15px; border-radius: 13px; color: #fff; background: var(--ink); box-shadow: 0 8px 28px rgba(0,0,0,.25); font-size: 12px; font-weight: 750; text-align: center; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.map-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 10px; }
.map-search input { min-width: 0; height: 48px; padding: 0 14px; border: 1px solid #d8d2c7; border-radius: 13px; color: var(--ink); background: #fff; font: inherit; }
.map-search button { padding-inline: 16px; }
.search-results { position: relative; z-index: 8; display: grid; margin: -2px 0 10px; overflow: hidden; border: 1px solid #d8d2c7; border-radius: 13px; background: #fff; box-shadow: 0 10px 24px rgba(16,42,39,.1); }
.search-results button { padding: 12px 14px; border: 0; border-bottom: 1px solid #eee9df; color: var(--ink); background: #fff; text-align: left; font-size: 12px; line-height: 1.35; }
.search-results button:last-child { border-bottom: 0; }
.property-map-wrap { position: relative; margin: 0 -16px; }
.property-map { z-index: 1; width: 100%; height: min(54dvh, 520px); min-height: 390px; border-block: 1px solid #d4cec2; background: #e8ebe6; }
.map-locate { position: absolute; z-index: 500; top: 12px; right: 12px; min-height: 44px; padding: 0 13px; border: 1px solid rgba(16,42,39,.18); border-radius: 13px; color: var(--green); background: rgba(255,255,255,.96); box-shadow: 0 4px 16px rgba(16,42,39,.18); font-weight: 850; }
.map-locate span { margin-left: 4px; }
.map-help { margin: 10px 0; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.selection-card { margin: 0 0 18px; padding: 14px; border: 1px solid #ded8cc; border-radius: 17px; background: #fffdf8; box-shadow: 0 7px 22px rgba(16,42,39,.06); }
.selection-card.is-selected { border-color: #e7b44c; box-shadow: 0 0 0 2px rgba(241,190,68,.15); }
.property-marker-shell { background: none; border: 0; }
.property-marker { display: block; width: 22px; height: 22px; border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #6f7774; box-shadow: 0 3px 8px rgba(0,0,0,.34); }
.property-marker.new { background: #707875; }
.property-marker.contacted { background: #2d875e; }
.property-marker.no-answer { background: #e3a928; }
.property-marker.return { background: #4c77ae; }
.property-marker.due { background: #d86a37; }
.property-marker.appointment { background: #236db0; }
.property-marker.dnc { background: #b64238; }
.property-marker.selection { width: 25px; height: 25px; background: #102a27; box-shadow: 0 0 0 5px rgba(241,190,68,.42), 0 4px 10px rgba(0,0,0,.35); }
.gps-dot { fill: #1677d2; stroke: #fff; stroke-width: 4; }
.gps-accuracy { fill: #1677d2; fill-opacity: .12; stroke: #1677d2; stroke-opacity: .5; }
.map-popup-button { width: 100%; margin-top: 8px; padding: 8px 10px; border: 0; border-radius: 8px; color: #fff; background: #102a27; font-weight: 800; }
.leaflet-control-attribution { font-size: 9px; }

@media (min-width: 620px) {
  main { padding-left: 24px; padding-right: 24px; }
  .topbar { padding-left: 25px; padding-right: 25px; }
  .outcome-grid { grid-template-columns: repeat(3, 1fr); }
  .tabs { margin-left: -24px; margin-right: -24px; padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 370px) {
  main { padding-left: 12px; padding-right: 12px; }
  .stat-grid { gap: 5px; }
  .stat { padding-left: 4px; padding-right: 4px; }
  .stat strong { font-size: 22px; }
  .bottom-nav span { font-size: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
