/* Departure-board aesthetic: near-black, amber accents, mono flight data.
   No external fonts, no framework — system stacks only. */

:root {
  --bg: #101210;
  --surface: #191c19;
  --surface-2: #22261f;
  --ink: #e8e6df;
  --muted: #9a978c;
  --amber: #f5b942;
  --green: #7fbf7f;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  height: 100dvh;
}

header {
  padding: 1rem 1.25rem 0.5rem;
  border-bottom: 1px solid #2b2f28;
}
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}
.accent { color: var(--amber); }
.tagline {
  margin: 0.1rem 0 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-family: var(--mono);
  text-transform: lowercase;
}

main {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  max-width: 46rem;
  width: 100%;
  margin: 0 auto;
}

#intro p { color: var(--muted); max-width: 34rem; }
#samples { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
.sample {
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid #2b2f28;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
}
.sample:hover { border-color: var(--amber); }

.msg { margin: 0.9rem 0; max-width: 100%; }
.msg.user {
  background: var(--surface-2);
  border-radius: 10px 10px 2px 10px;
  padding: 0.6rem 0.9rem;
  margin-left: 3rem;
  white-space: pre-wrap;
}
.msg.bot { padding: 0 0.1rem; }
.msg.bot code, .msg.bot .flight {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.05em 0.3em;
  border-radius: 4px;
  color: var(--amber);
}
.msg.bot strong { color: var(--green); }
.msg.bot ul { padding-left: 1.2rem; margin: 0.4rem 0; }
.msg.bot li { margin: 0.35rem 0; }
.msg.error { color: #e08a8a; font-family: var(--mono); font-size: 0.85rem; }

.activity {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.4rem 0;
}
.activity::before { content: "⌁ "; color: var(--amber); }

.thinking { color: var(--muted); font-family: var(--mono); font-size: 0.85rem; }
.thinking::after {
  content: "…";
  animation: blink 1.2s steps(4) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

#composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem calc(0.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid #2b2f28;
  max-width: 46rem;
  width: 100%;
  margin: 0 auto;
}
#input {
  flex: 1;
  resize: none;
  background: var(--surface);
  border: 1px solid #2b2f28;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 0.55rem 0.8rem;
  max-height: 8rem;
}
#input:focus { outline: none; border-color: var(--amber); }
#send {
  background: var(--amber);
  color: #1c1a12;
  border: none;
  border-radius: 8px;
  width: 2.7rem;
  font-size: 1rem;
  cursor: pointer;
}
#send:disabled { opacity: 0.4; cursor: default; }

#gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
#gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(18rem, 80vw);
  text-align: center;
}
#gate-form h2 { font-family: var(--serif); margin: 0 0 0.5rem; }
#gate-input {
  background: var(--surface);
  border: 1px solid #2b2f28;
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 0.55rem 0.8rem;
  text-align: center;
}
#gate-input:focus { outline: none; border-color: var(--amber); }
#gate-form button {
  background: var(--amber);
  color: #1c1a12;
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  font: inherit;
  cursor: pointer;
}
#gate-error { color: #e08a8a; font-family: var(--mono); font-size: 0.8rem; min-height: 1em; margin: 0; }
