:root {
  --bg: #0e0f11;
  --fg: #ececec;
  --muted: #9aa0a6;
  --line: #26282c;
  --card: #17181b;
  --accent: #e8e6e1;
  --radius: 14px;
  --maxw: 640px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafaf8;
    --fg: #1a1a1a;
    --muted: #6b7075;
    --line: #e6e4df;
    --card: #ffffff;
    --accent: #1a1a1a;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 48px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* header */
.head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.name {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--fg);
  text-decoration: none;
}
.links { display: flex; gap: 18px; }
.links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: color .15s ease;
}
.links a:hover { color: var(--fg); }

/* hero */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0;
}
.q {
  font-weight: 600;
  font-size: clamp(24px, 5vw, 34px);
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  max-width: 18ch;
}

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s ease, transform .1s ease;
}
.chip:hover { border-color: var(--muted); }
.chip:active { transform: translateY(1px); }

/* ask input */
.ask {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  padding: 4px 4px 4px 16px;
}
.ask:focus-within { border-color: var(--muted); }
.ask__input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  padding: 10px 0;
  outline: none;
}
.ask__input::placeholder { color: var(--muted); }
.ask__btn {
  border: 0;
  background: var(--accent);
  color: var(--bg);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  flex: none;
  transition: opacity .15s ease;
}
.ask__btn:hover { opacity: .85; }

/* answer */
.answer {
  margin-top: 24px;
  font-size: 16px;
  color: var(--fg);
  white-space: pre-wrap;
  min-height: 1.5em;
}
.answer:empty { margin-top: 0; }
.answer .cursor {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  background: var(--muted);
  vertical-align: -0.15em;
  margin-left: 2px;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* footer */
.foot {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.disclaimer { color: var(--muted); font-size: 12.5px; margin: 0; max-width: 42ch; }
.mail { color: var(--muted); font-size: 13px; text-decoration: none; }
.mail:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .answer .cursor { animation: none; }
}
