/* Ragster design system: warm light editorial.
   Serif display headings, flat deep teal, hairline borders, no gradients. */

:root {
  --series-web: #0d9488;   /* validated pair: dataviz validator, light surface */
  --series-wa: #c2410c;
  --bg: #faf9f5;
  --bg-tint: #f3f1ea;
  --panel: #ffffff;
  --panel-2: #f5f3ec;
  --border: #e7e4da;
  --border-strong: #d8d4c8;
  --text: #1a1915;
  --muted: #6f6a5e;
  --faint: #98937f;
  --accent: #0f766e;
  --accent-hover: #0c5f58;
  --accent-soft: rgba(15, 118, 110, 0.09);
  --accent-ring: rgba(15, 118, 110, 0.25);
  --grad: #0f766e; /* kept for legacy var references: flat teal */
  --green: #15803d;
  --green-soft: rgba(21, 128, 61, 0.09);
  --red: #b91c1c;
  --red-soft: rgba(185, 28, 28, 0.08);
  --amber: #b45309;
  --amber-soft: rgba(180, 83, 9, 0.1);
  --ink: #1a1915;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(26, 25, 21, 0.05), 0 8px 28px rgba(26, 25, 21, 0.06);
  --shadow-lift: 0 2px 4px rgba(26, 25, 21, 0.06), 0 14px 40px rgba(26, 25, 21, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 550;
  letter-spacing: -0.015em;
  line-height: 1.12;
}
h1 { font-size: clamp(36px, 5vw, 58px); margin: 0 0 18px; }
h2 { font-size: clamp(26px, 3.2vw, 36px); margin: 0 0 10px; }
h3 { font-size: 18px; margin: 0 0 6px; font-weight: 600; }
p { margin: 10px 0; }
code {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 0.86em; background: var(--bg-tint);
  padding: 2px 6px; border-radius: 6px; color: var(--accent);
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-hover); text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.center { text-align: center; }
.grad-text { color: var(--accent); font-style: italic; }

/* ---------- Nav ---------- */

nav.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: rgba(250, 249, 245, 0.85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 800; font-size: 22px; letter-spacing: -0.035em;
}
.logo a { color: inherit; display: flex; align-items: center; gap: 10px; }
.logo .mark { width: 36px; height: 36px; flex: none; display: block; filter: drop-shadow(0 2px 6px rgba(15,118,110,.28)); }
.logo .mark svg { width: 100%; height: 100%; display: block; }
.logo .word { color: var(--ink); }
.logo-sm { font-size: 17px; }
.logo-sm .mark { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 11px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
  font-family: inherit; letter-spacing: -0.005em;
  padding: 12px 22px; transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 2px rgba(26, 25, 21, 0.12);
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn.secondary {
  background: var(--panel); border: 1px solid var(--border-strong);
  color: var(--text); box-shadow: none; font-weight: 500;
}
.btn.secondary:hover { background: var(--bg-tint); box-shadow: none; }
.btn.danger { background: transparent; border: 1px solid rgba(185, 28, 28, 0.4); color: var(--red); box-shadow: none; font-weight: 500; }
.btn.danger:hover { background: var(--red-soft); box-shadow: none; }
.btn.small { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn.large { padding: 15px 28px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------- Cards ---------- */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.feature-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-lift); }
.feature-card h3 { font-size: 17px; margin: 16px 0 8px; }
.feature-card p { color: var(--muted); font-size: 14.5px; margin: 0; }

.icon-chip {
  width: 44px; height: 44px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border: 1px solid rgba(15, 118, 110, 0.18);
}
.icon-chip svg { width: 22px; height: 22px; color: var(--accent); }
.icon-chip.green { background: var(--green-soft); border-color: rgba(21, 128, 61, 0.2); }
.icon-chip.green svg { color: var(--green); }
.icon-chip.violet { background: var(--accent-soft); border-color: rgba(15, 118, 110, 0.18); }
.icon-chip.violet svg { color: var(--accent); }

/* ---------- Badges, pills, toast ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
  padding: 4px 11px; border-radius: 999px;
  background: var(--bg-tint); color: var(--muted); border: 1px solid var(--border);
  text-transform: capitalize;
}
.badge.ready { background: var(--green-soft); color: var(--green); border-color: rgba(21, 128, 61, 0.22); }
.badge.error { background: var(--red-soft); color: var(--red); border-color: rgba(185, 28, 28, 0.22); }
.badge.indexing, .badge.queued, .badge.crawling { background: var(--amber-soft); color: var(--amber); border-color: rgba(180, 83, 9, 0.22); }
.badge.dev { background: var(--accent-soft); color: var(--accent); border-color: rgba(15, 118, 110, 0.25); }
.badge.urgency-high { background: var(--red-soft); color: var(--red); border-color: rgba(185, 28, 28, 0.22); }
.badge.urgency-medium { background: var(--amber-soft); color: var(--amber); border-color: rgba(180, 83, 9, 0.22); }
.badge.urgency-low { background: var(--green-soft); color: var(--green); border-color: rgba(21, 128, 61, 0.22); }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--accent);
  padding: 7px 15px; border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(15, 118, 110, 0.25);
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #faf9f5;
  border: 0; border-radius: 11px;
  padding: 12px 20px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lift); z-index: 100; display: none;
  max-width: min(90vw, 480px);
}
.toast.error { color: #fecaca; }

/* ---------- Forms ---------- */

input[type="text"], input[type="email"], input[type="password"], input[type="url"], textarea, select {
  width: 100%; background: var(--panel); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 11px;
  padding: 12px 15px; font-size: 15px; font-family: inherit; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 16px 0 7px; }

pre.snippet {
  background: var(--ink); border: 0; border-radius: 12px;
  padding: 14px 16px; font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px; color: #d6d3c4; overflow-x: auto; white-space: pre-wrap; word-break: break-all;
  margin: 8px 0 12px;
}

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
table.list td { padding: 12px 10px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--muted); }

/* ---------- Hero / landing ---------- */

.hero { padding: 80px 0 40px; text-align: center; position: relative; }
.hero .sub {
  max-width: 640px; margin: 0 auto; color: var(--muted);
  font-size: clamp(16px, 2vw, 18.5px); line-height: 1.65;
}
.hero-cta { margin-top: 36px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.demo-box {
  max-width: 640px; margin: 40px auto 0; padding: 26px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-lift);
}
.demo-box .row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.demo-box input { flex: 1; min-width: 220px; }
.demo-box .hint { color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.trust-line {
  margin-top: 22px; color: var(--faint); font-size: 13px;
  display: flex; gap: 20px; justify-content: center; flex-wrap: wrap;
}
.trust-line span { display: inline-flex; align-items: center; gap: 6px; }
.trust-line svg { width: 14px; height: 14px; color: var(--green); }

/* Hero with product mockup */
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px;
  align-items: center; text-align: left; padding: 72px 0 30px;
}
.hero-grid .pill { margin-bottom: 20px; }
.hero-grid h1 { margin-bottom: 18px; }
.hero-grid .sub { margin: 0; font-size: 17.5px; }
.hero-grid .demo-box { margin-top: 30px; }
.hero-grid .trust-line { justify-content: flex-start; }

.mockup-wrap { position: relative; }
.mockup-wrap::before {
  content: ""; position: absolute; inset: -40px -30px;
  background: radial-gradient(closest-side, rgba(15, 118, 110, 0.07), transparent);
  z-index: -1;
}
.mockup {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 18px; overflow: hidden;
  box-shadow: var(--shadow-lift);
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.mockup-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mockup-bar .m-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.mockup-bar .m-title { margin-left: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.mockup-body { padding: 18px 16px 20px; display: flex; flex-direction: column; gap: 10px; }

.m-row { display: flex; }
.m-row.user { justify-content: flex-end; }
.m-bubble {
  max-width: 85%; padding: 10px 14px; border-radius: 14px;
  font-size: 13.5px; line-height: 1.5; white-space: normal;
}
.m-row.bot .m-bubble { background: var(--bg-tint); border: 1px solid var(--border); border-top-left-radius: 4px; }
.m-row.user .m-bubble { background: var(--accent); color: #fff; border-top-right-radius: 4px; }
.m-bubble .cite {
  display: inline-grid; place-items: center; width: 16px; height: 16px;
  border-radius: 5px; background: rgba(255, 255, 255, 0.25); color: #fff;
  font-size: 10px; font-weight: 700; margin: 0 1px; vertical-align: 1px;
}
.m-row.bot .m-bubble .cite { background: var(--accent-soft); color: var(--accent); }
.m-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.m-src {
  font-size: 11px; color: var(--muted); padding: 4px 10px;
  border-radius: 999px; background: var(--bg-tint); border: 1px solid var(--border);
}
.m-src b { color: var(--accent); font-weight: 600; }
.m-alert {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid rgba(21, 128, 61, 0.28); background: var(--green-soft);
  border-radius: 14px; padding: 12px 14px; margin-top: 4px;
}
.m-alert svg { width: 17px; height: 17px; color: var(--green); flex: none; margin-top: 2px; }
.m-alert .t { font-size: 12.5px; line-height: 1.5; }
.m-alert .t b { display: block; color: var(--green); font-size: 12.5px; }
.m-alert .t span { color: var(--muted); font-size: 12px; }

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-head { max-width: 560px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--muted); margin: 10px 0 0; }
.eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 0; }
.features h3 { margin: 16px 0 8px; font-size: 17px; }
.features p { color: var(--muted); font-size: 14.5px; margin: 0; }
.feature-emoji { display: none; }

.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--panel); box-shadow: var(--shadow); }
.step-num {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 15px; margin-bottom: 14px;
  font-family: "Fraunces", Georgia, serif;
}
.step p { color: var(--muted); font-size: 14.5px; margin: 6px 0 0; }

/* Pricing */
.pricing { text-align: center; }
.pricing-card {
  max-width: 460px; margin: 0 auto; padding: 34px;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  text-align: left;
}
.price { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 4px; }
.price .amount { font-size: 46px; font-weight: 600; letter-spacing: -0.02em; font-family: "Fraunces", Georgia, serif; }
.price .per { color: var(--faint); font-size: 15px; }
.check-list { list-style: none; padding: 0; margin: 20px 0 26px; }
.check-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 7px 0; color: var(--muted); font-size: 14.5px;
}
.check-list svg { width: 17px; height: 17px; color: var(--accent); flex: none; margin-top: 3px; }
.check-list b { color: var(--text); font-weight: 600; }

/* ---------- Footer ---------- */

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 60px; padding: 36px 28px 44px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; color: var(--faint); font-size: 13.5px;
  max-width: 1120px; margin-left: auto; margin-right: auto;
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }
footer.site .f-links { display: flex; gap: 18px; flex-wrap: wrap; }

footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 28px 24px; color: var(--faint); font-size: 13px; text-align: center; }

/* ---------- Dashboard / app ---------- */

.app {
  display: flex; gap: 26px; align-items: flex-start;
  max-width: 1160px; margin: 0 auto;
  padding: 26px 28px 60px;
}
.sidebar {
  width: 250px; flex: none;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  position: sticky; top: 76px; box-shadow: var(--shadow);
}
.site-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--muted);
  margin-top: 6px; transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}
.site-item:hover { background: var(--bg-tint); color: var(--text); }
.site-item.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(15, 118, 110, 0.25); }
.site-item .badge { font-size: 10.5px; padding: 2px 8px; }

.main { flex: 1; min-width: 0; padding: 0; max-width: none; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 24px; border-bottom: 0; }
.tab {
  padding: 8px 16px; border-radius: 999px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--border); background: transparent;
  border-bottom: 1px solid var(--border); margin-bottom: 0;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); border-color: var(--border-strong); }
.tab.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: 13px; padding: 16px 18px; box-shadow: var(--shadow); }
.stat .n { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-family: "Fraunces", Georgia, serif; }
.stat .l { font-size: 12px; color: var(--faint); margin-top: 2px; font-weight: 500; }

.list-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 13px;
  padding: 16px 18px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.conv-row { cursor: pointer; transition: border-color 0.15s; }
.conv-row:hover { border-color: var(--border-strong); }

/* ---------- Chat bubbles (widget frame + dashboard transcripts) ---------- */

.msg-row { display: flex; margin: 6px 0; }
.msg-row.user { justify-content: flex-end; }
.bubble {
  max-width: 84%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px;
  line-height: 1.55; white-space: pre-wrap; word-break: break-word;
}
.msg-row.user .bubble {
  background: var(--accent); color: #fff; border-bottom-right-radius: 4px;
}
.msg-row.assistant .bubble {
  background: var(--bg-tint); border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.bubble.typing { display: flex; gap: 5px; align-items: center; padding: 14px 16px; }
.bubble.typing i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--faint);
  animation: bounce 1.2s infinite;
}
.bubble.typing i:nth-child(2) { animation-delay: 0.15s; }
.bubble.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.sources { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.sources a {
  font-size: 11.5px; color: var(--muted); background: var(--bg-tint);
  border: 1px solid var(--border); padding: 4px 11px; border-radius: 999px;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sources a:hover { color: var(--accent); border-color: rgba(15, 118, 110, 0.35); }

.thanks { font-size: 12px; color: var(--green); align-self: center; margin-left: 6px; }

/* ---------- Widget frame specifics ---------- */

.chat-app { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.chat-head {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.chat-head .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center; font-size: 17px;
  flex: none; overflow: hidden;
}
.chat-head .avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.chat-head .t { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; font-family: "Fraunces", Georgia, serif; }
.chat-head .s { font-size: 11.5px; color: var(--green); display: flex; align-items: center; gap: 5px; }
.chat-head .s::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); display: inline-block;
}
.chat-head .grow { flex: 1; min-width: 0; }
.handoff-btn {
  font: inherit; font-size: 12px; font-weight: 500; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--border-strong);
  transition: border-color 0.15s, background 0.15s;
}
.handoff-btn:hover { border-color: var(--accent); background: var(--accent-soft); }

.chat-log { flex: 1; overflow-y: auto; padding: 16px 14px; }
.chat-input {
  display: flex; gap: 9px; padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}
.chat-input input { flex: 1; border-radius: 999px; padding: 12px 18px; }
.chat-input .btn { border-radius: 999px; padding: 12px 20px; }
.chat-foot {
  text-align: center; font-size: 11px; color: var(--faint);
  padding: 7px 0 10px; background: var(--bg);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 0 4px; }
.chip {
  font: inherit; font-size: 13px; font-weight: 500; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  background: var(--panel); color: var(--accent);
  border: 1px solid rgba(15, 118, 110, 0.3); text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.book-form { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.book-form input { font: inherit; padding: 8px 10px; border: 1px solid var(--border, #d4d4d8); border-radius: 8px; background: var(--bg); color: inherit; }
.book-form .btn { align-self: flex-start; }
.book-err { color: #b91c1c; font-size: 13px; min-height: 0; }
.book-err:empty { display: none; }
.chip:hover { background: var(--accent-soft); border-color: var(--accent); }

.rate { display: flex; gap: 5px; margin-top: 8px; align-items: center; }
.rate button {
  font: inherit; font-size: 13px; padding: 3px 9px; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--faint); border: 1px solid var(--border);
  transition: all 0.15s;
}
.rate button:hover { color: var(--text); border-color: var(--border-strong); }
.rate button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

button:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Demo page ---------- */

.demo-wrap { display: grid; grid-template-columns: 1fr 420px; gap: 44px; align-items: start; padding: 52px 0; }
.demo-side { flex: none; min-width: 0; }
.demo-side h1 { font-size: clamp(28px, 3.6vw, 40px); }
.demo-frame-box {
  position: relative; height: 640px; width: 100%;
  border: 1px solid var(--border-strong); border-radius: 20px; overflow: hidden;
  box-shadow: var(--shadow-lift);
  background: var(--panel);
}
.demo-frame-box iframe { width: 100%; height: 100%; border: 0; display: block; }
ol.steps { color: var(--muted); padding-left: 0; list-style: none; counter-reset: ds; margin: 18px 0; }
ol.steps li { margin: 12px 0; counter-increment: ds; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
ol.steps li::before {
  content: counter(ds);
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px;
  display: grid; place-items: center; border: 1px solid rgba(15, 118, 110, 0.25);
  margin-top: 1px;
}

/* ---------- Misc ---------- */

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.section-title { text-align: center; margin-bottom: 40px; }

/* Auth card */
.auth-wrap { max-width: 420px; margin: 0 auto; padding: 72px 0 40px; }

/* Reveal animation */
.fade-in { animation: fadeUp 0.6s ease both; }
.fade-in.d1 { animation-delay: 0.08s; }
.fade-in.d2 { animation-delay: 0.16s; }
.fade-in.d3 { animation-delay: 0.24s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .mockup-wrap { max-width: 460px; margin: 0 auto; }
  .features, .steps-row { grid-template-columns: 1fr; }
  .demo-wrap { grid-template-columns: 1fr; }
  .demo-frame-box { height: 560px; }
  .app { flex-direction: column; padding: 20px 18px 50px; }
  .sidebar { width: 100%; position: static; }
  .hero { padding-top: 56px; }
}
@media (max-width: 560px) {
  .container { padding: 0 18px; }
  .card { padding: 20px; }
  .demo-box .row .btn { width: 100%; }
  .hero-grid .hero-copy h1 { font-size: 32px; }
}

/* Booking settings + list */
.hours-grid { display: grid; gap: 6px; margin: 10px 0 6px; }
.hours-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.hours-row > span:first-of-type { width: 34px; }
.hours-row input[type="time"] { width: auto; }
.badge.booking-requested { background: #fef3c7; color: #92400e; }
.badge.booking-confirmed { background: #dcfce7; color: #166534; }
.badge.booking-cancelled { background: #f4f4f5; color: #52525b; }
.badge.channel-wa { background: #dcfce7; color: #166534; }

/* Live takeover */
.msg-row.agent .bubble { background: var(--accent-soft, #e6f4f1); border: 1px solid var(--accent, #0f766e); }
.bubble .who { font-size: 11px; font-weight: 600; color: var(--accent, #0f766e); margin-bottom: 2px; }
.chat-note { text-align: center; font-size: 12px; color: var(--muted, #6b7280); margin: 8px 0; }
.inbox-thread { border: 1px solid var(--border); border-radius: 12px; padding: 12px; max-height: 460px; overflow-y: auto; background: var(--bg); }
.inbox-reply { display: flex; gap: 8px; margin-top: 10px; }
.inbox-reply textarea { flex: 1; min-height: 44px; }
.badge.needs-reply { background: #fee2e2; color: #991b1b; }
.badge.agent-on { background: #e0e7ff; color: #3730a3; }
.tab .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #dc2626; color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.filter-row { display: flex; gap: 8px; margin-bottom: 12px; }

/* Analytics */
.chart-wrap { position: relative; margin-top: 16px; }
.chart-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted, #6b7280); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { font-size: 10px; fill: var(--muted, #6b7280); }
.chart .hit { cursor: default; }
.chart .hit:hover { fill: rgba(0,0,0,0.04); }
.chart-tip { position: absolute; z-index: 5; background: #111827; color: #fff; font-size: 12px; line-height: 1.45; padding: 8px 10px; border-radius: 8px; pointer-events: none; min-width: 120px; }
.chart-sm { margin-top: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.top-pages { margin: 6px 0 0; padding-left: 18px; }
.top-pages li { margin: 3px 0; }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; margin-left: auto; font: inherit; }
.stat-link { text-decoration: none; color: inherit; cursor: pointer; transition: border-color .15s; }
.stat-link:hover { border-color: var(--accent); }

/* =====================================================================
   Owner app v7: "your assistant at work". Plain words, one clear next step.
   ===================================================================== */

/* Sidebar as a simple menu */
.app .sidebar { width: 264px; padding: 16px; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 96px); overflow-y: auto; }
.agent-card { display: flex; align-items: center; gap: 12px; padding: 6px 4px 12px; border-bottom: 1px solid var(--border); }
.agent-name { font-weight: 700; font-size: 15.5px; line-height: 1.25; letter-spacing: -0.01em; }
.agent-status { font-size: 12.5px; color: var(--green); font-weight: 500; }

.agent-avatar { position: relative; width: 44px; height: 44px; flex: none; }
.agent-avatar .mark { width: 100%; height: 100%; display: block; }
.agent-avatar .mark svg { width: 100%; height: 100%; display: block; }
.agent-avatar.big { width: 64px; height: 64px; margin-bottom: 14px; }
.agent-avatar .pulse { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; background: #16a34a; border: 2.5px solid var(--panel); z-index: 1; }
.agent-avatar .pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #16a34a; opacity: 0; animation: ping 2.4s ease-out infinite; }
.agent-avatar .pulse.off { background: var(--faint); }
.agent-avatar .pulse.off::after { display: none; }
@keyframes ping { 0% { transform: scale(.8); opacity: .7; } 80%, 100% { transform: scale(1.9); opacity: 0; } }

.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav .tab {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; border: 0;
  font-size: 14.5px; font-weight: 500; color: var(--text); background: none; cursor: pointer;
}
.side-nav .tab .ico { width: 20px; text-align: center; font-size: 15px; filter: grayscale(.2); }
.side-nav .tab:hover { background: var(--bg-tint); color: var(--text); }
.side-nav .tab.active { background: var(--accent); color: #fff; }
.side-nav .tab .count { margin-left: auto; }
.nav-group { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 12px 10px 4px; }
.side-sites { border-top: 1px solid var(--border); padding-top: 6px; margin-top: auto; }
.side-sites .nav-group { margin-left: 2px; }

/* Main column */
.main > #site-detail > section > .card,
.main > #site-detail > section > .task-list { margin-bottom: 16px; }
.page-h { font-size: clamp(26px, 3vw, 32px); margin: 2px 0 4px; }
.section-h { font-family: "Inter", system-ui, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
#sd-url { display: none; }
.badge.dev { margin-bottom: 10px; }

/* Today: the briefing */
.brief {
  background: linear-gradient(180deg, #ffffff, #f6fbfa);
  border: 1px solid var(--border); border-radius: 18px; padding: 24px 24px 20px;
  box-shadow: var(--shadow);
}
.brief-head { display: flex; gap: 16px; align-items: flex-start; }
.brief .agent-avatar { width: 52px; height: 52px; }
.brief-greeting { font-size: clamp(28px, 3.4vw, 38px); margin: 0 0 6px; }
.brief-summary { font-size: 17px; line-height: 1.55; margin: 0 0 14px; max-width: 62ch; }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-on, .chip-off { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.chip-on { background: var(--green-soft); color: var(--green); }
.chip-off { background: var(--bg-tint); color: var(--muted); }
.chip-off:hover { color: var(--accent); }

/* Needs you */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task {
  display: flex; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px;
  box-shadow: var(--shadow);
}
.task-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); display: grid; place-items: center; font-size: 18px; flex: none; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.task-detail { color: var(--muted); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.task-when { color: var(--faint); font-size: 12px; margin-top: 3px; }
.task-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; flex: none; }
.task.done { box-shadow: none; background: var(--green-soft); border-color: transparent; }
.task.done .task-ico { background: #fff; color: var(--green); font-weight: 700; }

/* What I did */
.feed { list-style: none; margin: 0 0 22px; padding: 4px 0; border-left: 2px solid var(--border); }
.feed li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0 7px 14px; position: relative; font-size: 14.5px; }
.feed li::before { content: ""; position: absolute; left: -6px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.feed-ico { width: 18px; flex: none; }
.feed-text { flex: 1; }
.feed-when { color: var(--faint); font-size: 12px; white-space: nowrap; }

/* Settings */
#tab-settings .card { margin-bottom: 16px; }
#tab-settings .card h3 { margin-top: 0; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
label.check input { width: auto; margin: 0; }
.sub-card { margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--bg-tint); }
.save-bar { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(180deg, transparent, var(--bg) 40%); margin-bottom: 16px; z-index: 5; }
.danger-card { border-color: rgba(185, 28, 28, .25); }

/* Empty state + auth */
#empty-state { text-align: center; padding: 40px 28px; }
#empty-state .agent-avatar { margin: 0 auto 14px; }
.auth-wrap { max-width: 980px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 64px 28px 40px; }
.auth-h { font-size: clamp(32px, 4vw, 46px); margin: 0 0 12px; }
.auth-card h2 { font-size: 26px; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; padding-top: 32px; gap: 20px; }
  .auth-hero .auth-h { font-size: 30px; }
}

/* Mobile: menu becomes a horizontal strip */
@media (max-width: 960px) {
  .app .sidebar { width: 100%; max-height: none; position: static; padding: 12px; }
  .side-nav { flex-direction: row; overflow-x: auto; gap: 4px; -webkit-overflow-scrolling: touch; }
  .side-nav .tab { white-space: nowrap; padding: 8px 10px; font-size: 14px; }
  .side-nav .nav-group { display: none; }

  .agent-card { border-bottom: 0; padding-bottom: 0; }
}
@media (max-width: 560px) {
  .task { flex-wrap: wrap; }
  .task-act { width: 100%; justify-content: flex-start; padding-left: 52px; }
  .brief { padding: 18px; }
  .brief-head { flex-direction: column; gap: 10px; }
  .feed-when { display: none; }
}
@media (max-width: 960px) {
  #user-email { display: none; }
  .sidebar.single-site .side-sites { display: none; }
  .badge.dev { display: none !important; }
}
.snippet { white-space: pre-wrap; word-break: break-all; max-width: 100%; }
.main, #site-detail, #site-detail > section { min-width: 0; max-width: 100%; }
#site-detail table.list { display: block; overflow-x: auto; }

/* demo progress */
.spin{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:spin .8s linear infinite;vertical-align:-2px;margin-right:6px}
@keyframes spin{to{transform:rotate(360deg)}}
#demo-status.working b{color:var(--text,#1f2937)}
#demo-status .tip{animation:fadeTip .5s ease}
@keyframes fadeTip{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.spin,#demo-status .tip{animation:none}}
