/* ============================================================
   PublishDesk marketing site — Ink + Signal, Zapier-calm manners.
   Warm-free cool neutrals to match the product; thin borders and
   whitespace carry hierarchy; one loud CTA color (Signal).
   ============================================================ */

:root {
  --ink: #001F7C;
  --signal: #417AFF;
  --signal-hover: #2C5FE6;
  --gradient: linear-gradient(135deg, #001F7C 0%, #417AFF 100%);

  --bg: #FCFCFD;
  --bg-soft: #F5F6F8;
  --bg-tint: #F0F4FF;
  --surface: #FFFFFF;
  --border: #E3E7ED;
  --border-strong: #C7CDD8;

  --text: #141821;
  --text-2: #4A5160;
  --text-3: #868D9C;

  --success: #2E7D52;
  --danger: #D43A33;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 3px rgba(15, 17, 23, 0.06), 0 1px 2px rgba(15, 17, 23, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 17, 23, 0.08), 0 2px 4px rgba(15, 17, 23, 0.04);
  --shadow-lg: 0 24px 64px rgba(0, 31, 124, 0.16), 0 6px 16px rgba(15, 17, 23, 0.08);

  --font-display: 'Geist', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-editorial: 'Instrument Serif', Georgia, serif;

  --band: clamp(72px, 10vw, 128px);
  --container: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ── Type ─────────────────────────────────────────────── */
.overline {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--signal);
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.025em; }
.h-display { font-size: clamp(40px, 6vw, 64px); font-weight: 700; line-height: 1.04; }
.h-xl { font-size: clamp(30px, 4vw, 42px); font-weight: 700; line-height: 1.1; }
.h-md { font-size: 20px; font-weight: 650; line-height: 1.25; }
.lede { font-size: clamp(17px, 2vw, 19px); line-height: 1.65; color: var(--text-2); }
.editorial-accent { font-family: var(--font-editorial); font-style: italic; font-weight: 400; }

/* ── Buttons — compact, stable, tactile ───────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 11px 24px;
  border-radius: var(--radius-sm); border: none;
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: transform 180ms cubic-bezier(0.34, 1.4, 0.64, 1),
              box-shadow 180ms ease, background-color 150ms ease,
              border-color 150ms ease, color 150ms ease;
  will-change: transform;
}
.btn:active { transform: translateY(0) scale(0.97); }
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 1px 2px rgba(0, 31, 124, 0.18); }
.btn-primary:hover { background: var(--signal-hover); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(65, 122, 255, 0.35); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(15, 17, 23, 0.25); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--signal); color: var(--signal); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-on-dark:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 16px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 252, 253, 0.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.nav-brand img { height: 34px; width: 34px; }
.nav-brand b { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.nav-brand b span { color: var(--text-3); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--text-2); transition: color 150ms; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .login { font-size: 14.5px; font-weight: 600; color: var(--text); }
.nav-cta .login:hover { color: var(--signal); }
.nav-burger { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 9px 11px; }
.nav-burger span { display: block; width: 18px; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: transform 200ms ease, opacity 200ms ease; }
#mobile-menu { display: none; border-bottom: 1px solid var(--border); background: var(--bg); padding: 12px 24px 20px; }
#mobile-menu a { display: block; padding: 11px 4px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--bg-soft); }
#mobile-menu .btn { width: 100%; margin-top: 14px; }
.menu-open #mobile-menu { display: block; }
.menu-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Hero ─────────────────────────────────────────────── */
.hero { padding: var(--band) 0 0; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% -20% auto;  height: 720px;
  background:
    radial-gradient(680px 340px at 30% 20%, rgba(65, 122, 255, 0.09), transparent 65%),
    radial-gradient(560px 300px at 72% 12%, rgba(0, 31, 124, 0.07), transparent 60%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); font-size: 13px; font-weight: 550; color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.hero h1 { margin: 26px auto 0; max-width: 850px; }
.hero h1 .accent { color: var(--ink); }
.hero .lede { margin: 22px auto 0; max-width: 640px; }
.hero-ctas { display: flex; justify-content: center; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-proof { margin-top: 18px; font-size: 13.5px; color: var(--text-3); }
.hero-proof b { color: var(--text-2); font-weight: 600; }

/* Browser-framed product shot, floating on the page edge. */
.hero-shot { margin: clamp(48px, 7vw, 84px) auto 0; max-width: 1020px; position: relative; }
/* The screenshot must NEVER stretch: scale to width, keep intrinsic ratio. */
.browser img { display: block; width: 100%; height: auto; }

/* Floating detail cards flanking the main shot — small, tilted, alive. */
.hero-float {
  position: absolute; z-index: 2; margin: 0; width: clamp(220px, 24vw, 320px);
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg);
  animation: heroFloat 7s ease-in-out infinite;
}
.hero-float img { display: block; width: 100%; height: auto; }
.hero-float figcaption {
  padding: 9px 14px; font-size: 12px; font-weight: 600; color: var(--text-2);
  border-top: 1px solid var(--border); background: var(--bg-soft);
}
.hero-float-left  { left: clamp(-72px, -5vw, -32px); bottom: -34px; transform: rotate(-2.2deg); }
.hero-float-right { right: clamp(-72px, -5vw, -32px); top: -30px; transform: rotate(2deg); animation-delay: 1.6s; }
@keyframes heroFloat {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}
@media (max-width: 900px) { .hero-float { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero-float { animation: none; } }
.browser {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--bg-soft);
}
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.browser-bar .url {
  margin-left: 12px; flex: 1; max-width: 340px;
  font-size: 11.5px; color: var(--text-3); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 4px 14px;
  text-align: left; overflow: hidden; white-space: nowrap;
}
.hero-fade { position: relative; }
.hero-fade::after {
  content: ''; position: absolute; inset: auto 0 0; height: 120px;
  background: linear-gradient(transparent, var(--bg));
}

/* ── Section scaffolding ──────────────────────────────── */
.section { padding: var(--band) 0; }
.section-head { max-width: 660px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-top: 14px; }
.section-head .lede { margin-top: 16px; }
.band-soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Feature cards (Zapier tinted-card manner) ────────── */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.feature {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface);
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 250ms ease, border-color 200ms ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.feature-body { padding: 26px 28px 22px; }
.feature-body .chip {
  display: inline-block; font-size: 11.5px; font-weight: 650; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink); background: var(--bg-tint);
  border-radius: var(--radius-pill); padding: 4px 12px;
}
.feature-body h3 { margin-top: 14px; font-size: 21px; font-weight: 680; letter-spacing: -0.02em; }
.feature-body p { margin-top: 8px; font-size: 15px; color: var(--text-2); }
.feature-shot { padding: 0 28px; }
.feature-shot img {
  width: 100%; border: 1px solid var(--border); border-bottom: none;
  border-radius: 10px 10px 0 0; box-shadow: var(--shadow-sm);
}
.feature.tint-a { background: linear-gradient(180deg, #FFFFFF 0%, #F3F7FF 100%); }
.feature.tint-b { background: linear-gradient(180deg, #FFFFFF 0%, #F2FAF5 100%); }
.feature.tint-c { background: linear-gradient(180deg, #FFFFFF 0%, #FBF7EF 100%); }
.feature.tint-d { background: linear-gradient(180deg, #FFFFFF 0%, #FBF3F2 100%); }

/* ── Pipeline band (dark Ink) ─────────────────────────── */
.pipeline { background: #04102E; color: #fff; position: relative; overflow: hidden; }
.pipeline::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(760px 380px at 80% 0%, rgba(65, 122, 255, 0.16), transparent 60%),
    radial-gradient(560px 320px at 8% 100%, rgba(65, 122, 255, 0.10), transparent 55%);
}
.pipeline .container { position: relative; }
.pipeline .overline { color: #8FB0FF; }
.pipeline h2 { color: #fff; }
.pipeline .lede { color: rgba(255, 255, 255, 0.72); }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: clamp(36px, 5vw, 56px); }
.flow-step {
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04); padding: 20px 18px;
  transition: border-color 300ms ease, background 300ms ease, transform 300ms ease;
}
.flow-step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 12.5px; font-weight: 650; color: rgba(255, 255, 255, 0.75);
  transition: background 300ms ease, color 300ms ease, border-color 300ms ease;
}
.flow-step h3 { margin-top: 12px; font-size: 16.5px; font-weight: 650; }
.flow-step p { margin-top: 6px; font-size: 13.5px; line-height: 1.55; color: rgba(255, 255, 255, 0.62); }
.flow-step.lit { border-color: rgba(65, 122, 255, 0.75); background: rgba(65, 122, 255, 0.12); transform: translateY(-3px); }
.flow-step.lit .n { background: var(--signal); border-color: var(--signal); color: #fff; }

/* ── Stat strip ───────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.stat { border-left: 3px solid var(--signal); padding: 6px 0 6px 20px; }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; letter-spacing: -0.02em; }
.stat span { font-size: 14px; color: var(--text-2); }

/* ── Live band ────────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 72px); align-items: center; }
.split .browser { box-shadow: var(--shadow-md); }
.live-dot { position: relative; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }
.live-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--danger); animation: livePing 1.8s ease-out infinite; }
@keyframes livePing { 0% { transform: scale(0.6); opacity: 0.9; } 70%, 100% { transform: scale(1.5); opacity: 0; } }
.checklist { margin-top: 22px; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 12px; font-size: 15.5px; color: var(--text-2); }
.checklist li svg { flex-shrink: 0; margin-top: 3px; }

/* ── Pricing ──────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); padding: 30px 28px;
  transition: transform 250ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 250ms ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.plan.hot { border-color: var(--signal); box-shadow: 0 0 0 1px var(--signal), var(--shadow-md); position: relative; }
.plan .flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gradient); color: #fff; font-size: 11.5px; font-weight: 650;
  letter-spacing: 0.05em; text-transform: uppercase; border-radius: var(--radius-pill); padding: 5px 14px;
}
.plan h3 { font-size: 18px; font-weight: 650; }
.plan .for { margin-top: 4px; font-size: 13.5px; color: var(--text-3); }
.plan .price { margin-top: 18px; font-family: var(--font-display); font-size: 42px; font-weight: 700; letter-spacing: -0.03em; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.plan ul { margin: 20px 0 26px; display: grid; gap: 10px; flex: 1; }
.plan li { display: flex; gap: 10px; font-size: 14.5px; color: var(--text-2); }
.plan li svg { flex-shrink: 0; margin-top: 3px; }
.plan .btn { width: 100%; }

/* ── FAQ ──────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 4px; font-size: 16.5px; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.faq summary .plus::before, .faq summary .plus::after {
  content: ''; position: absolute; background: var(--text-3); border-radius: 2px;
  transition: transform 250ms ease;
}
.faq summary .plus::before { inset: 8px 0; }
.faq summary .plus::after { inset: 0 8px; }
.faq details[open] summary .plus::after { transform: rotate(90deg); }
.faq details p { padding: 0 40px 22px 4px; color: var(--text-2); font-size: 15px; }

/* ── Final CTA ────────────────────────────────────────── */
.cta-final { background: var(--gradient); color: #fff; text-align: center; border-radius: var(--radius-lg); padding: clamp(52px, 7vw, 84px) 32px; position: relative; overflow: hidden; }
.cta-final::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 70% 0%, rgba(255,255,255,0.14), transparent 60%); }
.cta-final > * { position: relative; }
.cta-final h2 { color: #fff; }
.cta-final p { margin: 16px auto 0; max-width: 560px; color: rgba(255, 255, 255, 0.85); }
.cta-final .btn { margin-top: 30px; }
.cta-final .fine { margin-top: 14px; font-size: 13px; color: rgba(255, 255, 255, 0.7); }

/* ── Footer ───────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 56px 0 40px; background: var(--bg); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.foot-brand p { margin-top: 12px; max-width: 300px; font-size: 14px; color: var(--text-2); }
.foot-col h4 { font-size: 12.5px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.foot-col a { display: block; padding: 5px 0; font-size: 14.5px; color: var(--text-2); }
.foot-col a:hover { color: var(--signal); }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); }

/* ── Scroll reveal ────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity 550ms cubic-bezier(0.22, 1, 0.36, 1), transform 550ms cubic-bezier(0.22, 1, 0.36, 1); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 280ms; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-burger { display: block; }
  .features { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 28px; }
  .split { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .flow { grid-template-columns: 1fr; }
  .nav-cta .login { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .flow-step, .feature, .plan, .btn { transition: none !important; }
  .live-dot::after { animation: none; }
}

/* ── Proof band: three framed receipts ─────────────────── */
.proof-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.proof-card {
  margin: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 220ms ease;
}
.proof-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.proof-card img { display: block; width: 100%; height: auto; }
.proof-card figcaption { padding: 16px 18px; border-top: 1px solid var(--border); }
.proof-card figcaption b { display: block; font-size: 15px; color: var(--text); }
.proof-card figcaption span { display: block; margin-top: 4px; font-size: 13px; line-height: 1.55; color: var(--text-2); }
@media (max-width: 900px) { .proof-grid { grid-template-columns: 1fr; } }

/* ── Mega — the PublishDesk assistant bubble ─────────────────────────── */
.mega-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 12px; border: 0; cursor: pointer;
  border-radius: var(--radius-pill);
  background: var(--gradient); color: #fff;
  font: 600 14px/1 var(--font-body, inherit);
  box-shadow: 0 10px 28px rgba(0, 31, 124, 0.35);
  transition: transform 180ms cubic-bezier(.22,.61,.36,1), box-shadow 180ms;
}
.mega-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 31, 124, 0.42); }
.mega-btn:active { transform: scale(0.97); }
.mega-btn svg { display: block; }

.mega-panel {
  position: fixed; right: 16px; bottom: 84px; z-index: 91;
  display: flex; flex-direction: column; overflow: hidden;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 120px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(10, 16, 40, 0.28);
  animation: mega-in 220ms cubic-bezier(.22,.61,.36,1);
}
@keyframes mega-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
.mega-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--ink); }
.mega-head b { display: block; font-size: 14px; color: #fff; }
.mega-head span { display: block; font-size: 11px; color: #8FB1FF; }
.mega-head .mega-close {
  margin-left: auto; border: 0; background: transparent; color: #8FB1FF;
  cursor: pointer; padding: 6px; border-radius: 8px; line-height: 0;
}
.mega-head .mega-close:hover { background: rgba(255,255,255,0.1); color: #fff; }

.mega-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.mega-row { display: flex; align-items: flex-start; gap: 8px; }
.mega-row.user { flex-direction: row-reverse; }
.mega-msg {
  max-width: 85%; padding: 8px 12px; font-size: 14px; line-height: 1.55;
  border-radius: 16px; color: var(--text-2); background: var(--bg-soft);
  border-top-left-radius: 6px; overflow-wrap: break-word;
}
.mega-row.user .mega-msg {
  background: var(--signal); color: #fff;
  border-radius: 16px; border-top-right-radius: 6px; white-space: pre-wrap;
}
.mega-msg p { margin: 0 0 8px; } .mega-msg p:last-child { margin-bottom: 0; }
.mega-msg ul { margin: 0; padding-left: 18px; } .mega-msg li { margin: 2px 0; }
.mega-msg a { color: var(--signal); text-decoration: underline; text-underline-offset: 2px; }
.mega-msg code { background: rgba(0,0,0,0.08); border-radius: 4px; padding: 1px 5px; font-size: 12px; }

.mega-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 36px; }
.mega-chip {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: var(--radius-pill); padding: 5px 11px; font-size: 12px; cursor: pointer;
  transition: border-color 150ms, color 150ms;
}
.mega-chip:hover { border-color: var(--signal); color: var(--signal); }

.mega-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.mega-form input {
  flex: 1; height: 38px; padding: 0 12px; font-size: 14px; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg);
}
.mega-form input:focus { outline: 2px solid var(--signal); outline-offset: -1px; }
.mega-form button {
  width: 38px; height: 38px; border: 0; border-radius: var(--radius-md); cursor: pointer;
  background: var(--signal); color: #fff; display: grid; place-items: center;
}
.mega-form button:disabled { opacity: 0.5; cursor: default; }
.mega-form button:hover:not(:disabled) { background: var(--signal-hover); }

.mega-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.mega-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); animation: mega-dot 1.2s ease-in-out infinite; }
.mega-dots i:nth-child(2) { animation-delay: 0.15s; } .mega-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes mega-dot { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.mega-eyes { animation: mega-blink 4.2s ease-in-out infinite; transform-origin: 32px 31px; }
.mega-antenna { animation: mega-pulse 2.4s ease-in-out infinite; }
@keyframes mega-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.08); } }
@keyframes mega-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .mega-panel, .mega-dots i, .mega-eyes, .mega-antenna { animation: none; }
  .mega-btn, .mega-btn:hover { transition: none; transform: none; }
}
