/* Front Door — app stylesheet (shares Doorbell's design language), light + dark, no build step. */
:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --text: #14161a;
  --text-2: #4a505a;
  --muted: #6b717c;
  --brand: #c2410c;
  --brand-ink: #ffffff;
  --brand-soft: #fff1e8;
  --logo-ink: #ffffff;
  --ok: #137333; --ok-soft: #e6f4ea;
  --warn: #8a5300; --warn-soft: #fef3dc;
  --err: #b3261e; --err-soft: #fce8e6;
  --info: #1b5fc4; --info-soft: #e8f0fe;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --bubble-out: #1f6feb; --bubble-out-ink: #fff;
  --bubble-in: #eef0f3;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 14px;
  --radius-sm: 9px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111214;
    --surface: #1a1b1e;
    --surface-2: #232529;
    --border: #2c2f34;
    --border-strong: #3b3f46;
    --text: #f1f2f4;
    --text-2: #c3c6cc;
    --muted: #9298a2;
    --brand: #fb923c;
    --brand-ink: #1a0f05;
    --brand-soft: #3a2314;
    --logo-ink: #1a0f05;
    --ok: #6dd58c; --ok-soft: #173322;
    --warn: #f2b84b; --warn-soft: #3a2c10;
    --err: #ff8a80; --err-soft: #3d1c1a;
    --info: #8ab4ff; --info-soft: #1b2a44;
    --series-1: #3987e5;
    --series-2: #d95926;
    --bubble-out: #2f6fdf; --bubble-out-ink: #fff;
    --bubble-in: #26292e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111214; --surface: #1a1b1e; --surface-2: #232529; --border: #2c2f34; --border-strong: #3b3f46;
  --text: #f1f2f4; --text-2: #c3c6cc; --muted: #9298a2; --brand: #fb923c; --brand-ink: #1a0f05; --brand-soft: #3a2314; --logo-ink: #1a0f05;
  --ok: #6dd58c; --ok-soft: #173322; --warn: #f2b84b; --warn-soft: #3a2c10; --err: #ff8a80; --err-soft: #3d1c1a; --info: #8ab4ff; --info-soft: #1b2a44;
  --series-1: #3987e5; --series-2: #d95926; --bubble-out: #2f6fdf; --bubble-out-ink: #fff; --bubble-in: #26292e; --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75em; }
code { font: .9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }
.ic.big { width: 40px; height: 40px; opacity: .5; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Top bar & tabs ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.topbar-inner, .tabs-inner { max-width: 1160px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; }
.topbar-inner { height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1.05rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo { width: 28px; height: 28px; color: var(--brand); }
.switcher select { min-width: 200px; max-width: 280px; padding: 7px 30px 7px 10px; font-weight: 550; }
.biz-name { font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.who { color: var(--text-2); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.tabs { border-top: 1px solid var(--border); }
.tabs-inner { gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-inner::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 11px 12px; color: var(--text-2); font-weight: 550; font-size: .92rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; }

.demo-banner { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 8px 20px; background: var(--warn-soft); color: var(--warn); font-size: .87rem; border-bottom: 1px solid var(--border); text-align: left; }
.demo-banner a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ---------- Layout ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 26px 20px 60px; }
.container-narrow { max-width: 460px; padding-top: 8vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin-bottom: 2px; }
.page-head p { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card.narrow { max-width: 520px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
.empty { padding: 24px 8px; text-align: center; }
.callout { background: var(--info-soft); border-color: transparent; color: var(--text); box-shadow: none; padding: 14px 18px; }
.callout.warn { background: var(--warn-soft); }
.inline-list { display: inline; padding: 0; margin: 0; list-style: none; }
.inline-list li { display: inline; }
.inline-list li + li::before { content: " · "; color: var(--muted); }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 600 .92rem var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand); filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 10px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn .ic { width: 16px; height: 16px; }

label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--text); min-width: 0; }
.hint { font-weight: 450; color: var(--muted); font-size: .8rem; }
input, select, textarea { font: 400 .95rem var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 11px; width: 100%; min-width: 0; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input:disabled { background: var(--surface-2); color: var(--muted); }
input[type=file] { padding: 7px; font-size: .85rem; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 450; font-size: .9rem; color: var(--text-2); }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.grid-form.inner { margin-top: 8px; }
.span-2 { grid-column: 1 / -1; }
.sub-fieldset { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 12px 14px 14px; margin: 0; }
.sub-fieldset legend { font-weight: 600; font-size: .88rem; padding: 0 6px; }
.counter { font-weight: 400; font-size: .78rem; color: var(--muted); }
.settings .card h2 { margin-bottom: 14px; }
.sticky-save { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 35%); display: flex; justify-content: flex-end; }

.flash { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .92rem; background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .75rem; font-weight: 650; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-err { background: var(--err-soft); color: var(--err); }
.pill-info { background: var(--info-soft); color: var(--info); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg a { padding: 5px 12px; border-radius: 7px; color: var(--text-2); font-weight: 600; font-size: .85rem; text-transform: capitalize; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.seg-sm a { padding: 3px 9px; font-size: .8rem; }

/* ---------- Auth ---------- */
.auth-card { padding: 30px; }
.auth-card h1 { font-size: 1.4rem; }
.auth-brand { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1.1rem; margin-bottom: 22px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.stat.accent { background: linear-gradient(135deg, var(--brand-soft), var(--surface) 75%); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.stat-label { display: flex; align-items: center; gap: 7px; color: var(--text-2); font-size: .84rem; font-weight: 600; }
.stat-label .ic { width: 16px; height: 16px; color: var(--muted); }
.stat-value { font-size: 2rem; font-weight: 750; letter-spacing: -.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: .8rem; }
.value-note { margin: -4px 0 18px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ok-soft); color: var(--text); font-size: .92rem; }


/* ======================================================================
   Front Door-specific
   ====================================================================== */
.container-wide { max-width: 1440px; }
.btn-lg { padding: 12px 22px; font-size: 1rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row.align-end { align-items: flex-end; }
.grow { flex: 1 1 260px; }
form.inline { display: inline; }
.nowrap { white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.flash-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 25%, transparent); display: flex; gap: 8px; align-items: center; }
.ok-text { color: var(--ok); } .err-text { color: var(--err); }
.callout h2 { display: flex; align-items: center; gap: 8px; }
.callout ul { margin: 6px 0 0; padding-left: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); padding-top: 16px; }
.danger { border-color: color-mix(in srgb, var(--err) 30%, var(--border)); }

/* Landing */
.hero-l { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 48px; align-items: center; padding: 40px 0 56px; }
.display { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -.03em; line-height: 1.08; margin-bottom: .45em; }
.eyebrow-l { display: inline-flex; gap: 8px; align-items: center; color: var(--brand); font-weight: 650; font-size: .9rem; }
.lede-l { font-size: 1.1rem; color: var(--text-2); max-width: 36em; }
.hero-l .row { margin: 22px 0 10px; }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.35); overflow: hidden; }
.mock-bar { display: flex; gap: 6px; align-items: center; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-bar em { margin-left: 10px; font-style: normal; font-size: .78rem; color: var(--muted); background: var(--surface); padding: 2px 10px; border-radius: 6px; }
.mock-hero { display: flex; flex-direction: column; gap: 8px; padding: 28px 24px; background: linear-gradient(135deg, #0f3d6e, #1f6feb); color: #fff; }
.mock-hero b { font-size: 1.35rem; line-height: 1.2; }
.mock-hero i { font-style: normal; opacity: .85; font-size: .9rem; }
.mock-btn { align-self: flex-start; background: #fff; color: #0f3d6e; font-weight: 700; padding: 7px 14px; border-radius: 8px; font-size: .85rem; margin-top: 6px; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 16px; }
.mock-cards span { height: 64px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.mock-call { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 0 16px 16px; padding: 10px; border-radius: 10px; background: #1f6feb; color: #fff; font-weight: 700; font-size: .9rem; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feature h2 { font-size: 1.05rem; }
.checks { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; }
.checks li { display: flex; gap: 9px; align-items: flex-start; }
.checks .ic { color: var(--ok); margin-top: 2px; }
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.price-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; }
.price-box.accent, .price-card.accent { border-color: var(--brand); background: linear-gradient(160deg, var(--brand-soft), var(--surface) 60%); }
.price-box h3 { margin: 0; }
.big { font-size: 1.9rem; font-weight: 750; letter-spacing: -.02em; margin: 4px 0; }
.site-foot { text-align: center; padding: 20px 0 0; }
.pricing-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.price-card .checks { margin: 10px 0 16px; }
.price-card.current { outline: 2px solid var(--brand); outline-offset: -1px; }

/* Wizard */
.stepper { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
.stepper li > a, .stepper li > span { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); color: var(--text-2); font-weight: 600; font-size: .88rem; min-width: 0; }
.stepper li > a:hover { text-decoration: none; border-color: var(--brand); }
.stepper b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); font-size: .78rem; flex: none; }
.stepper li > * > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li.on > * { border-color: var(--brand); color: var(--text); }
.stepper li.on b { background: var(--brand); color: var(--brand-ink); }
.stepper li.done b { background: var(--ok-soft); color: var(--ok); }
.hours-grid { display: flex; flex-direction: column; gap: 8px; }
.hours-row { display: grid; grid-template-columns: 110px minmax(0, 170px) auto minmax(0, 170px) auto; gap: 10px; align-items: center; }
.hours-row .day { font-weight: 600; font-size: .9rem; }
.hours-row label.check { font-size: .85rem; }
.svc-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px 10px; margin-top: 8px; }
.t-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.thumbs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.thumbs li { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2); }
.generate-card { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.generate-card h2 { display: flex; gap: 8px; align-items: center; font-size: 1.15rem; }
.generate-card p { margin: 0; max-width: 560px; }
.is-busy { opacity: .7; pointer-events: none; }

/* Template picker */
.tpl-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tpl-option { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; }
.tpl-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tpl-option:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand); }
.tpl-option:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.tpl-name { font-size: .92rem; }
.tpl-thumb { display: flex; flex-direction: column; gap: 5px; height: 76px; border-radius: 7px; padding: 10px; overflow: hidden; border: 1px solid var(--border); }
.tpl-thumb i, .tpl-thumb b, .tpl-thumb em { display: block; border-radius: 3px; }
.tpl-thumb i { width: 70%; height: 10px; } .tpl-thumb b { width: 45%; height: 6px; } .tpl-thumb em { width: 32%; height: 14px; margin-top: auto; }
.tpl-thumb-classic { background: linear-gradient(180deg, #f4efe6, #fff); }
.tpl-thumb-classic i { background: #2b2d31; } .tpl-thumb-classic b { background: #b9b2a5; } .tpl-thumb-classic em { background: #1f6feb; border-radius: 3px; }
.tpl-thumb-bold { background: #0d0f14; }
.tpl-thumb-bold i { background: #fff; height: 14px; } .tpl-thumb-bold b { background: #6b7280; } .tpl-thumb-bold em { background: #eab308; border-radius: 2px; }
.tpl-thumb-friendly { background: radial-gradient(circle at 85% 25%, #ffe1cc 0, #fffdf9 55%); }
.tpl-thumb-friendly i { background: #3a2a1a; border-radius: 99px; } .tpl-thumb-friendly b { background: #d9cbb8; border-radius: 99px; } .tpl-thumb-friendly em { background: #e8590c; border-radius: 99px; }
.color-row { flex-direction: row; align-items: center; gap: 12px; }
input[type=color] { width: 64px; height: 40px; padding: 3px; cursor: pointer; }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 20px; align-items: start; }
.editor-form .card { margin-bottom: 0; }
.editor-form label.has-ph textarea, .editor-form label.has-ph input { border-color: var(--warn); background: var(--warn-soft); }
.faq-edit { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.faq-edit:last-child { border-bottom: 0; }
.preview-pane { position: sticky; top: 112px; display: flex; flex-direction: column; gap: 8px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; }
.seg button { border: 0; background: transparent; padding: 3px 10px; border-radius: 7px; color: var(--text-2); font: 600 .8rem var(--font); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.preview-frame { border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: #fff; height: calc(100vh - 170px); min-height: 520px; display: flex; justify-content: center; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; transition: width .2s; }
.preview-frame.mobile iframe { width: 390px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.save-status { margin-right: auto; align-self: center; }

/* Overview & charts */
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart-fig { margin: 8px 0 18px; }
.chart-title { font-size: .84rem; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.chart30 { position: relative; height: 150px; padding-left: 30px; }
.chart30 .chart-grid { position: absolute; inset: 0 0 22px 30px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart30 .chart-grid span { border-top: 1px solid var(--border); position: relative; height: 0; }
.chart30 .chart-grid span:last-child { border-top-color: var(--border-strong); }
.chart30 .chart-grid span::before { content: attr(data-v); position: absolute; right: calc(100% + 6px); top: -8px; font-size: .7rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-cols30 { position: absolute; inset: 0 0 0 30px; display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); }
.col30 { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding: 0 1px 22px; outline: none; border-radius: 4px; }
.bar30 { width: 100%; max-width: 14px; background: var(--series-1); border-radius: 4px 4px 0 0; min-height: 0; }
.x30 { position: absolute; bottom: 2px; left: 0; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.col30:last-child .x30 { left: auto; right: 0; }
.col30:hover, .col30:focus-visible { background: color-mix(in srgb, var(--surface-2) 80%, transparent); }
.col30:hover::after, .col30:focus-visible::after { content: attr(data-tip); position: absolute; bottom: calc(100% - 14px); left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); font-size: .74rem; padding: 5px 8px; border-radius: 6px; white-space: nowrap; z-index: 3; pointer-events: none; }
.col30:nth-child(-n+5):hover::after, .col30:nth-child(-n+5):focus-visible::after { left: 0; transform: none; }
.col30:nth-last-child(-n+5):hover::after, .col30:nth-last-child(-n+5):focus-visible::after { left: auto; right: 0; transform: none; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-grid > .card, .dash-grid > div > .card { margin-bottom: 18px; }
.table-view summary { cursor: pointer; color: var(--text-2); font-size: .84rem; margin-top: 6px; }
.table-view table { margin-top: 10px; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist .ic { color: var(--ok); }
.checklist .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; }
.checklist li.done a { color: var(--text-2); }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: 10px 0; border-top: 1px solid var(--border); }
.activity li:first-child { border-top: 0; padding-top: 2px; }
.clamp { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Sites list */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.biz-card { color: var(--text); margin: 0; }
.biz-card:hover { text-decoration: none; border-color: var(--brand); }
.biz-card-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; min-width: 0; }
.biz-card-head h3, .biz-card-head p { margin: 0; overflow-wrap: anywhere; }
.avatar { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 750; flex: none; }

/* Tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; width: 1%; }
.cell-main { font-weight: 600; }
.leads-table .msg { white-space: pre-wrap; max-width: 420px; }
.dns-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.dns code { overflow-wrap: anywhere; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .preview-pane { position: static; order: -1; }
  .preview-frame { height: 70vh; min-height: 420px; }
}
@media (max-width: 1020px) {
  .dash-grid, .hero-l, .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .container { padding: 18px 16px 48px; }
  .container-narrow { padding-top: 24px; }
  .topbar-inner, .tabs-inner { padding: 0 12px; gap: 10px; }
  .topbar-inner { height: 54px; }
  .brand span, .topbar-right .btn-ghost span { display: none; }
  .biz-name { flex: 1; min-width: 0; }
  .who { display: none; }
  .tabs-inner { padding: 0 6px; gap: 0; }
  .tab { padding: 10px 8px; font-size: .84rem; }
  .tab .ic { display: none; }
  .demo-banner { padding: 8px 16px; font-size: .8rem; justify-content: flex-start; }
  .demo-banner .ic { display: none; }
  h1 { font-size: 1.35rem; }
  .display { font-size: 2rem; }
  .card { padding: 16px; border-radius: 12px; }
  .grid-form, .row-2, .features, .pricing-2, .tpl-picker { grid-template-columns: minmax(0, 1fr); }
  .stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: .74rem; }
  .stat-label .ic { display: none; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .stepper li > a, .stepper li > span { padding: 8px 6px; justify-content: center; }
  .stepper li > * > span { display: none; }
  .hours-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 8px; }
  .hours-row .day { order: 0; align-self: center; }
  .hours-row label.check { order: 1; justify-self: end; }
  .hours-row input[type=time] { order: 2; }
  .hours-row > .muted { display: none; }
  .t-row { grid-template-columns: minmax(0, 1fr); }
  .chart30 .x30 { font-size: .6rem; }
  .preview-frame.mobile iframe { width: 100%; }
  .page-head .row { width: 100%; }
  .page-head .row .btn { flex: 1; }
  .sticky-save .btn { width: auto; }
  /* Leads table becomes stacked cards */
  .leads-table thead { display: none; }
  .leads-table, .leads-table tbody, .leads-table tr, .leads-table td { display: block; width: 100%; }
  .leads-table tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .leads-table td { border: 0; padding: 2px 0; }
  .leads-table td.actions { text-align: left; width: auto; }
  .generate-card .btn { width: 100%; }
}

/* bar heights for the 30-day charts (no inline styles: strict CSP) */
.h-0{height:0%}.h-1{height:1%}.h-2{height:2%}.h-3{height:3%}.h-4{height:4%}.h-5{height:5%}.h-6{height:6%}.h-7{height:7%}.h-8{height:8%}.h-9{height:9%}.h-10{height:10%}.h-11{height:11%}.h-12{height:12%}.h-13{height:13%}.h-14{height:14%}.h-15{height:15%}.h-16{height:16%}.h-17{height:17%}.h-18{height:18%}.h-19{height:19%}.h-20{height:20%}.h-21{height:21%}.h-22{height:22%}.h-23{height:23%}.h-24{height:24%}.h-25{height:25%}.h-26{height:26%}.h-27{height:27%}.h-28{height:28%}.h-29{height:29%}.h-30{height:30%}.h-31{height:31%}.h-32{height:32%}.h-33{height:33%}.h-34{height:34%}.h-35{height:35%}.h-36{height:36%}.h-37{height:37%}.h-38{height:38%}.h-39{height:39%}.h-40{height:40%}.h-41{height:41%}.h-42{height:42%}.h-43{height:43%}.h-44{height:44%}.h-45{height:45%}.h-46{height:46%}.h-47{height:47%}.h-48{height:48%}.h-49{height:49%}.h-50{height:50%}.h-51{height:51%}.h-52{height:52%}.h-53{height:53%}.h-54{height:54%}.h-55{height:55%}.h-56{height:56%}.h-57{height:57%}.h-58{height:58%}.h-59{height:59%}.h-60{height:60%}.h-61{height:61%}.h-62{height:62%}.h-63{height:63%}.h-64{height:64%}.h-65{height:65%}.h-66{height:66%}.h-67{height:67%}.h-68{height:68%}.h-69{height:69%}.h-70{height:70%}.h-71{height:71%}.h-72{height:72%}.h-73{height:73%}.h-74{height:74%}.h-75{height:75%}.h-76{height:76%}.h-77{height:77%}.h-78{height:78%}.h-79{height:79%}.h-80{height:80%}.h-81{height:81%}.h-82{height:82%}.h-83{height:83%}.h-84{height:84%}.h-85{height:85%}.h-86{height:86%}.h-87{height:87%}.h-88{height:88%}.h-89{height:89%}.h-90{height:90%}.h-91{height:91%}.h-92{height:92%}.h-93{height:93%}.h-94{height:94%}.h-95{height:95%}.h-96{height:96%}.h-97{height:97%}.h-98{height:98%}.h-99{height:99%}.h-100{height:100%}
.features { margin-bottom: 18px; }
.features .card { margin-bottom: 0; }
