:root {
  --bg: #f7f3ec;
  --ink: #1d1b17;
  --muted: #6b655c;
  --line: #e2dbcf;
  --card: #fffdf9;
  --accent: #1d1b17;
  --you: #efe8db;
  --max: 680px;
  font-size: 17px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.sr { position: absolute; left: -9999px; }

.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px 16px 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.tag { color: var(--muted); font-size: .9rem; }

main { max-width: var(--max); margin: 0 auto; padding: 0 16px 48px; }

.hero { padding: 40px 0 20px; }
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 5.2vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -.01em;
}
.sub { font-size: 1.05rem; margin: 0; color: #2c2a25; }

.chat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 0 8px;
  margin: 24px 0 44px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03);
}
.thread { padding: 6px 18px 4px; }
.msg { padding: 10px 0; }
.msg + .msg { border-top: 1px solid var(--line); }
.who { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user .text { color: #2c2a25; }
.msg.thinking .text::after {
  content: "";
  display: inline-block;
  width: 1.4em;
  text-align: left;
  animation: dots 1.4s steps(4, end) infinite;
}
.msg.streaming .text::after {
  content: "\258D";
  display: inline-block;
  margin-left: 1px;
  color: var(--muted);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
.composer.ended textarea { color: var(--muted); }
.note a { text-decoration: underline; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 4px 18px;
  border-top: 1px solid var(--line);
}
.composer textarea {
  flex: 1;
  resize: none;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: inherit;
  line-height: 1.5;
  padding: 8px 0;
  max-height: 200px;
}
.composer textarea::placeholder { color: #9a9385; }
.composer button {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--accent);
  color: #f4efe6;
  display: grid; place-items: center;
  cursor: pointer;
}
.composer button:disabled { opacity: .35; cursor: default; }
.note { margin: 0; padding: 0 18px 6px; font-size: .85rem; color: var(--muted); min-height: 1.2em; }

.how, .faq { padding: 8px 0 24px; }
h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.45rem; margin: 0 0 12px; }
h3 { font-size: 1rem; font-weight: 600; margin: 22px 0 4px; }
.how p, .faq p { margin: 0 0 14px; }
.risk {
  margin-top: 20px !important;
  padding: 14px 18px;
  border-left: 3px solid var(--ink);
  background: var(--you);
  border-radius: 0 10px 10px 0;
}

footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px 40px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .85rem;
}
