:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1c1d1f;
  --muted: #5f6368;
  --line: #dedad1;
  --accent: #1f4e8c;
  --accent-ink: #ffffff;
  --user: #e9eef6;
  --focus: #f0b429;
  --radius: 10px;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141517;
    --surface: #1d1f22;
    --ink: #ecebe7;
    --muted: #a3a6ab;
    --line: #2f3236;
    --accent: #7fa8e0;
    --accent-ink: #0f1115;
    --user: #233044;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}

.shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 32px;
}

.eyebrow {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h1 {
  margin: 4px 0 8px;
  font-size: clamp(30px, 6vw, 40px);
  line-height: 1.1;
}

.lead { margin: 0 0 32px; color: var(--muted); max-width: 60ch; }

label { display: block; font-weight: 600; margin-bottom: 6px; }

.row, .ask { display: flex; gap: 8px; }

input, textarea {
  flex: 1;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}

textarea { resize: vertical; min-height: 48px; }

button {
  font: inherit;
  font-weight: 600;
  border: 0;
  border-radius: var(--radius);
  padding: 10px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

button:disabled { opacity: 0.55; cursor: progress; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.hint, .status, .foot { color: var(--muted); font-size: 14px; }
.status { min-height: 1.5em; margin: 8px 0 0; }

.log { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 12px; }

.msg { padding: 12px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.msg--user { background: var(--user); border-color: transparent; margin-left: 15%; }
.msg__who { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.msg__body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.suggestions button {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
  padding: 6px 12px;
  font-size: 14px;
}

.foot { margin-top: 48px; border-top: 1px solid var(--line); padding-top: 16px; }
code { font-size: 13px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (max-width: 480px) {
  .shell { padding-top: 28px; }
  .msg--user { margin-left: 0; }
  .row, .ask { flex-direction: column; }
}
