:root {
  color: #172033;
  background: #f5f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page-shell {
  width: min(100% - 2rem, 760px);
  margin: 0 auto;
  padding: 4rem 0 5rem;
}

.hero {
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: #3155a6;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.6rem;
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  letter-spacing: -0.04em;
}

h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

h3 {
  margin: 2rem 0 0.75rem;
  font-size: 1rem;
}

.intro,
.hint {
  color: #5d687b;
}

.intro {
  max-width: 62ch;
  margin-bottom: 0;
}

.public-data-disclaimer {
  margin-top: 1.25rem;
  border-left: 3px solid #91a8dc;
  padding: 0.75rem 1rem;
  background: #eaf0ff;
  color: #3f4c61;
  font-size: 0.9rem;
}

.ask-card,
.about-card,
.result {
  border: 1px solid #dce2ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgb(27 43 78 / 0.06);
}

.ask-card {
  padding: 1.5rem;
}

.about-card {
  margin-top: 1.25rem;
  padding: 1.5rem;
}

.about-card ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.language-selector {
  margin: 0 0 1rem;
  border: 0;
  padding: 0;
}

.language-selector legend {
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.language-options {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid #b8c2d4;
  border-radius: 8px;
}

.language-options input {
  position: absolute;
  opacity: 0;
}

.language-options label {
  margin: 0;
  padding: 0.45rem 0.75rem;
  color: #3f4c61;
  cursor: pointer;
  font-weight: 600;
}

.language-options input + label + input + label {
  border-left: 1px solid #b8c2d4;
}

.language-options input:checked + label {
  background: #3155a6;
  color: #ffffff;
}

.language-options input:focus-visible + label {
  outline: 3px solid rgb(49 85 166 / 0.25);
  outline-offset: -3px;
}

textarea {
  display: block;
  width: 100%;
  resize: vertical;
  border: 1px solid #b8c2d4;
  border-radius: 8px;
  padding: 0.8rem;
  color: inherit;
  font: inherit;
}

textarea:focus {
  border-color: #3155a6;
  outline: 3px solid rgb(49 85 166 / 0.18);
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
}

.hint {
  margin: 0;
  font-size: 0.9rem;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  background: #3155a6;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

button:hover:not(:disabled) {
  background: #243f7b;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.result {
  margin-top: 1.25rem;
  padding: 1.5rem;
}

.result-status {
  margin-bottom: 1rem;
  color: #3155a6;
  font-weight: 700;
}

.answer-text {
  font-size: 1.05rem;
}

.citations {
  display: grid;
  gap: 0.75rem;
}

.citation {
  border-left: 3px solid #91a8dc;
  padding: 0.85rem 1rem;
  background: #f5f7fb;
}

.citation-title {
  display: inline-block;
  margin-bottom: 0.45rem;
  color: #243f7b;
  font-weight: 700;
}

.citation-title:not(a) {
  color: #26334c;
}

blockquote {
  margin: 0;
  color: #3f4c61;
}

@media (max-width: 560px) {
  .page-shell {
    padding-top: 2rem;
  }

  .form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
