:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f6fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
}

main {
  width: min(900px, calc(100% - 32px));
  margin: 48px auto;
}

header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #5d6677;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.6rem);
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.search-row {
  display: flex;
  gap: 8px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid #bec7d7;
  border-radius: 8px;
  padding: 14px 16px;
  font: inherit;
  background: white;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  color: white;
  background: #183d78;
  cursor: pointer;
}

#status {
  min-height: 24px;
  color: #5d6677;
}

#answer {
  margin-top: 16px;
}

.reference {
  border: 1px solid #d7deea;
  border-radius: 10px;
  padding: 16px;
  margin: 12px 0;
  background: white;
}

.reference-meta {
  color: #5d6677;
  font-size: 0.9rem;
  font-weight: 700;
}

.reference-content {
  line-height: 1.55;
  white-space: pre-wrap;
}

.reference-link {
  color: #183d78;
  font-weight: 800;
}

.document-list {
  columns: 2;
  gap: 32px;
  line-height: 1.8;
  padding-left: 20px;
}

.document-list li {
  break-inside: avoid;
}

@media (max-width: 560px) {
  main { margin-top: 24px; }
  .search-row { flex-direction: column; }
  button { width: 100%; }
  .document-list { columns: 1; }
}
