  :root {
    --ground: #eef0ee;
    --surface: #ffffff;
    --surface-2: #e3e7e6;
    --ink: #1f272b;
    --muted: #5a676d;
    --line: #d2d8d7;
    --slate: #34434a;
    --slate-ink: #f3f5f4;
    --hivis: #e8590c;
    --hivis-soft: #fde6d8;
    --hivis-ink: #a33d05;
    --go: #2f8a4f;
    --go-soft: #dcf0e2;
    --storm: #2b6cb0;
    --storm-soft: #dde9f7;
    --bubble-in: #e3e7e6;
    --bubble-out: #2b6cb0;
    --bubble-out-ink: #ffffff;
    --font-display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
    --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
    color-scheme: light;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --ground: #13191c; --surface: #1b2327; --surface-2: #243035; --ink: #e8eeee; --muted: #9aa8ad;
      --line: #2e3b40; --slate: #0e1417; --slate-ink: #e8eeee; --hivis: #ff7a33; --hivis-soft: #3b2215; --hivis-ink: #ffb088;
      --go: #62c486; --go-soft: #173222; --storm: #6ea8e6; --storm-soft: #172a3f;
      --bubble-in: #2a363b; --bubble-out: #3478c2; --bubble-out-ink: #ffffff;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --ground: #13191c; --surface: #1b2327; --surface-2: #243035; --ink: #e8eeee; --muted: #9aa8ad;
    --line: #2e3b40; --slate: #0e1417; --slate-ink: #e8eeee; --hivis: #ff7a33; --hivis-soft: #3b2215; --hivis-ink: #ffb088;
    --go: #62c486; --go-soft: #173222; --storm: #6ea8e6; --storm-soft: #172a3f;
    --bubble-in: #2a363b; --bubble-out: #3478c2; --bubble-out-ink: #ffffff;
    color-scheme: dark;
  }

  * { box-sizing: border-box; }
  body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--font-body); }
  .page { padding-inline: 16px; padding-block: 0 48px; }
  .wrap { max-width: 1200px; margin: 0 auto; display: grid; gap: 22px; }

  /* Top bar */
  .topbar { background: var(--slate); color: var(--slate-ink); padding-inline: 16px; }
  .topbar-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 14px; }
  .brand { display: flex; align-items: center; gap: 10px; font: 700 1.6rem/1 var(--font-display); letter-spacing: 0.01em; }
  .brand svg { width: 30px; height: 30px; }
  .brand small { font: 500 0.8rem var(--font-body); opacity: 0.75; letter-spacing: 0; }
  .personalize { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-left: auto; align-items: center; font-size: 0.85rem; }
  .personalize label { display: flex; align-items: center; gap: 6px; opacity: 0.9; }
  .personalize input { font: inherit; width: 11rem; padding: 6px 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: inherit; }
  .personalize input:focus-visible { outline: 2px solid var(--hivis); outline-offset: 1px; }

  /* Intro */
  .intro { display: grid; gap: 14px; padding-top: 26px; }
  h1 { margin: 0; font: 700 clamp(2rem, 4.2vw, 3.1rem)/1.02 var(--font-display); letter-spacing: 0.005em; text-wrap: balance; max-width: 24ch; }
  h1 em { font-style: normal; color: var(--hivis); }
  .intro p { margin: 0; color: var(--muted); max-width: 64ch; font-size: 1.05rem; }
  .controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
  .seg { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; }
  .seg button { border: 0; background: none; color: var(--muted); font: 600 0.92rem var(--font-body); padding: 8px 14px; border-radius: 6px; cursor: pointer; }
  .seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
  .btn { border: 0; border-radius: 8px; font: 700 1rem var(--font-body); padding: 11px 20px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
  .btn-play { background: var(--hivis); color: #fff; }
  .btn-play[disabled] { opacity: 0.6; cursor: progress; }
  .btn-ghost { background: none; color: var(--ink); border: 1px solid var(--line); }
  button:focus-visible { outline: 2px solid var(--hivis); outline-offset: 2px; }
  .demo-note { font-size: 0.82rem; color: var(--muted); }

  /* Stage */
  .stage { display: grid; grid-template-columns: minmax(280px, 340px) 1fr; gap: 22px; align-items: start; }
  @media (max-width: 860px) { .stage { grid-template-columns: 1fr; } .phone { margin-inline: auto; } }

  .pane-label { font: 700 0.78rem var(--font-body); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 8px; }

  /* Phone */
  .phone { width: 100%; max-width: 340px; background: #0d1214; border-radius: 38px; padding: 12px; box-shadow: 0 18px 40px -18px rgba(0,0,0,0.5); }
  .screen { background: var(--surface); border-radius: 28px; overflow: hidden; height: 600px; display: grid; grid-template-rows: auto auto 1fr auto; position: relative; }
  .status { display: flex; justify-content: space-between; font: 600 0.75rem var(--font-body); padding: 10px 20px 4px; color: var(--ink); }
  .thread-head { display: grid; justify-items: center; gap: 2px; padding: 6px 12px 10px; border-bottom: 1px solid var(--line); }
  .avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--slate); color: var(--slate-ink); display: grid; place-items: center; font: 700 1rem var(--font-display); }
  .thread-head b { font-size: 0.9rem; }
  .thread-head span { font-size: 0.72rem; color: var(--muted); }
  .thread { overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; scroll-behavior: smooth; }
  .bubble { max-width: 82%; padding: 8px 12px; border-radius: 18px; font-size: 0.9rem; line-height: 1.35; animation: pop 0.25s ease-out; }
  .bubble.in { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 6px; }
  .bubble.out { align-self: flex-end; background: var(--bubble-out); color: var(--bubble-out-ink); border-bottom-right-radius: 6px; }
  .sys { align-self: center; font-size: 0.72rem; color: var(--muted); text-align: center; }
  .sys.missed { color: var(--hivis-ink); font-weight: 600; }
  .typing { align-self: flex-start; background: var(--bubble-in); border-radius: 18px; padding: 10px 14px; display: inline-flex; gap: 4px; }
  .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
  .typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
  .composer { border-top: 1px solid var(--line); padding: 10px 12px; font-size: 0.8rem; color: var(--muted); }
  .call { position: absolute; inset: 0; background: linear-gradient(180deg, #2c3a40, #151d20); color: #fff; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 20px; }
  .call .avatar { width: 72px; height: 72px; font-size: 1.8rem; background: #45565e; }
  .call b { font: 700 1.5rem var(--font-display); }
  .call span { opacity: 0.8; font-size: 0.9rem; }
  .call .ring { font: 500 0.8rem var(--font-mono); opacity: 0.7; }
  .form-card { position: absolute; inset: 0; background: var(--surface); padding: 22px 18px; display: grid; align-content: start; gap: 10px; font-size: 0.85rem; }
  .form-card h3 { margin: 0; font: 700 1.3rem var(--font-display); }
  .form-card .field { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--ground); }
  .form-card .field small { display: block; color: var(--muted); font-size: 0.7rem; }
  .form-card .send { background: var(--slate); color: var(--slate-ink); border-radius: 8px; padding: 10px; text-align: center; font-weight: 700; }

  /* Dashboard */
  .dash { display: grid; gap: 14px; }
  .toast { background: var(--slate); color: var(--slate-ink); border-radius: 10px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; animation: pop 0.3s ease-out; }
  .toast svg { flex: 0 0 20px; height: 20px; color: var(--hivis); margin-top: 2px; }
  .toast b { display: block; }
  .toast span { opacity: 0.85; font-size: 0.9rem; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  @media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }
  .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
  .stat b { display: block; font: 700 1.9rem/1.05 var(--font-display); font-variant-numeric: tabular-nums; }
  .stat span { font-size: 0.82rem; color: var(--muted); }
  .stat.hot b { color: var(--hivis); }

  .board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  @media (max-width: 700px) { .board { grid-template-columns: 1fr; } }
  .col { background: var(--surface-2); border-radius: 10px; padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 150px; }
  .col h3 { margin: 0 2px 2px; display: flex; justify-content: space-between; font: 700 1.05rem var(--font-display); letter-spacing: 0.02em; }
  .col h3 span { font: 500 0.78rem var(--font-mono); color: var(--muted); }
  .card { background: var(--surface); border-radius: 8px; padding: 10px 12px; display: grid; gap: 5px; font-size: 0.85rem; border: 1px solid var(--line); animation: pop 0.3s ease-out; }
  .card.live { border-color: var(--hivis); box-shadow: 0 0 0 2px var(--hivis-soft); }
  .card-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
  .card-top b { font-size: 0.95rem; }
  .card-top time { font: 500 0.72rem var(--font-mono); color: var(--muted); white-space: nowrap; }
  .card p { margin: 0; color: var(--muted); }
  .card .issue { color: var(--ink); }
  .tags { display: flex; flex-wrap: wrap; gap: 5px; }
  .tag { font: 600 0.7rem var(--font-body); padding: 2px 7px; border-radius: 4px; background: var(--surface-2); color: var(--muted); }
  .tag.urgent { background: var(--hivis-soft); color: var(--hivis-ink); }
  .tag.claim { background: var(--storm-soft); color: var(--storm); }
  .tag.booked { background: var(--go-soft); color: var(--go); }
  .tag.src { background: none; border: 1px solid var(--line); }

  .log { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
  .log h3 { margin: 0 0 6px; font: 700 1.05rem var(--font-display); }
  .log ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-size: 0.85rem; }
  .log li { display: grid; grid-template-columns: 5.5em 1fr; gap: 8px; }
  .log time { font: 500 0.75rem var(--font-mono); color: var(--muted); padding-top: 2px; }
  .log .empty { color: var(--muted); }

  /* Why it pays */
  .pays { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
  .pays h2 { grid-column: 1 / -1; margin: 0; font: 700 1.6rem var(--font-display); }
  .pays div b { display: block; font: 700 1.1rem var(--font-display); letter-spacing: 0.02em; }
  .pays div p { margin: 4px 0 0; color: var(--muted); font-size: 0.93rem; }
  .fine { font-size: 0.8rem; color: var(--muted); margin: 0; }

  @keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) {
    .bubble, .card, .toast { animation: none; }
    .typing i { animation: none; }
    .thread { scroll-behavior: auto; }
  }

/* ---------- Website ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a { color: var(--storm); }
.site-top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; }
.brand { color: inherit; text-decoration: none; }
.site-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-left: auto; }
.site-links a { color: var(--slate-ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; opacity: 0.9; }
.site-links a:hover { opacity: 1; text-decoration: underline; }
.site-links a.nav-cta { color: #fff; opacity: 1; padding: 8px 14px; font-size: 0.92rem; text-decoration: none; }
@media (max-width: 720px) { .site-links a:not(.nav-cta) { display: none; } }
a.btn { text-decoration: none; }
a:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--hivis); outline-offset: 2px; }

.wrap > section { scroll-margin-top: 80px; }
.hero { display: grid; gap: 18px; padding-block: 48px 8px; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 18ch; }
.hero p { margin: 0; color: var(--muted); max-width: 62ch; font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.proof { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.proof li::before { content: "✓"; color: var(--go); margin-right: 6px; }

h2 { margin: 0; font: 700 clamp(1.7rem, 3.4vw, 2.4rem)/1.08 var(--font-display); text-wrap: balance; }
.section-head { display: grid; gap: 6px; }
.section-head p { margin: 0; color: var(--muted); max-width: 64ch; }
.demo, .how, .features, .pricing, .faq, .contact { display: grid; gap: 18px; padding-top: 36px; border-top: 1px solid var(--line); }
.demo .personalize { margin-left: 0; font-size: 0.92rem; font-weight: 600; }
.demo .personalize input { border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 12rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: counter(step); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--hivis); color: #fff; font: 700 1rem var(--font-display); }
.steps b { font: 700 1.25rem var(--font-display); }
.steps p { margin: 0; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px 28px; }
.feature-grid b { display: block; font: 700 1.15rem var(--font-display); }
.feature-grid p { margin: 4px 0 0; color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; max-width: 880px; }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: grid; gap: 10px; }
.plan.featured { border: 2px solid var(--hivis); }
.plan h3 { margin: 0; font: 700 1.4rem var(--font-display); }
.price { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.price b { font: 700 2.6rem/1 var(--font-display); }
.price span { color: var(--muted); }
.plan-note { margin: 0; color: var(--muted); font-size: 0.93rem; }
.plan ul { margin: 4px 0 8px; padding-left: 1.2em; display: grid; gap: 4px; }
.plan .btn { justify-content: center; }

.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

.contact form { display: grid; gap: 14px; max-width: 820px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.contact label { display: grid; gap: 5px; font-weight: 600; font-size: 0.93rem; }
.contact input, .contact textarea { font: inherit; font-weight: 400; color: var(--ink); background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; }
.contact textarea { resize: vertical; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-status { margin: 0; color: var(--go); font-weight: 600; }
.form-status.err { color: var(--hivis-ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.site-foot { background: var(--slate); color: var(--slate-ink); padding-inline: 16px; padding-block: 22px calc(22px + env(safe-area-inset-bottom, 0px)); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; align-items: center; }
.foot-inner p { margin: 0; }
.foot-inner nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-inner a { color: var(--slate-ink); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding-block: 36px 48px; display: grid; gap: 6px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); max-width: none; }
.legal h2 { font-size: 1.5rem; margin-top: 18px; }
.legal p, .legal li { color: var(--ink); }
.legal .updated { color: var(--muted); margin: 0 0 8px; }
[hidden] { display: none !important; }
.log li.empty { display: block; }

/* Demo lead board: one lead, a progress bar, and the roofer's alerts */
.dash { align-content: start; }
.dash-head { display: grid; gap: 2px; }
.dash-head .pane-label { margin: 0; }
.dash-sub { margin: 0; color: var(--muted); font-size: 0.92rem; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; counter-reset: st; }
.stepper li { counter-increment: st; background: var(--surface-2); color: var(--muted); border-radius: 8px; padding: 9px 10px; font-weight: 600; font-size: 0.88rem; line-height: 1.2; display: flex; gap: 8px; align-items: center; transition: background 0.3s, color 0.3s; }
.stepper li::before { content: counter(st); flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--muted); font: 700 0.8rem var(--font-body); }
.stepper li.current { background: var(--hivis); color: #fff; }
.stepper li.current::before { color: var(--hivis-ink); }
.stepper li.done { background: var(--go-soft); color: var(--go); }
.stepper li.done::before { content: "✓"; color: var(--go); }
.lead { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; transition: border-color 0.3s; }
.lead.urgent { border-color: var(--hivis); box-shadow: inset 4px 0 0 var(--hivis); }
.lead-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 10px; align-items: center; }
.lead-top b { font: 700 1.3rem var(--font-display); font-variant-numeric: tabular-nums; }
.lead-fields { margin: 0; display: grid; grid-template-columns: minmax(8.5em, auto) 1fr; gap: 8px 14px; font-size: 0.94rem; }
.lead-fields dt { color: var(--muted); }
.lead-fields dd { margin: 0; font-weight: 600; border-radius: 4px; transition: background 1.2s; }
.lead-fields dd.waiting { color: var(--muted); font-weight: 400; font-style: italic; }
.lead-fields dd.fresh { background: var(--hivis-soft); animation: fresh 1.6s ease-out forwards; }
@keyframes fresh { from { background: var(--hivis-soft); } to { background: transparent; } }
@media (max-width: 480px) { .lead-fields { grid-template-columns: 1fr; gap: 2px; } .lead-fields dd { margin-bottom: 8px; } .stepper li { font-size: 0.78rem; padding: 8px 6px; } }
.alerts { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.alerts h3 { margin: 0 0 8px; font: 700 1.1rem var(--font-display); }
.alerts ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerts li { display: grid; grid-template-columns: 4.5em 1fr; gap: 10px; font-size: 0.9rem; animation: pop 0.3s ease-out; }
.alerts time { font: 500 0.78rem var(--font-mono); color: var(--muted); padding-top: 2px; }
@media (prefers-reduced-motion: reduce) { .lead-fields dd.fresh, .alerts li { animation: none; } }
