:root {
  /* palette */
  --bg: #0A0E1A;
  --surface-1: #0F1320;
  --surface-2: #161B2E;
  --border: #1F2538;
  --border-hi: #2A3147;
  --text: #F5F7FA;
  --text-mid: #C8CFE0;
  --text-muted: #9AA3B8;
  --text-dim: #5E6680;
  --accent: #06D6F2;
  --accent-hi: #3DDEF2;
  --accent-glow: rgba(6, 214, 242, 0.18);
  --success: #34D399;
  --coral: #FF6363;
  /* mesh blob colors */
  --mesh-cyan: #06D6F2;
  --mesh-violet: #7C5CFF;
  --mesh-pink: #FF5BA8;
  --mesh-warm: #FF9F40;

  /* type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* shadow + motion */
  --t-fast: 180ms cubic-bezier(.2,.8,.2,1);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 12px 32px -12px rgba(0,0,0,.5);
  --shadow-glow: 0 0 0 1px rgba(6,214,242,.35), 0 12px 40px -8px rgba(6,214,242,.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: -0.014em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* subtle dot grid overlay across the page (very low opacity) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .25;
  background-image: radial-gradient(circle, rgba(154,163,184,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
/* SVG turbulence grain layered on top of everything */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/></svg>");
}
body > * { position: relative; z-index: 1; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* type */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.028em; line-height: 1.08; }
h1 {
  font-size: clamp(32px, 6vw, 84px); letter-spacing: -0.034em; line-height: 1.06;
  background: linear-gradient(180deg, #FFFFFF 0%, #BABAC2 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  word-wrap: break-word; overflow-wrap: anywhere;
}
h2 {
  font-size: clamp(24px, 4.4vw, 48px); letter-spacing: -0.026em; line-height: 1.12;
  background: linear-gradient(180deg, #FFFFFF 0%, #C4C4CC 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
h3 { font-size: 18px; letter-spacing: -0.01em; }
p { color: var(--text-muted); }

.eyebrow {
  color: var(--accent); font-weight: 600; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  font-family: var(--mono);
}
.muted { color: var(--text-dim); }
.mono { font-family: var(--mono); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 15px; padding: 11px 20px;
  border-radius: 10px; transition: all var(--t-fast); cursor: pointer;
  border: 1px solid transparent; line-height: 1;
  font-family: var(--sans);
}
.btn-primary {
  background: var(--accent); color: #02232a;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { background: var(--accent-hi); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,.04); color: var(--text);
  border-color: var(--border-hi);
}
.btn-ghost:hover { background: rgba(255,255,255,.07); border-color: #444; }

.kbd {
  display: inline-flex; align-items: center; gap: 3px;
  font-family: var(--mono); font-size: 11px;
  padding: 3px 7px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border-hi);
  color: var(--text-mid); line-height: 1;
}

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  background: rgba(10, 14, 26, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.nav-logo { font-size: 17px; font-weight: 600; letter-spacing: -0.018em; font-family: var(--mono); }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color var(--t-fast); }
.nav-link:hover { color: var(--text); }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* section */
section { padding: 120px 0; position: relative; }
@media (max-width: 720px) { section { padding: 80px 0; } }
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head .lede {
  margin-top: 16px; color: var(--text-muted);
  font-size: clamp(16px, 1.6vw, 19px); max-width: 60ch;
}
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border-hi);
  color: var(--text-mid); padding: 6px 14px; border-radius: 980px;
  font-size: 13px; font-weight: 500;
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); box-shadow: 0 0 12px var(--success);
}

/* hero — Flow-style multi-blob mesh */
.hero { padding: 110px 0 60px; text-align: center; }
.hero-bg { position: absolute; inset: -120px 0 -40px 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(110px); }
.blob.b1 { width: 580px; height: 580px; background: var(--mesh-violet); top: -160px; left: 6%; opacity: .55; }
.blob.b2 { width: 540px; height: 540px; background: var(--mesh-cyan); top: -110px; right: 4%; opacity: .58; }
.blob.b3 { width: 620px; height: 500px; background: var(--mesh-warm); top: 60px; left: 38%; opacity: .28; }
.blob.b4 { width: 400px; height: 400px; background: var(--mesh-pink); top: 280px; right: 28%; opacity: .26; }
.blob.b5 { width: 360px; height: 360px; background: var(--mesh-cyan); top: 360px; left: 18%; opacity: .22; }
.hero .wrap { position: relative; z-index: 2; }
.hero .badge { margin-bottom: 28px; }
.hero p.sub {
  font-size: clamp(17px, 2.3vw, 21px);
  color: var(--text-muted); max-width: 660px; margin: 24px auto 0;
}
.cta-row { display: flex; gap: 12px; justify-content: center; margin-top: 38px; flex-wrap: wrap; }
.fine-print { margin-top: 18px; font-size: 13px; color: var(--text-dim); font-family: var(--mono); }

/* phone + laptop showcase — with reflection */
.showcase { margin: 80px auto 0; position: relative; max-width: 980px; }
.showcase-row {
  display: flex; align-items: flex-end; justify-content: center; gap: 40px;
  position: relative; z-index: 1;
}
.showcase-laptop {
  background: #000; border: 10px solid #18181C; border-bottom: none;
  border-radius: 14px 14px 0 0; overflow: hidden;
  box-shadow: 0 50px 120px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 60px -10px rgba(6,214,242,.18);
  width: 580px; max-width: 62%;
}
.showcase-laptop img { width: 100%; display: block; }
.showcase-laptop-base {
  height: 14px; background: linear-gradient(#28282E,#13131A); border-radius: 0 0 10px 10px;
  width: 580px; max-width: 62%; margin: 0 auto; position: relative;
}
.showcase-laptop-base::after {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 88px; height: 6px; background: #0A0A0E; border-radius: 0 0 8px 8px;
}
.showcase-phone {
  background: #000; border: 8px solid #18181C;
  border-radius: 36px; overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 50px -10px rgba(124,92,255,.22);
  width: 220px; max-width: 28%; aspect-ratio: 9 / 19.5;
}
.showcase-phone img { width: 100%; height: 100%; object-fit: cover; }
.showcase-reflection {
  position: absolute; left: 5%; right: 5%; top: 100%; height: 140px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 70%);
  transform: scaleY(-1); opacity: .4; filter: blur(2px);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
          mask-image: linear-gradient(180deg, #000 0%, transparent 80%);
  pointer-events: none;
}
@media (max-width: 720px) {
  .showcase-row { flex-direction: column-reverse; align-items: center; gap: 24px; }
  .showcase-laptop, .showcase-phone, .showcase-laptop-base { max-width: 100%; width: 100%; }
  .showcase-phone { width: 60%; max-width: 280px; }
  .showcase-laptop-base { display: none; }
}

/* repeating CTA bar (between sections, builds momentum on long pages) */
.cta-bar {
  background: linear-gradient(180deg, var(--surface-1) 0%, #060912 100%);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 64px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-bar::before {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 480px; height: 240px; border-radius: 50%;
  background: var(--accent); filter: blur(140px); opacity: .15; pointer-events: none;
}
.cta-bar .wrap { position: relative; z-index: 1; }
.cta-bar h3 {
  font-size: clamp(22px, 3vw, 32px); font-weight: 600; letter-spacing: -.024em;
  color: var(--text); margin-bottom: 8px;
}
.cta-bar p { color: var(--text-muted); margin-bottom: 22px; font-size: 16px; }

/* persona cards (who this is for) */
.personas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .personas { grid-template-columns: 1fr; } }
.persona {
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: 18px; padding: 32px 28px;
  position: relative; overflow: hidden; transition: border-color var(--t-fast);
}
.persona:hover { border-color: var(--border-hi); }
.persona-icon {
  font-family: var(--mono); font-weight: 600; color: var(--accent);
  background: rgba(6,214,242,.08); border: 1px solid rgba(6,214,242,.3);
  padding: 4px 10px; border-radius: 6px; font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; display: inline-block; margin-bottom: 18px;
}
.persona h3 { font-size: 20px; margin-bottom: 10px; color: var(--text); }
.persona p { font-size: 14.5px; color: var(--text-muted); line-height: 1.6; }
.persona ul { list-style: none; padding: 0; margin-top: 14px; }
.persona ul li { font-size: 13.5px; color: var(--text-muted); padding: 6px 0 6px 22px; position: relative; }
.persona ul li::before {
  content: "→"; position: absolute; left: 0; color: var(--accent);
  font-family: var(--mono); font-weight: 600;
}

/* comparison table */
.compare-table { background: var(--surface-1); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.compare-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 0; }
.compare-cell { padding: 18px 20px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 14px; color: var(--text-mid); }
.compare-cell:last-child { border-right: none; }
.compare-row:last-child .compare-cell { border-bottom: none; }
.compare-row.head .compare-cell {
  background: var(--surface-2); font-family: var(--mono); font-size: 12px;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-muted);
}
.compare-row.head .compare-cell.us { color: var(--accent); }
.compare-cell.dim { color: var(--text-dim); }
.compare-cell.win { color: var(--accent); font-weight: 600; }
.compare-cell.label { font-weight: 500; color: var(--text); }
.compare-row:not(.head) .compare-cell.us { background: rgba(6,214,242,.04); border-left: 1px solid rgba(6,214,242,.18); border-right: 1px solid rgba(6,214,242,.18); }
/* Savings table: 3-column variant (label, monthly, annual) */
.savings-table .compare-row { grid-template-columns: 1.4fr 1fr 1fr; }
.savings-table .compare-cell:not(.label) { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.savings-table .compare-row.head .compare-cell:not(.label) { font-family: var(--mono); }
@media (max-width: 720px) {
  .compare-table:not(.savings-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 18px;
  }
  .compare-table:not(.savings-table) .compare-row { grid-template-columns: 160px 130px 130px 130px 130px; min-width: 680px; }
  /* Inline-styled 3-column tables also scroll horizontally on mobile */
  .compare-table .compare-row[style*="grid-template-columns"] { min-width: 480px; }
  /* Two-column value-stack table */
  .compare-table .compare-row[style*="2fr 1fr"] {
    grid-template-columns: 1.4fr 100px !important;
    min-width: 0;
  }
  /* Savings table stays 3-column but tightens on mobile */
  .savings-table .compare-row { grid-template-columns: 1.2fr 90px 100px; min-width: 0; }
  .savings-table .compare-cell { padding: 12px 12px; font-size: 13px; }
}
@media (max-width: 540px) {
  /* Make padding tighter on mobile so content fits */
  .wrap { padding: 0 18px; }
  section { padding: 64px 0; }
  .section-head { margin-bottom: 36px; }
  /* Reduce hero showcase margin so it doesn't blow out the page */
  .showcase { margin-top: 40px; }
  /* Hero CTA buttons stack on very small screens */
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; justify-content: center; }
  /* Compare table cells smaller text on mobile */
  .compare-cell { padding: 12px 12px; font-size: 13px; }
  .compare-row.head .compare-cell { font-size: 11px; }
  /* Bento cards a touch tighter on mobile */
  .card { padding: 22px; }
  /* Personas cards tighter */
  .persona { padding: 24px 20px; }
  /* Steps grid: single column on tight mobile */
  .steps { gap: 10px; }
  .step { padding: 18px; }
}

/* bento + cards */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .bento { grid-template-columns: 1fr; } }
.bento.bento-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .bento.bento-2 { grid-template-columns: 1fr; } }
.card {
  background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border); border-radius: 18px; padding: 28px;
  position: relative; overflow: hidden;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.card:hover { border-color: var(--border-hi); }
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 40%);
  pointer-events: none;
}
.card.wide { grid-column: span 2; }
@media (max-width: 860px) { .card.wide { grid-column: span 1; } }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--text-muted); line-height: 1.55; }
.card .ico {
  font-family: var(--mono); font-weight: 600; color: var(--accent);
  background: rgba(6,214,242,.08); border: 1px solid rgba(6,214,242,.3);
  width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; margin-bottom: 18px; font-size: 14px;
}

/* steps (how-it-works) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.step .step-num {
  font-family: var(--mono); color: var(--accent); font-size: 12px;
  font-weight: 600; letter-spacing: 0.08em;
}
.step h3 { margin: 8px 0 4px; }
.step p { font-size: 14px; }

/* pricing strip */
.pricing-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .pricing-strip { grid-template-columns: 1fr; } }
.price-card { background: var(--surface-1); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.price-card .amt {
  font-family: var(--sans); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(32px, 4vw, 44px); color: var(--text);
}
.price-card .amt .dot { color: var(--accent); }
.price-card h3 { margin: 6px 0 8px; color: var(--text-mid); }
.price-card p { font-size: 14.5px; }

/* guarantee */
.guarantee { background: linear-gradient(180deg, var(--bg) 0%, #060912 100%); }
.guarantee .card { border-color: var(--border-hi); }

/* disqualifier */
.disqualifier ul { list-style: none; padding: 0; max-width: 78ch; }
.disqualifier li {
  padding: 14px 0 14px 32px; position: relative;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid); font-size: 16px;
}
.disqualifier li:last-child { border-bottom: none; }
.disqualifier li::before {
  content: "✕"; position: absolute; left: 0; top: 14px;
  color: var(--coral); font-weight: 700; font-family: var(--mono);
}
.disqualifier strong { color: var(--text); font-weight: 600; }

/* faq */
.faq { background: linear-gradient(0deg, var(--bg) 0%, #060912 100%); }
.faq details {
  padding: 20px 0; border-bottom: 1px solid var(--border);
  max-width: 78ch; margin: 0 auto;
}
.faq details:last-of-type { border-bottom: none; }
.faq summary {
  font-weight: 600; font-size: 17px; color: var(--text);
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.faq summary::after {
  content: "+"; font-family: var(--mono); color: var(--accent); font-weight: 700;
  transition: transform var(--t-fast);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--text-muted); font-size: 15.5px; line-height: 1.65; }

/* form */
.form-section { background: var(--surface-1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.form-card { max-width: 720px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label {
  display: block; font-weight: 500; font-size: 14px;
  color: var(--text-mid); margin-bottom: 8px;
  font-family: var(--mono); letter-spacing: 0.02em;
}
.field .opt { color: var(--text-dim); font-weight: 400; }
.field input, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 16px;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border-hi); border-radius: 10px;
  padding: 11px 14px; transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

/* portfolio cards (uses .bento) */
.portfolio-card { padding: 0; overflow: hidden; }
.portfolio-img {
  aspect-ratio: 16 / 10; background: #000; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.portfolio-img img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-body { padding: 22px 24px; }
.portfolio-body h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.portfolio-body h3 a { color: var(--accent); font-size: 13px; font-family: var(--mono); font-weight: 500; }
.portfolio-body p { margin-top: 8px; }

/* footer */
.footer {
  padding: 40px 0; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 14px;
}
.footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--text); }

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* === chat widget === */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: #02232a;
  border: none; cursor: pointer; font-size: 24px;
  box-shadow: var(--shadow-glow);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-fast);
}
.chat-fab:hover { transform: translateY(-2px) scale(1.04); }
.chat-fab svg { width: 26px; height: 26px; }

.chat-panel {
  position: fixed; bottom: 96px; right: 24px; z-index: 100;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 140px));
  background: var(--surface-1); border: 1px solid var(--border-hi);
  border-radius: 18px; box-shadow: var(--shadow-md);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.is-open { display: flex; }
.chat-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface-1) 100%);
}
.chat-header .status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px var(--success); }
.chat-header strong { color: var(--text); font-size: 14px; }
.chat-header span { color: var(--text-dim); font-size: 12px; font-family: var(--mono); margin-left: auto; }
.chat-close { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 4px; font-size: 18px; line-height: 1; }
.chat-close:hover { color: var(--text); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
  scrollbar-width: thin; scrollbar-color: var(--border-hi) transparent;
}
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; }
.chat-msg.bot { background: var(--surface-2); color: var(--text-mid); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--accent); color: #02232a; align-self: flex-end; border-bottom-right-radius: 4px; font-weight: 500; }
.chat-msg.system { font-size: 12px; color: var(--text-dim); align-self: center; font-family: var(--mono); }

.chat-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; }
.chat-typing span { width: 6px; height: 6px; background: var(--text-dim); border-radius: 50%; animation: typingDot 1.2s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat-input-row {
  padding: 12px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; background: var(--surface-1);
}
.chat-input {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border-hi);
  border-radius: 10px; padding: 10px 12px; color: var(--text);
  font-family: var(--sans); font-size: 14px;
}
.chat-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.chat-send {
  background: var(--accent); color: #02232a; border: none;
  border-radius: 10px; padding: 0 16px; font-weight: 600; cursor: pointer;
  transition: background var(--t-fast);
}
.chat-send:disabled { opacity: .5; cursor: not-allowed; }
.chat-send:not(:disabled):hover { background: var(--accent-hi); }

.chat-capture-form { padding: 12px; border-top: 1px solid var(--border); background: var(--surface-1); }
.chat-capture-form input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border-hi);
  border-radius: 10px; padding: 10px 12px; color: var(--text);
  font-family: var(--sans); font-size: 14px; margin-bottom: 8px;
}
.chat-capture-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.chat-capture-form button { width: 100%; }

/* === chat widget mobile (full-screen panel, safe-area, no iOS zoom) === */
@media (max-width: 540px) {
  .chat-fab {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
    width: 54px; height: 54px;
  }
  .chat-panel {
    position: fixed;
    inset: 0;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; max-width: 100vw;
    height: 100dvh; max-height: 100dvh;
    border: 0;
    border-radius: 0;
    transform-origin: center;
  }
  /* Hide the floating FAB while panel is open so it doesn't sit on top of input */
  body.chat-panel-open .chat-fab { display: none; }
  /* Lock body scroll while panel is open */
  body.chat-panel-open { overflow: hidden; }
  /* Respect notches and home indicators */
  .chat-header { padding-top: max(14px, env(safe-area-inset-top)); }
  .chat-input-row, .chat-capture-form {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  /* 16px minimum on inputs stops iOS Safari auto-zooming the page on focus */
  .chat-input, .chat-capture-form input { font-size: 16px; }
  /* Bigger message bubbles on mobile so they're easier to read */
  .chat-msg { max-width: 88%; font-size: 15px; }
}
