:root {
  --bg: #f1ede2;
  --ink: #171717;
  --muted: #655f54;
  --panel: rgba(255, 251, 242, 0.78);
  --line: rgba(23, 23, 23, 0.12);
  --accent: #b6482f;
  --accent-2: #164d63;
  --shadow: 0 28px 70px rgba(24, 20, 14, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(182, 72, 47, 0.22), transparent 32%),
    radial-gradient(circle at top right, rgba(22, 77, 99, 0.18), transparent 26%),
    linear-gradient(180deg, #fbf5ea 0%, #efe7d8 100%);
}

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

.hero,
.panel {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 24px;
  padding: 28px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent-2);
}

h1,
h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.95;
  max-width: 12ch;
}

.lead {
  margin: 20px 0 0;
  max-width: 62ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

.hero-note {
  align-self: end;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(255, 244, 225, 0.8));
  border: 1px solid rgba(23, 23, 23, 0.08);
}

.hero-note p {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

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

.chip {
  border: 1px solid rgba(23, 23, 23, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.chip:hover {
  transform: translateY(-1px);
  border-color: rgba(182, 72, 47, 0.32);
  background: rgba(255, 248, 240, 0.94);
}

.panel {
  padding: 24px;
}

.query-form {
  display: grid;
  gap: 10px;
}

.label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(23, 23, 23, 0.12);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 16px 18px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

input:focus {
  border-color: rgba(22, 77, 99, 0.45);
  box-shadow: 0 0 0 4px rgba(22, 77, 99, 0.08);
}

button[type="submit"] {
  border: none;
  border-radius: 18px;
  padding: 0 22px;
  min-height: 56px;
  background: linear-gradient(135deg, var(--accent), #cf7a32);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

.status-row {
  margin-top: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(22, 77, 99, 0.08);
  color: var(--accent-2);
  font-size: 14px;
}

.result-card {
  margin-top: 18px;
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 23, 23, 0.08);
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 14px;
}

.result-head span {
  color: var(--muted);
  font-size: 14px;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 15px;
  line-height: 1.6;
  color: #24221e;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
}

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

  .hero,
  .panel {
    border-radius: 22px;
    padding: 18px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button[type="submit"] {
    width: 100%;
  }

  .result-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
