:root {
  --ink: #333333;
  --muted: #666666;
  --paper: #f8f8f8;
  --panel: #ffffff;
  --line: rgba(51, 51, 51, 0.12);
  --accent: #193a84;
  --accent-strong: #1d4296;
  --accent-light: #2abeeb;
  --soft-blue: #8f9cb5;
  --shadow: 0 18px 48px rgba(25, 58, 132, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Poppins, Helvetica, Arial, Verdana, sans-serif;
  background:
    linear-gradient(180deg, #ffffff 0, rgba(255, 255, 255, 0) 260px),
    repeating-linear-gradient(90deg, rgba(25, 58, 132, 0.035) 0 1px, transparent 1px 80px),
    var(--paper);
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0 28px;
  border-bottom: 1px solid var(--line);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-logo {
  width: clamp(130px, 22vw, 210px);
  height: auto;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(25, 58, 132, 0.1);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  color: var(--accent);
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 800;
  line-height: 1;
}

h2 {
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--muted);
}

.subtitle {
  max-width: 620px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.status {
  flex: 0 0 auto;
  margin: 0 0 8px;
  padding: 9px 14px;
  color: #ffffff;
  background: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.search-panel,
.answer-panel {
  margin-top: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 20px;
}

form {
  display: grid;
  gap: 12px;
}

label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

textarea,
button {
  width: 100%;
  border-radius: 0;
  font: inherit;
}

textarea {
  border: 2px solid var(--accent);
  color: var(--ink);
  background: #ffffff;
}

textarea {
  min-height: 118px;
  resize: vertical;
  padding: 16px;
  line-height: 1.45;
}

textarea:focus {
  outline: 3px solid rgba(42, 190, 235, 0.28);
  border-color: var(--accent-strong);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

button {
  border: 0;
  border-radius: 0;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

button:hover {
  background: var(--accent-strong);
}

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

#submit-button {
  width: auto;
  min-height: 44px;
  padding: 0 24px;
}

.answer-panel {
  padding: 22px;
}

.answer {
  margin-top: 16px;
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.answer.empty {
  color: var(--muted);
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 22px, 1040px);
    padding: 22px 0;
  }

  .hero,
  .brand-block,
  .controls {
    align-items: stretch;
    flex-direction: column;
  }

  #submit-button {
    width: 100%;
  }
}
