﻿:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #17202a;
  background: #f4f6f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

.page {
  width: min(850px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.hero {
  margin-bottom: 36px;
}

.brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(36px, 7vw, 58px);
  line-height: 1.05;
  margin: 18px 0;
}

.hero p {
  font-size: 20px;
  line-height: 1.55;
  max-width: 680px;
  color: #4c5967;
}

.chat-card {
  background: white;
  border-radius: 18px;
  padding: 30px;
  box-shadow:
    0 10px 35px rgba(0, 0, 0, .07);
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 650;
  font-size: 18px;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 140px;
  padding: 16px;
  border: 1px solid #cad1d8;
  border-radius: 10px;
  font: inherit;
  font-size: 17px;
  line-height: 1.5;
}

textarea:focus {
  outline: 2px solid #1e5c91;
  outline-offset: 1px;
}

.controls {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

select,
button {
  font: inherit;
  border-radius: 9px;
  padding: 11px 15px;
}

select {
  background: white;
  border: 1px solid #cad1d8;
}

button {
  border: 0;
  background: #17202a;
  color: white;
  cursor: pointer;
  font-weight: 650;
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

.status {
  margin-top: 24px;
  padding: 14px;
  background: #fff2f2;
  border-radius: 8px;
}

.result {
  margin-top: 32px;
  border-top: 1px solid #e4e8ec;
  padding-top: 26px;
}

.answer {
  white-space: pre-wrap;
  line-height: 1.7;
  font-size: 17px;
}

.sources {
  margin-top: 28px;
}

.sources h2 {
  font-size: 16px;
  margin-bottom: 12px;
}

.source-item {
  padding: 10px 0;
  border-top: 1px solid #edf0f2;
}

.source-item a {
  color: #155f9b;
  font-weight: 600;
}

.source-location {
  margin-top: 4px;
  font-size: 14px;
  color: #687582;
}

footer {
  margin-top: 34px;
  color: #687582;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .page {
    padding-top: 34px;
  }

  .chat-card {
    padding: 20px;
  }

  .controls {
    flex-direction: column;
  }

  button,
  select {
    width: 100%;
  }
}

.example-section {
  margin-top: 18px;
}

.example-label {
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 650;
  color: #687582;
}

.example-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.example-question {
  display: inline-flex;
  align-items: center;
  width: auto;
  background: #eef3f7;
  color: #24313c;
  border: 1px solid #d9e0e6;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1.2;
  padding: 9px 13px;
  white-space: nowrap;
}

.example-question:hover {
  background: #e4ebf1;
}

@media (max-width: 600px) {
  .example-questions {
    flex-direction: column;
    align-items: stretch;
  }

  .example-question {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }
}

.coverage-status {
  display: inline-block;
  margin-bottom: 18px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.coverage-full {
  background: #eaf6ee;
  color: #23643a;
}

.coverage-partial {
  background: #fff5dc;
  color: #755717;
}

.coverage-none {
  background: #f5ecec;
  color: #7a3232;
}


.chat-card {
  border: 1px solid #e3e8ec;
}

#submit-button {
  min-width: 180px;
  transition:
    transform .15s ease,
    box-shadow .15s ease;
}

#submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .12);
}

.answer strong {
  font-weight: 750;
}

.sources {
  padding-top: 6px;
}

.topics {
  margin-bottom: 30px;
}

.topic-label {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #4c5967;
}

.topic-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(135px, 1fr));
  gap: 10px;
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 115px;
  padding: 14px;
  background: #f8fafb;
  color: #17202a;
  border: 1px solid #e0e6eb;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform .15s ease,
    border-color .15s ease,
    box-shadow .15s ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: #b8c5cf;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.topic-icon {
  font-size: 22px;
  margin-bottom: 9px;
}

.topic-title {
  font-size: 15px;
  font-weight: 750;
}

.topic-description {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: #687582;
}

@media (max-width: 600px) {
  .topic-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }
}

.feedback-section {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e4e8ec;
}

.feedback-label {
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 650;
  color: #4c5967;
}

.feedback-buttons {
  display: flex;
  gap: 8px;
}

.feedback-button {
  width: 46px;
  height: 40px;
  padding: 0;
  border: 1px solid #d9e0e6;
  background: #f8fafb;
  color: #17202a;
  font-size: 18px;
}

.feedback-button:hover {
  background: #eef3f7;
}

.feedback-button.selected {
  border-color: #7c8e9d;
  background: #e7edf2;
}

.feedback-message {
  margin-top: 10px;
  font-size: 13px;
  color: #687582;
}

#turnstile-widget {
  margin-top: 18px;
  margin-bottom: 14px;
  display: flex;
  justify-content: flex-start;
}

#turnstile-widget iframe {
  max-width: 100%;
}

@media (min-width: 700px) {
  #turnstile-widget {
    justify-content: flex-end;
  }
}

.controls-row {
  margin-top: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.controls-row #turnstile-widget {
  margin: 0;
}

.controls-row .controls {
  margin-top: 0;
  margin-left: auto;
}

#turnstile-widget iframe {
  max-width: 100%;
}

@media (max-width: 700px) {
  .controls-row {
    flex-direction: column;
    align-items: stretch;
  }

  .controls-row .controls {
    width: 100%;
    margin-left: 0;
  }

  .controls-row #turnstile-widget {
    display: flex;
    justify-content: flex-start;
  }
}
