:root {
  --slate: #2c3e50;
  --teal: #52b5a4;
  --teal-dark: #3d9787;
  --ink: #1f2a36;
  --muted: #5d6b79;
  --line: #e3e8ec;
  --bg: #f6f8f9;
  --card: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: Montserrat, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--teal-dark); }

.top {
  background: var(--slate);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
}
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 48px; width: auto; }
@media (max-width: 560px) { .brand img { height: 38px; } }
.spark {
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.45); padding: 7px 14px; border-radius: 999px;
}
.spark:hover { background: rgba(255,255,255,.1); }

main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 28px 18px 18px; }

.foot { max-width: 760px; margin: 0 auto; padding: 10px 18px 26px; color: var(--muted); font-size: 12.5px; }
.foot a { color: var(--muted); }

/* Embedded on engage3p.com: no header or footer, transparent edges */
body.embed { background: transparent; min-height: 0; }
body.embed .top, body.embed .foot { display: none; }
body.embed main { padding-top: 8px; }

/* Landing */
.intro h1 { font-size: 28px; line-height: 1.2; margin: 6px 0 10px; color: var(--slate); }
.intro p { color: var(--muted); margin: 0 0 22px; }
.grid { display: grid; gap: 14px; }
.tile {
  display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; text-decoration: none; color: var(--ink); border-left: 4px solid var(--teal);
}
.tile:hover { border-color: var(--teal); }
.tile h2 { margin: 0 0 6px; font-size: 18px; color: var(--slate); }
.tile p { margin: 0; color: var(--muted); font-size: 15px; }

/* Chat */
.tool-head h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; color: var(--slate); }
.tool-head p { margin: 0 0 20px; color: var(--muted); font-size: 15px; }

.thread { display: flex; flex-direction: column; gap: 14px; }

.msg { scroll-margin-bottom: 120px; max-width: 92%; padding: 13px 16px; border-radius: var(--radius); }
.msg p { margin: 0 0 10px; }
.msg p:last-child { margin-bottom: 0; }
.msg h3 { font-size: 15px; letter-spacing: .4px; margin: 14px 0 8px; color: var(--slate); }
.msg h3:first-child { margin-top: 0; }
.bot { background: var(--card); border: 1px solid var(--line); align-self: flex-start; }
.me { background: var(--slate); color: #fff; align-self: flex-end; }
.me a { color: #cdeee8; }

.typing { display: inline-flex; gap: 5px; padding: 16px; }
.typing i { width: 7px; height: 7px; background: var(--teal); border-radius: 50%; opacity: .35; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: 1; } }

.starters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.starters button {
  font: inherit; font-size: 14px; background: #fff; color: var(--slate); cursor: pointer;
  border: 1px solid var(--teal); border-radius: 999px; padding: 8px 14px; text-align: left;
}
.starters button:hover { background: #eef8f6; }

.composer { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding-top: 18px; margin-top: 10px; }
body.embed .composer { background: transparent; }
.composer form { display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.composer textarea {
  flex: 1; font: inherit; border: 0; resize: none; outline: none; padding: 8px; min-height: 44px; max-height: 180px; background: transparent;
}
.btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 10px 18px; cursor: pointer;
  background: var(--teal); color: #fff;
}
.btn:hover { background: var(--teal-dark); }
.btn:disabled { opacity: .5; cursor: default; }

.capture {
  scroll-margin-bottom: 40px;
  background: var(--card); border: 1px solid var(--teal); border-radius: var(--radius); padding: 18px 20px; align-self: stretch;
}
.capture h2 { margin: 0 0 4px; font-size: 18px; color: var(--slate); }
.capture p { margin: 0 0 14px; color: var(--muted); font-size: 14.5px; }
.capture .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.capture label { display: block; font-size: 13px; font-weight: 600; color: var(--slate); margin-bottom: 10px; }
.capture input {
  display: block; width: 100%; margin-top: 4px; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
}
.capture input:focus { outline: 2px solid var(--teal); border-color: transparent; }
.capture .hp { position: absolute; left: -9999px; }
.capture .actions { display: flex; align-items: center; gap: 16px; margin-top: 6px; flex-wrap: wrap; }
.linkish { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13.5px; text-decoration: underline; cursor: pointer; padding: 0; }

.error { color: #9b2c2c; font-size: 14px; }

@media (max-width: 560px) {
  .capture .row { grid-template-columns: 1fr; }
  .tool-head h1 { font-size: 21px; }
  .msg { max-width: 100%; }
}

/* Compact grid embedded on engage3p.com */
body.embed main { max-width: none; padding: 0; }
.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mini-card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-top: 5px solid var(--slate); border-radius: var(--radius); padding: 26px 30px;
  text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s;
}
.mini-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(44,62,80,.12); }
.mini-card.people { border-top-color: #52b5a4; }
.mini-card.process { border-top-color: #8ba05a; }
.mini-card.platform { border-top-color: #d2691e; }
.mini-tag { font-size: 13px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); }
.mini-card h2 { font-size: 23px; font-weight: 600; line-height: 1.3; margin: 10px 0 10px; color: var(--slate); }
.mini-card p { margin: 0 0 18px; font-size: 17px; line-height: 1.5; color: var(--muted); flex: 1; }
.mini-go { font-size: 16px; font-weight: 600; color: var(--teal-dark); }
@media (max-width: 640px) { .mini { grid-template-columns: 1fr; gap: 16px; } .mini-card { padding: 20px 22px; } .mini-card h2 { font-size: 20px; } .mini-card p { font-size: 16px; } }
