:root {
  --red: #e30613; --red-d: #b9000f; --red-soft: #fff1f2; --red-line: #ffd0d4;
  --ink: #161616; --muted: #6b6b6b; --line: #ececec; --bg: #ffffff;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 100% -10%, #ffe1e3 0%, transparent 60%),
    radial-gradient(700px 420px at -10% 110%, #ffecec 0%, transparent 60%), #ffffff;
}
.page { min-height: 100%; display: flex; flex-direction: column; padding: 20px 16px 24px; }
header.top { max-width: 720px; width: 100%; margin: 0 auto 16px; }
.brand { display: inline-block; line-height: 0; }
.brand img { height: 46px; width: auto; display: block; }
main { flex: 1; display: flex; justify-content: center; align-items: flex-start; }
footer { text-align: center; color: #a0a0a0; font-size: 12px; margin-top: 18px; }

.card { width: 100%; max-width: 720px; background: #fff; border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 18px 50px rgba(227, 6, 19, .08); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--red); z-index: 2; }

/* ---------- chat (page 1) ---------- */
.chat { display: flex; flex-direction: column; height: min(78vh, 720px); min-height: 520px; }
.chat-head { padding: 22px 24px 12px; border-bottom: 1px solid var(--line); }
.chat-head .t { font-weight: 800; font-size: 17px; }
.chat-head .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bar { height: 5px; border-radius: 99px; background: #f1e3e4; margin-top: 12px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--red); border-radius: 99px; transition: width .4s ease; }
.thread { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: 12px 16px; border-radius: 18px; line-height: 1.5; font-size: 15.5px; white-space: pre-wrap; word-wrap: break-word; }
.msg.bot { background: #f6f6f7; border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--red); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg.new { animation: rise .35s cubic-bezier(.2, .8, .2, 1) both; }
.typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #b5b5b9; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.undo { align-self: flex-end; background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; cursor: pointer; text-decoration: underline; padding: 0 4px; }
.undo:hover { color: var(--red); }

.composer { border-top: 1px solid var(--line); padding: 14px 24px 18px; background: #fff; }
.composer:empty { display: none; }
.cfield { display: flex; gap: 10px; align-items: flex-end; }
.cfield input, .cfield textarea, .other {
  flex: 1; width: 100%; padding: 13px 15px; font: inherit; font-size: 16px; color: var(--ink);
  background: #fff; border: 1.5px solid #e4e4e4; border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.cfield textarea { min-height: 76px; max-height: 160px; resize: vertical; line-height: 1.45; }
input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(227, 6, 19, .12); }
.send { flex: none; height: 48px; padding: 0 22px; border-radius: 14px; border: 0; background: var(--red); color: #fff; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 8px 18px rgba(227, 6, 19, .25); transition: background .15s, transform .12s; }
.send:hover { background: var(--red-d); } .send:active { transform: scale(.97); }
.send:disabled { opacity: .55; cursor: not-allowed; }
.note { font-size: 12.5px; color: #8a8a8a; margin-top: 10px; line-height: 1.5; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-size: 13.5px; color: #444; line-height: 1.45; cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--red); flex: none; }
.error { color: var(--red-d); font-size: 13.5px; margin-top: 10px; min-height: 18px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; max-height: 190px; overflow-y: auto; }
.chip { padding: 10px 15px; border: 1.5px solid #e4e4e4; border-radius: 99px; background: #fff; color: var(--ink); font: inherit; font-size: 14.5px; cursor: pointer; transition: all .15s; user-select: none; }
.chip:hover { border-color: var(--red); }
.chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.chip.on::before { content: "\2713\00a0"; }
.starters { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ex { padding: 7px 11px; border-radius: 10px; background: var(--red-soft); color: var(--red-d); border: 1px solid var(--red-line); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.ex:hover { background: #ffe3e6; }
.other { margin-bottom: 12px; display: none; }

/* ---------- result (page 2) ---------- */
.result { padding: 30px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; font-weight: 800; font-size: 13px; letter-spacing: .02em; margin-bottom: 14px; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.b-proven, .b-product { background: var(--red); color: #fff; }
.b-adjacent { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.b-capability, .b-explore { background: var(--ink); color: #fff; }
.b-team { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
p.sub { color: var(--muted); margin: 0 0 6px; line-height: 1.55; font-size: 15.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.tag { background: var(--red-soft); color: var(--red-d); border: 1px solid var(--red-line); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; }
.section { margin-top: 24px; animation: rise .5s both; animation-delay: calc(var(--i, 0) * .08s); }
.label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: 8px; font-weight: 700; }
.quote { background: #fafafa; border-left: 4px solid var(--red); padding: 12px 16px; border-radius: 10px; white-space: pre-wrap; line-height: 1.55; margin-bottom: 8px; }
.solution { background: var(--red-soft); border: 1px solid var(--red-line); border-radius: 14px; padding: 16px 18px; line-height: 1.6; font-weight: 500; }
.callout { border: 1.5px dashed #d9d9d9; border-radius: 14px; padding: 14px 16px; line-height: 1.55; color: #444; font-size: 14.5px; margin-top: 10px; }
.callout b { color: var(--ink); }
ul.caps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: c; }
ul.caps li { counter-increment: c; display: flex; gap: 14px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; }
ul.caps li::before { content: counter(c); flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-weight: 800; display: grid; place-items: center; }
ul.caps li b { display: block; margin-bottom: 2px; }
ul.caps li span { color: var(--muted); font-size: 14.5px; line-height: 1.45; }
ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
ol.steps li { counter-increment: s; position: relative; padding-left: 40px; line-height: 1.5; }
ol.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; }
ol.steps li b { display: block; } ol.steps li span { color: var(--muted); font-size: 14.5px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 30px; }
.btn { padding: 13px 24px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(227, 6, 19, .28); }
.btn.primary:hover { background: var(--red-d); }
.btn.ghost { background: #fff; color: var(--muted); border: 1.5px solid #e4e4e4; }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }

@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (max-width: 560px) {
  .brand img { height: 38px; }
  .chat-head, .thread, .composer { padding-left: 16px; padding-right: 16px; }
  .msg { max-width: 92%; } .result { padding: 22px 18px; } h1 { font-size: 22px; }
  .chat { height: calc(100vh - 150px); min-height: 480px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }