/* Keller AI Automation — marketing site styles */
:root {
  --bg: #f6f4f0;
  --bg-elevated: #ffffff;
  --ink: #14171c;
  --ink-muted: #4a525c;
  --ink-faint: #7a8490;
  --line: #e2ddd4;
  --accent: #0d6e6e;
  --accent-hover: #0a5757;
  --accent-soft: #e6f3f3;
  --warm: #c45c26;
  --hero-bg: #12151a;
  --hero-ink: #f3f0ea;
  --hero-muted: #a8b0ba;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(20, 23, 28, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0 0 1em; color: var(--ink-muted); }
.lead { font-size: 1.2rem; color: var(--ink-muted); max-width: 42rem; }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 240, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}
.logo {
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.05rem;
  white-space: nowrap;
}
.logo-mark {
  display: inline-block;
  height: 28px;
  width: auto;
  margin: -6px 0.5rem -6px 0;
  vertical-align: middle;
  position: relative;
  top: -2px;
  opacity: 0.85;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta {
  display: inline-flex !important;
  align-items: center;
  background: var(--accent);
  color: #fff !important;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent-hover); color: #fff !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    top: calc(100% + 0.4rem);
    flex-direction: column;
    align-items: stretch;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.75rem;
    gap: 0.15rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.65rem 0.75rem; border-radius: 8px; }
  .nav-links a:hover { background: var(--accent-soft); }
  .nav-cta { justify-content: center; margin-top: 0.35rem; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--hero-ink);
  border: 1px solid rgba(243, 240, 234, 0.35);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: var(--hero-ink); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--ink-faint); background: var(--bg-elevated); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Hero */
.hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% 40%;
  height: 70%;
  background: radial-gradient(ellipse at center, rgba(13, 110, 110, 0.35), transparent 65%);
  pointer-events: none;
}
.hero .container { position: relative; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dcdc8;
  margin-bottom: 1rem;
}
.hero h1 { color: var(--hero-ink); max-width: 16ch; }
.hero .lead { color: var(--hero-muted); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: end;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
}
.hero-card h3 { color: var(--hero-ink); margin-bottom: 0.75rem; font-size: 1.05rem; }
.hero-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.hero-card li {
  color: var(--hero-muted);
  padding-left: 1.4rem;
  position: relative;
  font-size: 0.95rem;
}
.hero-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Sections */
.section { padding: clamp(3rem, 6vw, 4.5rem) 0; }
.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 2rem;
}
.section-header .lead { margin: 0; }
.section-alt { background: var(--bg-elevated); border-block: 1px solid var(--line); }

.kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* Cards / grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.card-grid.card-grid-2x2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .card-grid, .card-grid.card-grid-2x2 { grid-template-columns: 1fr; }
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}
.section-alt .card { background: var(--bg); }
.card.featured {
  border-color: rgba(13, 110, 110, 0.35);
  box-shadow: var(--shadow);
  position: relative;
}
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Feature band */
.feature-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 800px) {
  .feature-band { grid-template-columns: 1fr; }
}
.checklist {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}
.checklist li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  color: var(--ink-muted);
}
.checklist .mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}
@media (max-width: 700px) {
  .stat-row { grid-template-columns: 1fr; }
}
.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.stat strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}
.stat span { color: var(--ink-faint); font-size: 0.9rem; }

/* About page credibility */
.cred-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.cred {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.cred .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.cred p { margin: 0; }

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 800px) {
  .contact-layout { grid-template-columns: 1fr; }
}
.form {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.form-row { margin-bottom: 1rem; }
.form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 2px solid rgba(13, 110, 110, 0.35);
  border-color: var(--accent);
}
.form textarea { min-height: 140px; resize: vertical; }
.form-note {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin: 0.75rem 0 0;
}
.form-success {
  display: none;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid rgba(13, 110, 110, 0.25);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.form-success.show { display: block; }

.cta-band {
  background: var(--hero-bg);
  color: var(--hero-ink);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
  text-align: center;
}
.cta-band h2 { color: var(--hero-ink); }
.cta-band p { color: var(--hero-muted); max-width: 36rem; margin-inline: auto; }

/* Page hero (inner pages) */
.page-hero {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { margin-bottom: 0.4em; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--ink-faint);
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.footer-inner a { color: var(--ink-muted); text-decoration: none; }
.footer-inner a:hover { color: var(--ink); }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Pricing page */
.pricing-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 860px) {
  .pricing-compare { grid-template-columns: 1fr; }
}
.pricing-card {
  display: flex;
  flex-direction: column;
}
.pricing-card .checklist { flex: 1; align-content: start; gap: 0.5rem; }
.price-block {
  margin: 1.25rem 0 1rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.pricing-card.featured .price-block {
  background: var(--accent-soft);
  border-color: rgba(13, 110, 110, 0.25);
}
.price-amount {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
}
.price-amount span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin-left: 0.2rem;
}
.price-note {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}
.price-note strong { color: var(--ink); font-weight: 650; }

/* ---------- Voice demo ---------- */
.demo-card {
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
}
.demo-orb {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 0.5rem auto 1.5rem;
}
.demo-core {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3fa3a3, var(--accent) 60%, var(--accent-hover));
  box-shadow: 0 10px 30px rgba(13, 110, 110, 0.35);
  transition: transform 0.2s ease;
}
.demo-core { display: flex; align-items: center; justify-content: center; }
.demo-core-mark {
  width: 58%;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  pointer-events: none;
}
.demo-ring {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  border: 2px solid rgba(13, 110, 110, 0.35);
  opacity: 0;
}
.demo-card[data-state="connecting"] .demo-core { animation: demo-breathe 1.4s ease-in-out infinite; }
.demo-card[data-state="live"] .demo-core { transform: scale(1.02); }
.demo-card.is-speaking .demo-core { transform: scale(1.1); }
.demo-card.is-speaking .demo-ring { animation: demo-ripple 1.6s ease-out infinite; }
.demo-card.is-speaking .demo-ring + .demo-ring { animation-delay: 0.8s; }
.demo-card[data-state="ended"] .demo-core { filter: grayscale(0.6); opacity: 0.75; }
@keyframes demo-breathe {
  0%, 100% { transform: scale(0.94); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes demo-ripple {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.75); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .demo-card .demo-core, .demo-card .demo-ring { animation: none !important; }
}
.demo-status {
  font-size: 1.2rem;
  font-weight: 650;
  color: var(--ink);
  margin: 0 0 0.25rem;
}
.demo-timer {
  margin: 0;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.demo-actions { justify-content: center; }
.demo-audio-link {
  margin-top: 0.85rem;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.demo-error {
  margin: 1rem auto 0;
  max-width: 32rem;
  background: #fdeceb;
  color: #8b2e24;
  border: 1px solid #f0c4be;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
}
.demo-notes {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.demo-notes li { margin: 0.35rem 0; padding-left: 1.1rem; position: relative; }
.demo-notes li::before { content: "•"; position: absolute; left: 0; color: var(--accent); }
.demo-card [hidden] { display: none !important; }

/* ---------- Usage dashboard (hidden /dash) ---------- */
.dash-title { margin-bottom: 0.2em; }
.dash-updated { color: var(--ink-faint); margin: 0 0 1.25rem; font-size: 0.95rem; }
.dash-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
@media (max-width: 800px) { .dash-stats { grid-template-columns: 1fr; } }
.dash-stat { padding: 1.1rem 1.2rem; }
.dash-label { font-size: 0.82rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.dash-value { font-size: 1.7rem; font-weight: 750; letter-spacing: -0.02em; color: var(--ink); margin: 0.25rem 0 0.35rem; font-variant-numeric: tabular-nums; }
.dash-note { font-size: 0.88rem; color: var(--ink-muted); margin: 0; }
.dash-h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
.dash-table-wrap { padding: 0; overflow-x: auto; margin-bottom: 0.75rem; }
.dash-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.dash-table th, .dash-table td { text-align: left; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.dash-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); font-weight: 650; }
.dash-table tfoot td { font-weight: 700; border-bottom: 0; }
.dash-fp { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.dash-table td.dash-split { white-space: pre; font-size: 0.85em; color: var(--muted, #667); line-height: 1.4; }
.dash-active { margin-left: 0.5rem; font-family: var(--font); font-size: 0.72rem; font-weight: 650; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.1rem 0.5rem; }

/* Hidden /comparison page */
.cmp-chart-card { padding: 1rem 1.1rem; margin-bottom: 1rem; }
.cmp-legend { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--ink-muted); margin-bottom: 0.5rem; }
.cmp-sw { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 0.45rem; vertical-align: middle; }
.cmp-sw-emp { background: #c2410c; }
.cmp-sw-svc { background: var(--accent); }
.cmp-chart { position: relative; width: 100%; }
.cmp-chart svg { display: block; width: 100%; height: auto; font-family: var(--font); }
.cmp-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 0.8rem; padding: 0.4rem 0.6rem; border-radius: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; transform: translate(-50%, -110%); }
.cmp-panel { padding: 1.1rem 1.2rem; margin-bottom: 2rem; display: grid; gap: 0.9rem; }
.cmp-ctl { display: grid; gap: 0.3rem; }
.cmp-ctl-label { font-size: 0.95rem; color: var(--ink); }
.cmp-ctl-label b { font-variant-numeric: tabular-nums; margin-left: 0.4rem; }
.cmp-ctl input[type=range] { width: 100%; max-width: 480px; }
.cmp-check { font-size: 0.95rem; display: flex; gap: 0.5rem; align-items: baseline; }
.cmp-sh-svc { background: rgba(22,163,74,0.35); height: 10px; }
.cmp-sh-emp { background: rgba(194,65,12,0.15); height: 10px; }
.cmp-table-wrap { max-height: 560px; overflow-y: auto; }
.cmp-table-wrap thead th { position: sticky; top: 0; background: var(--bg, #fff); z-index: 1; }
.cmp-whole td { font-weight: 700; background: rgba(0,0,0,0.03); }
.cmp-neg { color: #b91c1c; }
.dash-filters { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin: 0.5rem 0 1rem; }
.dash-filter { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.95rem; cursor: pointer; }
.demo-suggest { margin-top: 1.25rem; text-align: left; }
.demo-suggest p { margin: 0 0 0.4rem; }
.demo-suggest ul { margin: 0; padding-left: 1.2rem; color: var(--ink-muted); }
.demo-suggest li { margin: 0.2rem 0; }
.learn-hook { font-size: 1.35rem; font-weight: 700; line-height: 1.35; color: var(--accent); margin-bottom: 1rem; }

/* ---- Self-Improvement Portal (muni /improve) ---- */
.improve-entry { justify-content: center; margin-top: 1.25rem; }
.improve-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.improve-updated { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }
.improve-cat { margin-bottom: 2rem; }
.improve-cat h2 { font-size: 1.25rem; margin: 0 0 0.75rem; color: var(--ink); }
.improve-qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.improve-qcard { display: block; padding: 1rem 1.15rem; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.improve-qcard:hover, .improve-qcard:focus-visible { border-color: var(--accent); box-shadow: var(--shadow); }
.improve-qtext { margin: 0; line-height: 1.5; }
.improve-calls { color: var(--ink-muted); white-space: nowrap; }
.improve-review { margin-bottom: 0.4rem; display: inline-block; background: #fff4e5; color: var(--warm); }
.improve-chat-wrap { max-width: 820px; }
.improve-back { display: inline-block; margin-bottom: 1rem; color: var(--accent); text-decoration: none; }
.improve-qhead { padding: 1.15rem 1.25rem; margin-bottom: 1rem; }
.improve-qhead .improve-qtext { font-size: 1.2rem; font-weight: 600; margin-top: 0.4rem; }
.improve-meta { margin: 0; color: var(--ink-faint); font-size: 0.92rem; }
.improve-status { margin-left: 0.5rem; color: var(--accent); }
.improve-thread { padding: 1rem; min-height: 40vh; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; }
.improve-msg p { margin: 0; white-space: pre-wrap; }
.improve-system { align-self: center; text-align: center; color: var(--ink-faint); font-size: 0.85rem; max-width: 90%; }
.improve-staff, .improve-agent { max-width: 80%; padding: 0.6rem 0.85rem; border-radius: 12px; }
.improve-staff { align-self: flex-end; background: var(--accent-soft); }
.improve-agent { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.improve-who { display: block; font-size: 0.75rem; color: var(--ink-faint); margin-bottom: 0.15rem; }
.improve-compose { margin-top: 1rem; }
.improve-compose textarea { width: 100%; font: inherit; padding: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elevated); resize: vertical; margin-bottom: 0.6rem; }
.improve-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(18, 21, 26, 0.55); display: flex; align-items: stretch; justify-content: center; padding: 2vh 1rem; }
.improve-overlay[hidden] { display: none; }
.improve-modal { width: min(100%, 860px); background: var(--bg-elevated); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.improve-modal .improve-qhead { margin: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.improve-qhead-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.improve-modal .improve-thread { flex: 1; min-height: 0; max-height: none; border-radius: 0; background: var(--bg); }
.improve-modal .improve-compose { margin: 0; padding: 0.85rem 1.25rem 0; border-top: 1px solid var(--line); }
.improve-modal .demo-error { margin: 0.5rem 1.25rem 0; }
.improve-hint { margin: 0; padding: 0.4rem 1.25rem 0.85rem; font-size: 0.82rem; color: var(--ink-faint); }
body.improve-open { overflow: hidden; }
@media (max-width: 640px) { .improve-overlay { padding: 0; } .improve-modal { border-radius: 0; } }
.improve-steps { display: inline-flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.85rem; color: var(--ink-muted); }
.improve-steps-compact { gap: 0.55rem; font-size: 0.78rem; margin-bottom: 0.35rem; color: var(--ink-faint); }
.improve-step { display: inline-flex; align-items: center; gap: 0.25rem; cursor: default; }
.improve-step input { accent-color: var(--accent); margin: 0; pointer-events: none; }
.improve-step-denied { color: #8b2e24; font-weight: 600; }
.improve-step-denied input { accent-color: #b23b2e; }
.improve-qcard .improve-steps { display: flex; }

.improve-filters { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: center; margin-bottom: 1rem; }
.improve-search { flex: 1 1 16rem; padding: 0.55rem 0.75rem; border: 1px solid #c9ccd3; border-radius: 6px; font: inherit; }
.improve-filter { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.improve-filter label { display: inline-flex; gap: 0.35rem; align-items: center; cursor: pointer; }
.improve-action { padding: 0.5rem 0.6rem; border: 1px solid #c9ccd3; border-radius: 6px; font: inherit; background: #fff; }

/* Chat pop-up layout: header + transcript (flexes, scrolls) + compact compose + collapsed hints; sized to 100dvh. */
.improve-overlay { height: 100vh; height: 100dvh; padding: 2dvh 1rem; }
.improve-modal { height: 100%; max-height: 100%; }
.improve-modal .improve-qhead { flex: 0 0 auto; padding: 0.7rem 1rem; }
.improve-modal .improve-qhead .improve-qtext { font-size: 1.05rem; margin-top: 0.25rem; max-height: 4.8em; overflow-y: auto; }
.improve-modal .improve-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.improve-modal .improve-compose { flex: 0 0 auto; display: flex; gap: 0.5rem; align-items: flex-end; padding: 0.5rem 0.75rem; }
.improve-modal .improve-compose textarea { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0.5rem 0.65rem; max-height: 30dvh; resize: none; }
.improve-controls { display: flex; flex-direction: column; gap: 0.35rem; flex: 0 0 auto; }
.improve-controls .improve-action, .improve-controls .btn { padding: 0.4rem 0.6rem; font-size: 0.9rem; min-width: 6.5rem; }
.improve-modal > #q-approve-note { flex: 0 0 auto; padding: 0.25rem 1rem 0.35rem; margin: 0; font-size: 0.82rem; color: var(--ink-muted); }
.improve-hints { flex: 0 0 auto; padding: 0 1rem 0.4rem; font-size: 0.82rem; color: var(--ink-faint); }
.improve-hints summary { cursor: pointer; padding: 0.15rem 0; width: max-content; }
.improve-hints .improve-hint { padding: 0.2rem 0 0; }
@media (max-width: 640px) {
  .improve-overlay { padding: 0; }
  .improve-modal .improve-qhead { padding: 0.55rem 0.75rem; }
  .improve-modal .improve-thread { padding: 0.65rem; }
  .improve-close { padding: 0.35rem 0.75rem; font-size: 0.85rem; }
  .improve-controls .improve-action, .improve-controls .btn { min-width: 5.5rem; font-size: 0.85rem; padding: 0.35rem 0.5rem; }
}
.improve-kb { margin-left: 0.5rem; font-size: 0.75rem; }
.improve-kb-live { background: #e6f4ea; color: #1e6b34; }
.improve-kb-pending { background: #fff4e5; color: #8a5300; }
/* Source badges (Call / Chat) and resident chat transcripts in the question view. */
.improve-src-wrap { display: inline-flex; gap: 0.3rem; vertical-align: middle; }
.improve-src { font-size: 0.72rem; padding: 0.1rem 0.45rem; }
.improve-src-call { background: #e8eefb; color: #1f3f86; }
.improve-src-chat { background: #efe7fb; color: #5a2d91; }
.improve-transcripts { margin-top: 0.45rem; font-size: 0.9rem; }
.improve-transcripts summary { cursor: pointer; color: var(--accent); width: max-content; max-width: 100%; }
.improve-transcripts-body { max-height: 38dvh; overflow-y: auto; margin-top: 0.4rem; padding-right: 0.25rem; }
.improve-rchat + .improve-rchat { margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.improve-rchat-head { font-size: 0.85rem; font-weight: 600; margin: 0 0 0.3rem; color: var(--ink-muted); }
.improve-rchat-note { margin: 0 0 0.4rem; color: var(--ink-muted); font-size: 0.85rem; }
.improve-rchat-turns { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.improve-rchat-turn { max-width: 85%; padding: 0.45rem 0.7rem; border-radius: 10px; }
.improve-rchat-turn p { margin: 0; white-space: pre-wrap; line-height: 1.45; }
.improve-rchat-resident { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.improve-rchat-assistant { align-self: flex-end; background: #f3f0fa; }
.improve-rchat-turn .improve-who { color: var(--ink-muted); }

/* Portal: link back to the muni site (a real link styled as a secondary button; AA contrast, visible focus) */
.improve-learn-row { margin: 1.25rem 0 0; }
.improve-learn { background: var(--bg-elevated); color: var(--accent); border: 2px solid var(--accent); padding: 0.6rem 1.15rem; font-size: 0.98rem; }
.improve-learn:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); }
.improve-learn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (max-width: 480px) { .improve-learn { display: flex; width: 100%; } }

/* Muni Salem demo page, portal-session (town) view: call button visibly disabled, own demo site link */
.demo-start-staff[aria-disabled="true"],
.demo-start-staff[aria-disabled="true"]:hover { background: #e3e6e9; color: #4a525c; cursor: not-allowed; transform: none; }
.demo-own-site { color: var(--accent); border: 2px solid var(--accent); background: var(--bg-elevated); }
.demo-own-site:hover { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-hover); }
.demo-start-staff:focus-visible, .demo-own-site:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.demo-staff-note { margin: 0.75rem 0 0; color: var(--ink-muted); font-size: 0.92rem; }
@media (max-width: 480px) { .demo-start-staff, .demo-own-site { width: 100%; } }

/* ==========================================================================
   Modern restyle (branch restyle-modern): bright, airy, one accent.
   Overrides only; markup and behavior are unchanged.
   ========================================================================== */
:root {
  --bg: #ffffff;
  --bg-elevated: #ffffff;
  --bg-soft: #f5f7fb;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-faint: #64748b;
  --line: #e7ebf2;
  --accent: #3355ff;
  --accent-hover: #2441d6;
  --accent-soft: #eef1ff;
  --hero-bg: #ffffff;
  --hero-ink: #0f172a;
  --hero-muted: #475569;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, 0.04), 0 24px 56px rgba(15, 23, 42, 0.10);
  --font: "Inter", "SF Pro Text", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Inter", "SF Pro Display", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --max: 1160px;
}
body { font-size: 1rem; line-height: 1.65; background: var(--bg); }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -0.03em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 750; line-height: 1.05; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); font-weight: 720; line-height: 1.12; }
h3 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.015em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; }

/* Header: white, hairline, roomy */
.site-header { background: rgba(255, 255, 255, 0.85); border-bottom: 1px solid var(--line); }
.nav-links a { font-weight: 550; color: var(--ink-muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { border-radius: 999px; box-shadow: 0 6px 16px rgba(51, 85, 255, 0.25); }

/* Buttons: pill, confident primary */
.btn { padding: 0.9rem 1.5rem; font-weight: 600; letter-spacing: -0.005em; }
.btn-primary { background: var(--accent); box-shadow: 0 8px 20px rgba(51, 85, 255, 0.28); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(51, 85, 255, 0.32); }
.btn-secondary, .btn-outline { background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.btn-secondary:hover, .btn-outline:hover { background: var(--bg-soft); color: var(--ink); border-color: #d5dbe6; }
.btn-row { gap: 0.85rem; margin-top: 2rem; }

/* Hero: light, centered on mobile, soft accent glow */
.hero { background: linear-gradient(180deg, #f3f6ff 0%, #ffffff 78%); color: var(--ink); padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero::before { inset: -30% -10% auto 35%; height: 90%; background: radial-gradient(ellipse at center, rgba(51, 85, 255, 0.14), transparent 62%); }
.eyebrow { color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.75rem; letter-spacing: 0.06em; }
.hero h1 { color: var(--ink); max-width: 14ch; }
.hero .lead { color: var(--ink-muted); }
.hero-grid { gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 1.75rem; }
.hero-card h3 { color: var(--ink); }
.hero-card li { color: var(--ink-muted); }
.hero-card li::before { color: var(--accent); background: var(--accent-soft); }

/* Sections: generous spacing, soft alternating band */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--bg-soft); border-block: 0; }
.section-header { margin-bottom: clamp(2rem, 4vw, 3rem); }
.kicker { color: var(--accent); font-size: 0.78rem; letter-spacing: 0.08em; font-weight: 650; }

/* Cards: rounded, soft shadow, gentle lift */
.card-grid { gap: 1.25rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.section-alt .card { background: #fff; }
.card.featured { border-color: rgba(51, 85, 255, 0.35); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.card-icon { background: var(--accent-soft); color: var(--accent); border-radius: 12px; }
.badge { background: var(--accent-soft); color: var(--accent); }
.checklist .mark { background: var(--accent-soft); color: var(--accent); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.stat strong { color: var(--ink); }
.cred { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.cred .label { color: var(--accent); }

/* Forms */
.form { background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-lg); }
.form input, .form select, .form textarea { border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* CTA band: bold accent panel */
.cta-band { background: var(--accent); background-image: radial-gradient(ellipse at 80% 0%, rgba(255,255,255,0.18), transparent 60%); color: #fff; border-radius: 28px; width: min(100% - 2.5rem, var(--max)); margin: clamp(2rem, 5vw, 4rem) auto; padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3rem); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); }
.cta-band .btn-primary { background: #fff; color: var(--accent); box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18); }
.cta-band .btn-primary:hover { background: #f1f4ff; color: var(--accent-hover); }
.cta-band .btn-secondary, .cta-band .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.5); box-shadow: none; }
.cta-band .btn-secondary:hover, .cta-band .btn-outline:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.page-hero { background: linear-gradient(180deg, #f3f6ff 0%, #ffffff 100%); }
.site-footer { background: #fff; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .hero { text-align: left; }
  .card, .hero-card { padding: 1.4rem; }
  .btn-row .btn { flex: 1 1 100%; }
}

/* v2 visuals: phone mockup, live log, how-it-works, console shot, placeholders */
.hero-grid { grid-template-columns: 1.1fr 0.9fr; }
.hero-visual { position: relative; display: flex; justify-content: center; padding: 1rem 0 2.5rem; }
.phone { width: 270px; aspect-ratio: 9 / 18.5; background: #0f172a; border-radius: 42px; padding: 12px; box-shadow: 0 40px 80px rgba(15, 23, 42, 0.22), 0 8px 20px rgba(15, 23, 42, 0.12); position: relative; }
.phone-notch { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); width: 84px; height: 22px; background: #0f172a; border-radius: 12px; z-index: 2; }
.phone-screen { height: 100%; background: linear-gradient(180deg, #f3f6ff, #fff 40%); border-radius: 32px; padding: 48px 16px 16px; display: flex; flex-direction: column; gap: 0.55rem; overflow: hidden; }
.call-head { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--ink-faint); font-weight: 600; }
.call-live { display: inline-flex; align-items: center; gap: 0.35rem; color: #16a34a; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.call-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin: 0.5rem auto 0; }
.call-name { text-align: center; font-weight: 650; color: var(--ink); margin: 0 0 0.4rem; font-size: 0.9rem; }
.bubble { font-size: 0.78rem; line-height: 1.4; padding: 0.55rem 0.75rem; border-radius: 14px; max-width: 85%; }
.bubble-in { background: #fff; border: 1px solid var(--line); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble-out { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.summary-card { position: absolute; right: 0; bottom: 0; width: min(290px, 92%); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 0.9rem 1rem; }
.summary-head { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.5rem; }
.summary-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.live-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.live-log li { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.4; padding-left: 1.4rem; position: relative; }
.live-log li::before { content: ""; position: absolute; left: 0; top: 0.2rem; width: 0.9rem; height: 0.9rem; border-radius: 50%; background: var(--accent-soft) no-repeat center / 0.6rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233355ff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5L20 7'/%3E%3C/svg%3E"); }
.live-log li strong { color: var(--ink); font-weight: 650; }
.live-log li + li { opacity: 0.6; }
.live-log li + li + li { opacity: 0.35; }
.live-log li.is-new { animation: log-in 0.45s ease-out; }
@keyframes log-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.hero-strip { margin-top: clamp(1.5rem, 4vw, 2.5rem); }
.hero-strip ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.5rem 1.5rem; }

.how { padding-top: clamp(3rem, 6vw, 4.5rem); }
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; position: relative; }
.how-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem; }
.how-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 1rem; }
.how-num { display: block; font-size: 0.75rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.3rem; }
.how-step p { margin: 0; }

.console-shot { margin: clamp(2.5rem, 5vw, 4rem) auto 0; max-width: 960px; perspective: 1600px; }
.console-shot img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 40px 80px rgba(15, 23, 42, 0.16), 0 8px 20px rgba(15, 23, 42, 0.08); transform: rotateX(6deg) rotateZ(-1.5deg); }
.console-shot figcaption, .local-photo figcaption { text-align: center; font-size: 0.82rem; color: var(--ink-faint); margin-top: 1rem; }

.headshot { display: block; object-fit: cover; width: 120px; height: 120px; border-radius: 50%; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.local-photo { margin: clamp(2rem, 5vw, 3.5rem) auto 0; }
.local-photo img { width: 100%; height: auto; border-radius: 24px; box-shadow: var(--shadow); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .summary-card { right: 50%; transform: translateX(50%); }
}
@media (prefers-reduced-motion: reduce) { .pulse, .live-log li.is-new { animation: none; } }
