:root {
  --bg: #f6f3ee;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e5dfd4;
  --brand: #0f4c3a;
  --brand-2: #1a6b52;
  --accent: #c4a35a;
  --danger: #a33;
  --ok: #0f4c3a;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(26, 26, 26, 0.08);
  --font: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
.wrap { width: min(960px, calc(100% - 2rem)); margin: 0 auto; }
.wrap-sm { width: min(560px, calc(100% - 2rem)); margin: 0 auto; }
.wrap-lg { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 0; gap: 1rem;
}
.logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.nav a {
  margin-left: 1rem; text-decoration: none; color: var(--muted); font-size: 0.95rem;
}
.nav a:hover { color: var(--brand); }

.hero {
  padding: 2.5rem 0 1.5rem;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}
.hero p.lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.5rem; max-width: 40rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}
.card + .card { margin-top: 1rem; }

.steps {
  display: flex; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.step-pill {
  font-size: 0.8rem; padding: 0.35rem 0.75rem; border-radius: 999px;
  background: #ebe6dc; color: var(--muted);
}
.step-pill.active { background: var(--brand); color: #fff; }
.step-pill.done { background: #d7ebe3; color: var(--brand); }

label { display: block; font-size: 0.9rem; font-weight: 600; margin: 0.85rem 0 0.35rem; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(15, 76, 58, 0.25); border-color: var(--brand);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } }

.hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.err { color: var(--danger); font-size: 0.9rem; margin-top: 0.75rem; }
.okmsg { color: var(--ok); font-size: 0.95rem; margin-top: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: none; border-radius: 8px; padding: 0.75rem 1.2rem; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #e8c9c9; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; flex-wrap: wrap; }

.choice {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.35rem;
}
.choice label.chip {
  margin: 0; font-weight: 500; padding: 0.55rem 0.9rem; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; background: #fff;
}
.choice input { display: none; }
.choice input:checked + span,
.choice label.chip:has(input:checked) {
  border-color: var(--brand); background: #e8f3ee; color: var(--brand); font-weight: 600;
}
.choice label.chip span { pointer-events: none; }

.price-big {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--brand);
  margin: 0.5rem 0;
}
.muted { color: var(--muted); }

/* Quote “building” interstitial */
.quote-build {
  text-align: center;
  padding: 1.75rem 0.5rem 1.25rem;
}
.quote-build-anim {
  position: relative;
  width: 88px; height: 88px;
  margin: 0 auto 1.25rem;
}
.quote-build-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 3px solid rgba(15, 76, 58, 0.12);
  border-top-color: var(--brand);
  border-right-color: var(--accent);
  animation: quote-spin 1.05s linear infinite;
}
.quote-build-cabinets {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  gap: 5px; padding-bottom: 22px;
}
.quote-build-cabinets span {
  display: block; width: 14px;
  background: linear-gradient(180deg, #c4a35a 0%, #8a6a2e 100%);
  border-radius: 2px 2px 1px 1px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  animation: quote-cab 1.2s ease-in-out infinite;
  transform-origin: bottom center;
}
.quote-build-cabinets span:nth-child(1) { height: 28px; animation-delay: 0s; }
.quote-build-cabinets span:nth-child(2) { height: 36px; animation-delay: 0.15s; }
.quote-build-cabinets span:nth-child(3) { height: 24px; animation-delay: 0.3s; }
.quote-build-title { margin: 0 0 0.4rem; }
.quote-build-sub { margin: 0 auto 1.25rem; max-width: 28rem; }
.quote-build-bar {
  height: 4px; border-radius: 999px; overflow: hidden;
  background: #ebe6dc; max-width: 220px; margin: 0 auto;
}
.quote-build-bar i {
  display: block; height: 100%; width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  animation: quote-bar 2.4s ease-in-out forwards;
}
.quote-ready { margin-bottom: 0.85rem; }
.quote-ready-badge {
  display: inline-block; margin: 0 0 0.65rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand);
  background: #e8f3ee; border: 1px solid #c5ddd2;
  padding: 0.28rem 0.65rem; border-radius: 999px;
}
@keyframes quote-spin {
  to { transform: rotate(360deg); }
}
@keyframes quote-cab {
  0%, 100% { transform: scaleY(0.72); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes quote-bar {
  0% { width: 8%; }
  100% { width: 100%; }
}
.footer {
  margin-top: 3rem; padding: 2rem 0; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.85rem; text-align: center;
}

/* Dashboard */
.dash-layout {
  display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; padding: 1.5rem 0 3rem;
}
@media (max-width: 800px) {
  .dash-layout { grid-template-columns: 1fr; }
}
.side {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; height: fit-content;
}
.side button, .side a.side-link {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 0.65rem 0.75rem; border-radius: 8px; font: inherit; color: var(--ink);
  cursor: pointer; text-decoration: none; margin-bottom: 0.25rem;
}
.side button.active, .side a.side-link.active, .side button:hover, .side a.side-link:hover {
  background: #e8f3ee; color: var(--brand);
}
.panel { display: none; }
.panel.active { display: block; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.badge {
  display: inline-block; padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.75rem;
  background: #ebe6dc; color: var(--muted);
}
.badge.ok { background: #d7ebe3; color: var(--brand); }
.badge.no { background: #f3d9d9; color: var(--danger); }
.zip-list { list-style: none; padding: 0; margin: 0; }
.zip-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--line);
}
.strike { text-decoration: line-through; color: var(--muted); margin-right: 0.35rem; }
.price-tag { font-weight: 700; color: var(--brand); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.marketing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin: 2rem 0;
}
.marketing-grid .card h3 { margin-top: 0; font-family: var(--serif); }


/* Permanent subdomain warning */
.callout-warn {
  background: #fff4e5;
  border: 1px solid #e6a23c;
  border-left: 4px solid #d48806;
  color: #5c3b00;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin: 0.75rem 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.callout-warn strong { color: #8a4b00; }
.slug-confirm {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.85rem;
  background: #faf7f2;
  border: 1px dashed #c9a06a;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}
.slug-confirm input { margin-top: 0.2rem; flex-shrink: 0; }


/* —— For-makers marketing page —— */
.page-makers .nav-cta {
  display: inline-flex; align-items: center;
  margin-left: 1rem; padding: 0.4rem 0.85rem;
  border-radius: 8px; background: var(--brand); color: #fff !important;
  font-weight: 600; font-size: 0.9rem; text-decoration: none;
}
.page-makers .nav-cta:hover { background: var(--brand-2); color: #fff !important; }

.eyebrow {
  display: inline-block; margin: 0 0 0.65rem;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-2);
}

.hero-split {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem;
  align-items: center; padding: 1.75rem 0 2rem;
}
.hero-split .hero-copy { padding: 0; }
.hero-split h1 { margin-bottom: 0.85rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

.hero-photo {
  margin: 0; position: relative; border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 48px rgba(26, 26, 26, 0.14);
  border: 1px solid var(--line); background: #d9d2c6;
  aspect-ratio: 4 / 3;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(15,76,58,0.18) 0%, transparent 45%, rgba(26,26,26,0.12) 100%);
  pointer-events: none;
}
.hero-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.photo-credit {
  position: absolute; left: 0.75rem; bottom: 0.65rem; z-index: 1;
  margin: 0; padding: 0.25rem 0.55rem; border-radius: 999px;
  background: rgba(26,26,26,0.55); color: #fff; font-size: 0.7rem;
  backdrop-filter: blur(4px);
}

.photo-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  margin: 0 0 2.25rem;
}
.photo-strip figure {
  margin: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); background: #e8e2d8;
  aspect-ratio: 4 / 3; box-shadow: 0 4px 16px rgba(26,26,26,0.06);
}
.photo-strip img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.photo-strip figure:hover img { transform: scale(1.04); }

.card-section { margin-bottom: 1.75rem; padding: 1.75rem; }
.card-section h2 {
  font-family: var(--serif); margin: 0 0 1.25rem;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem); letter-spacing: -0.02em;
}
.ways-grid { margin: 0; }
.way { position: relative; padding: 0.25rem 0 0.25rem 0; }
.way-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; border-radius: 999px;
  background: #e8f3ee; color: var(--brand); font-weight: 700; font-size: 0.85rem;
  margin-bottom: 0.55rem;
}
.way h3 { margin: 0 0 0.4rem; font-family: var(--serif); font-size: 1.15rem; }
.way p { margin: 0; }

.feature-grid { margin: 0 0 0.5rem; }
.feature-card {
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(26, 26, 26, 0.1);
}
.feature-card + .feature-card { margin-top: 0; }
.feature-thumb {
  aspect-ratio: 16 / 10; overflow: hidden; background: #e8e2d8;
  border-bottom: 1px solid var(--line);
}
.feature-thumb img {
  display: block; width: 100%; height: 100%; object-fit: cover;
}
.feature-card h3, .feature-card p {
  padding-left: 1.25rem; padding-right: 1.25rem;
}
.feature-card h3 {
  margin: 1.1rem 0 0.4rem; font-family: var(--serif); font-size: 1.15rem;
}
.feature-card p { margin: 0 0 1.25rem; }

.cta-band {
  text-align: center; margin-top: 2.25rem; margin-bottom: 0.5rem;
  padding: 2.25rem 1.5rem;
  background:
    linear-gradient(135deg, rgba(15,76,58,0.06), rgba(196,163,90,0.12)),
    var(--surface);
}
.cta-band h2 {
  font-family: var(--serif); margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.8vw, 1.85rem);
}
.cta-band .muted { margin: 0 auto 1.25rem; max-width: 32rem; }
.cta-band .btn-primary { padding: 0.85rem 1.5rem; font-size: 1.05rem; }

.page-makers .btn-primary {
  box-shadow: 0 6px 18px rgba(15, 76, 58, 0.22);
}
.page-makers .btn-ghost {
  background: #fff; border-color: #d4cdc0;
}
.page-makers .footer { margin-top: 2.5rem; }

@media (max-width: 800px) {
  .hero-split { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.25rem; }
  .hero-photo { order: -1; max-height: 280px; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .photo-strip { gap: 0.5rem; }
  .card-section { padding: 1.25rem; }
}

.pitch-band {
  margin: 0 0 1.75rem;
  padding: 1.1rem 1.35rem;
  border-radius: var(--radius);
  border: 1px solid #cfe3d9;
  background: linear-gradient(135deg, #e8f3ee 0%, #f3efe6 100%);
}
.pitch-line {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}
.pitch-line strong { color: var(--brand); }
.pitch-line + .pitch-line { margin-top: 0.65rem; }
.pitch-flex {
  padding-top: 0.65rem;
  border-top: 1px solid #c5dccf;
  font-size: 1.08rem;
}
.flex-note {
  margin: 0.85rem 0 0;
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.45;
}
.flex-note strong {
  color: var(--brand);
  font-weight: 700;
}
.flex-note-block {
  margin: 0 0 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #cfe3d9;
  background: #eef7f2;
  font-size: 1.02rem;
}

.why-card { margin-top: 1.75rem; }
.why-lead { margin: 0 0 1.15rem; max-width: 46rem; font-size: 1.05rem; }
.why-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}
.why-list li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  border-radius: 10px;
  background: #faf8f4;
  border: 1px solid var(--line);
  color: var(--muted);
}
.why-list li strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
@media (min-width: 800px) {
  .why-list { grid-template-columns: repeat(3, 1fr); gap: 0.85rem; }
}

/* Organic maker website link on estimate / landing */
.shop-topbar { gap: 0.75rem; }
.shop-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.02em;
  max-width: min(70%, 22rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.shop-brand:hover { color: var(--brand-2); }
.shop-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.shop-site-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 0.15rem 0;
}
.shop-site-link:hover {
  color: var(--brand);
  border-bottom-color: rgba(15, 76, 58, 0.35);
}
.shop-site-link::after {
  content: " →";
  font-size: 0.85em;
}


/* Makers page readability */
.page-makers .hero h1 { color: var(--ink); }
.page-makers .hero p.lead { color: #3a342c; }
.page-makers .photo-credit {
  background: rgba(10,8,6,0.78); color: #fff; font-weight: 600;
}
@media (max-width: 800px) {
  .page-makers .hero-photo::after {
    background: linear-gradient(180deg, transparent 40%, rgba(8,6,4,0.55) 100%);
  }
}

.form-section {
  margin: 1.35rem 0 0.25rem; padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.form-section:first-of-type { border-top: none; padding-top: 0; margin-top: 0.5rem; }
.form-section h2 {
  margin: 0 0 0.25rem; font-family: var(--serif); font-size: 1.15rem; font-weight: 600;
}
.form-section .hint { margin-top: 0; margin-bottom: 0.35rem; }
.wrap-form { width: min(640px, calc(100% - 2rem)); margin: 0 auto; }

.disclaimer {
  margin: 0.85rem 0 0; padding: 0.75rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: #f0ebe3; color: #3a342c;
  font-size: 0.9rem; line-height: 1.45; border-radius: 0 8px 8px 0;
}


/* Dashboard: unset subdomain alert */
.dash-slug-alert {
  margin: 0 0 1rem;
}
.dash-slug-alert .btn {
  display: inline-flex;
}

/* legal pages */

.legal-wrap { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.legal-wrap h1 { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 0.35rem; }
.legal-wrap .legal-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 1.75rem; }
.legal-wrap h2 { font-family: var(--serif); font-size: 1.25rem; margin: 1.75rem 0 0.5rem; }
.legal-wrap p, .legal-wrap li { color: var(--ink); line-height: 1.55; font-size: 0.98rem; }
.legal-wrap ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
.legal-wrap li { margin: 0.35rem 0; }
.legal-wrap .callout {
  background: #f7f1e8; border: 1px solid var(--line); border-radius: 10px;
  padding: 1rem 1.1rem; margin: 1rem 0 1.25rem;
}
.legal-wrap .callout strong { display: block; margin-bottom: 0.35rem; }
.legal-wrap a { color: var(--brand); }
.legal-nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: center;
  margin-top: 0.5rem; font-size: 0.85rem; }
.legal-nav a { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
.legal-nav a:hover { border-bottom-color: currentColor; }
.footer .legal-nav { margin-top: 0.65rem; }
.rq-foot .legal-nav { margin-top: 0.75rem; color: var(--mute-d, #a89f93); }
.rq-foot .legal-nav a { color: var(--cream-2, #f3ebe0); }
.page-shop .rq-foot .legal-nav a { color: var(--cream-2, #f3ebe0); }
.auth-foot { margin-top: 2rem; padding: 1.25rem 0 2rem; text-align: center;
  color: var(--muted); font-size: 0.85rem; border-top: 1px solid var(--line); }


/* Post-price call request */
.call-cta {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

/* Mini-CRM */
.crm-toolbar {
  display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center;
  margin: 0 0 1rem;
}
.crm-toolbar input[type="search"],
.crm-toolbar select {
  font: inherit; padding: 0.55rem 0.75rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; min-width: 10rem;
}
.crm-toolbar input[type="search"] { flex: 1; min-width: 12rem; }
.badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  padding: 0.15rem 0.5rem; border-radius: 999px; letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-new { background: #e8f3ee; color: var(--brand); }
.badge-contacted { background: #eef2f8; color: #345; }
.badge-appointment_requested,
.badge-appointment { background: #fff3d6; color: #8a5a00; }
.badge-booked { background: #e4f0ff; color: #1a4a8a; margin-left: 0.35rem; }
.badge-remind { background: #f3e8ff; color: #5b2d8e; margin-left: 0.35rem; }
.badge-dup { background: #fde8e8; color: #9a1f1f; margin-left: 0.35rem; }
.badge-won { background: #dff5e5; color: #1a6b3c; }
.badge-lost { background: #f5e0e0; color: #8a3030; }
.badge-call { background: #ffe8cc; color: #9a4d00; margin-left: 0.35rem; }
.lead-row { cursor: pointer; }
.lead-row:hover { background: #f7f5f1; }
.lead-row.active { background: #eef6f2; }
.crm-detail {
  margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid var(--line);
}
.crm-detail h3 { font-family: var(--serif); margin: 0 0 0.75rem; }
.crm-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}
@media (max-width: 640px) { .crm-grid { grid-template-columns: 1fr; } }
.crm-grid dt { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.crm-grid dd { margin: 0.15rem 0 0; font-weight: 600; }
.crm-detail textarea {
  width: 100%; min-height: 6rem; font: inherit; padding: 0.65rem 0.75rem;
  border: 1px solid var(--line); border-radius: 8px; resize: vertical;
}
.crm-detail .crm-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; margin-top: 0.75rem; }
.crm-detail select { font: inherit; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; }


/* Visits analytics chart */
.range-toggles {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.75rem 0 1rem;
}
.range-btn {
  font: inherit; font-size: 0.88rem; padding: 0.4rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); cursor: pointer;
}
.range-btn:hover { border-color: var(--brand); color: var(--brand); }
.range-btn.active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.visit-totals {
  display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 0.75rem;
}
.visit-totals > div { display: flex; flex-direction: column; gap: 0.15rem; }
.visit-total-num {
  font-family: var(--serif); font-size: 1.75rem; font-weight: 700; color: var(--brand); line-height: 1.1;
}
.visit-total-label { font-size: 0.85rem; color: var(--muted); }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem;
}
.leg::before {
  content: ''; display: inline-block; width: 0.85rem; height: 0.25rem;
  border-radius: 2px; margin-right: 0.4rem; vertical-align: middle;
}
.leg-views::before { background: var(--brand); }
.leg-quotes::before { background: var(--accent); }
.chart-wrap {
  width: 100%; overflow-x: auto; background: #faf8f4; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.75rem 0.5rem;
}
.chart-wrap svg { width: 100%; height: auto; display: block; min-width: 280px; }
.call-or-phone a { font-weight: 600; }


/* CRM v2 — kanban, filters, snippets */
.crm-head {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem;
  align-items: flex-start; justify-content: space-between;
  margin-bottom: 0.85rem;
}
.crm-head-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.crm-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  padding: 0.15rem 0.55rem; border-radius: 999px; vertical-align: middle;
  margin-left: 0.35rem; letter-spacing: 0.02em;
}
.crm-badge.due { background: #fde8e8; color: #9a1f1f; }
.crm-badge.upcoming { background: #f3e8ff; color: #5b2d8e; }
.nav-badge {
  display: inline-block; min-width: 1.15rem; padding: 0.05rem 0.35rem;
  border-radius: 999px; background: #c0392b; color: #fff;
  font-size: 0.7rem; font-weight: 700; line-height: 1.2; margin-left: 0.25rem;
}
.view-toggle {
  display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.view-btn {
  font: inherit; font-size: 0.88rem; padding: 0.4rem 0.75rem;
  border: 0; background: var(--surface); color: var(--muted); cursor: pointer;
}
.view-btn + .view-btn { border-left: 1px solid var(--line); }
.view-btn.active { background: var(--brand); color: #fff; }
.crm-check {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; white-space: nowrap;
}
.lead-dup { box-shadow: inset 3px 0 0 #c0392b; }
.dup-warn {
  background: #fde8e8; color: #9a1f1f; border: 1px solid #f0c0c0;
  border-radius: 8px; padding: 0.55rem 0.75rem; font-size: 0.9rem; margin: 0 0 0.75rem;
}
.crm-detail-top {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.btn-ghost {
  font: inherit; padding: 0.4rem 0.7rem; border: 1px solid var(--line);
  border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.crm-notes-wrap { margin-top: 0.25rem; }
.crm-notes-head {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  justify-content: space-between; margin-bottom: 0.35rem;
}
.snippet-bar { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.snippet-bar select {
  font: inherit; font-size: 0.88rem; padding: 0.35rem 0.55rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.crm-snippets-panel {
  margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid var(--line);
}
.snippet-list {
  list-style: none; padding: 0; margin: 0 0 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.snippet-list li {
  display: flex; gap: 0.75rem; align-items: flex-start; justify-content: space-between;
  padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 8px; background: #faf8f4;
}
.snippet-form {
  display: flex; flex-direction: column; gap: 0.5rem; max-width: 36rem;
}
.snippet-form input, .snippet-form textarea {
  font: inherit; padding: 0.55rem 0.75rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff;
}
.snippet-form textarea { min-height: 4.5rem; resize: vertical; }

.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(11.5rem, 1fr));
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
}
.kanban-col {
  background: #f3efe8; border: 1px solid var(--line); border-radius: 10px;
  min-height: 16rem; display: flex; flex-direction: column; min-width: 11.5rem;
}
.kanban-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.55rem 0.7rem; font-weight: 700; font-size: 0.88rem;
  border-bottom: 1px solid var(--line);
}
.kanban-count {
  background: #fff; border-radius: 999px; padding: 0.05rem 0.45rem;
  font-size: 0.75rem; color: var(--muted); font-weight: 700;
}
.kanban-col-body {
  flex: 1; padding: 0.5rem; display: flex; flex-direction: column; gap: 0.45rem;
  min-height: 10rem;
}
.kanban-col-body.drag-over {
  background: #e8f3ee; outline: 2px dashed var(--brand); outline-offset: -4px;
}
.kanban-empty {
  margin: 1.5rem 0.25rem; text-align: center; color: var(--muted);
  font-size: 0.82rem;
}
.kanban-card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.55rem 0.65rem; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.55; }
.kanban-card.active { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(15,76,58,.15); }
.kanban-card-name { font-weight: 700; font-size: 0.92rem; margin-bottom: 0.2rem; }
.kanban-card-meta { font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.kanban-card-flags { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.2rem; }
.kanban-card-flags .badge { margin-left: 0; }
@media (max-width: 900px) {
  .kanban { grid-template-columns: repeat(5, minmax(10.5rem, 1fr)); }
}

/* CRM v3 — activity, stale, bulk, mobile board, print */
.bulk-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center;
  margin: 0 0 0.75rem; padding: 0.65rem 0.75rem;
  background: #eef6f2; border: 1px solid #cfe3d8; border-radius: 10px;
}
.bulk-bar select {
  font: inherit; font-size: 0.88rem; padding: 0.35rem 0.55rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.bulk-count { font-size: 0.88rem; font-weight: 600; color: var(--brand); }
.col-check { width: 2rem; }
.lead-check { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); }

.badge-stale3 { background: #fff3cd; color: #856404; }
.badge-stale7 { background: #fde8e8; color: #9a1f1f; }
.badge-score { background: #e8f0fe; color: #1a4a8a; }
.stale-banner {
  background: #fff3cd; color: #856404; border: 1px solid #f0e0a0;
  border-radius: 8px; padding: 0.55rem 0.75rem; font-size: 0.9rem; margin: 0 0 0.75rem;
}
.stale-banner.hot { background: #fde8e8; color: #9a1f1f; border-color: #f0c0c0; }

.crm-contact-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 0.85rem;
}
.crm-tap {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 2.75rem; padding: 0.65rem 1rem; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.crm-tap-call { background: var(--brand); color: #fff; border-color: var(--brand); }
.crm-tap-mail { background: #fff; color: var(--brand); border-color: var(--brand); }
.crm-tap:active { transform: scale(0.98); }

.crm-detail-top-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }

.crm-activity { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.crm-activity-title {
  font-family: var(--serif); font-size: 1.05rem; margin: 0 0 0.55rem;
}
.crm-activity-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.45rem;
  max-height: 16rem; overflow-y: auto;
}
.crm-activity-list li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem;
  font-size: 0.88rem; padding: 0.4rem 0.5rem; border-radius: 8px;
  background: #faf8f4; border: 1px solid var(--line);
}
.crm-activity-list time { color: var(--muted); font-size: 0.78rem; }
.crm-activity-kind {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 0.05rem 0.35rem; border-radius: 4px; margin-right: 0.35rem;
  background: #e8efe9; color: var(--brand);
}

.kanban-card-top {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.35rem;
}
.kanban-card .lead-check { margin-top: 0.15rem; flex-shrink: 0; }
.kanban-card-actions {
  display: flex; gap: 0.35rem; margin-top: 0.45rem;
}
.kanban-card-actions .crm-tap {
  flex: 1; min-height: 2.4rem; font-size: 0.88rem; padding: 0.45rem 0.5rem;
}

@media (max-width: 900px) {
  .kanban {
    display: flex; gap: 0.65rem; overflow-x: auto;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
  }
  .kanban-col {
    flex: 0 0 82vw; max-width: 20rem; min-width: 16rem;
    scroll-snap-align: start; min-height: 14rem;
  }
  .kanban-card { padding: 0.7rem 0.75rem; }
  .crm-toolbar { gap: 0.45rem; }
  .crm-head-actions { width: 100%; }
  .bulk-bar { position: sticky; bottom: 0.5rem; z-index: 5; box-shadow: 0 -4px 16px rgba(0,0,0,.06); }
}

/* Print one-pager */
.lead-print-sheet { display: none; }
@media print {
  body * { visibility: hidden !important; }
  .lead-print-sheet, .lead-print-sheet * { visibility: visible !important; }
  .lead-print-sheet {
    display: block !important; position: absolute; left: 0; top: 0; width: 100%;
    padding: 1.25rem; color: #111; background: #fff;
  }
  .lead-print-sheet h1 { font-size: 1.5rem; margin: 0 0 0.5rem; }
  .lead-print-sheet .print-meta { margin: 0 0 1rem; color: #444; }
  .lead-print-sheet dl { display: grid; grid-template-columns: 8rem 1fr; gap: 0.35rem 0.75rem; }
  .lead-print-sheet dt { font-weight: 700; color: #555; }
  .lead-print-sheet dd { margin: 0; }
  .lead-print-sheet .print-notes {
    margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid #ccc; white-space: pre-wrap;
  }
}


/* CRM v4 — saved views, today queue, estimate snapshot, trash */
.crm-saved-views {
  display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center;
  margin: 0.75rem 0 0.5rem;
}
.saved-view-btn {
  font: inherit; font-size: 0.82rem; font-weight: 600;
  padding: 0.35rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  cursor: pointer;
}
.saved-view-btn:hover { border-color: var(--brand); }
.saved-view-btn.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
}
.saved-view-btn .view-count {
  display: inline-block; margin-left: 0.25rem;
  background: rgba(0,0,0,.12); border-radius: 999px;
  padding: 0 0.35rem; font-size: 0.72rem;
}
.saved-view-btn.active .view-count { background: rgba(255,255,255,.25); }
.crm-keys-hint { font-size: 0.75rem; margin-left: 0.25rem; }
.today-queue { margin: 0.5rem 0; padding: 0.65rem 0.85rem; font-size: 0.9rem; }
.trash-bar {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
  margin: 0.5rem 0; padding: 0.65rem 0.85rem;
  background: #faf6f0; border: 1px solid var(--line); border-radius: 10px;
}
.estimate-snapshot, .est-snap {
  margin: 0.5rem 0;
  padding: 0.55rem 0.75rem;
  background: #f3f7f4;
  border: 1px solid #d5e3d9;
  border-radius: 8px;
}
.est-snap-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0.15rem;
}
.est-snap-range { font-weight: 700; font-size: 1rem; color: var(--brand); }
.est-snap-meta { font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
.kanban-card .est-snap { margin: 0.35rem 0; padding: 0.4rem 0.55rem; }
.kanban-card .est-snap-range { font-size: 0.9rem; }

/* Support + ticket thread */
.support-tabs { display:flex; flex-wrap:wrap; gap:.35rem; margin:1rem 0 1.25rem; }
.support-tab {
  background:none; border:1px solid var(--line); border-radius:999px;
  padding:.4rem .9rem; font:inherit; cursor:pointer; color:var(--ink);
}
.support-tab.active, .support-tab:hover { background:#e8f3ee; border-color:var(--brand); color:var(--brand); }
.admin-ticket-list { display:flex; flex-direction:column; gap:.5rem; }
.admin-ticket-row {
  display:block; width:100%; text-align:left; background:var(--bg); border:1px solid var(--line);
  border-radius:10px; padding:.75rem 1rem; font:inherit; cursor:pointer; color:var(--ink);
}
.admin-ticket-row:hover { border-color:var(--brand); background:#e8f3ee; }
.ticket-thread { display:flex; flex-direction:column; gap:.75rem; margin-top:.75rem; }
.ticket-msg { border:1px solid var(--line); border-radius:10px; padding:.75rem 1rem; background:var(--bg); }
.ticket-msg-admin { border-left:3px solid var(--brand); }
.ticket-msg-maker { border-left:3px solid #c4b59a; }
.ticket-msg-meta { font-size:.8rem; color:var(--muted); margin-bottom:.35rem; }
.ticket-msg-body { white-space:pre-wrap; }
/* cleanup 2026-10-26T20:03:55-05:00 */
