* {
  box-sizing: border-box;
}

:root {
  --ink: #18202f;
  --muted: #687386;
  --line: #dfe5ed;
  --paper: #ffffff;
  --page: #f6f1ea;
  --tomato: #d94b3d;
  --tomato-dark: #b93227;
  --leaf: #28735c;
  --gold: #d8a642;
  --shadow: 0 18px 45px rgba(24, 32, 47, 0.14);
  --soft-shadow: 0 10px 28px rgba(24, 32, 47, 0.09);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(217, 75, 61, 0.10), transparent 30%),
    linear-gradient(225deg, rgba(40, 115, 92, 0.12), transparent 34%),
    var(--page);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(24, 32, 47, 0.08);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--leaf);
  box-shadow: 0 0 0 6px rgba(40, 115, 92, 0.12);
}

.shell {
  width: 900px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 54px 0 72px;
}

.intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
  animation: rise-in 500ms ease both;
}

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

h1 {
  margin: 0;
  font-size: 64px;
  line-height: 0.94;
  max-width: 650px;
  letter-spacing: 0;
}

.lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.panel {
  padding: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(24, 32, 47, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--soft-shadow);
  animation: rise-in 600ms ease both;
}

.report-panel {
  animation-delay: 80ms;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.form-row {
  display: flex;
  gap: 10px;
  margin: 0;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(24, 32, 47, 0.03);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus {
  border-color: rgba(217, 75, 61, 0.7);
  box-shadow: 0 0 0 4px rgba(217, 75, 61, 0.12);
}

button {
  min-height: 48px;
  padding: 0 20px;
  font: inherit;
  font-weight: 800;
  border: 1px solid var(--tomato);
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--tomato), var(--tomato-dark));
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(217, 75, 61, 0.24);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(217, 75, 61, 0.30);
}

button:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.results-section {
  margin-top: 24px;
  animation: rise-in 700ms ease both;
}

#message {
  min-height: 28px;
  margin-bottom: 14px;
  color: var(--muted);
  font-weight: 800;
}

#report-message {
  min-height: 24px;
  margin-top: 12px;
  color: var(--leaf);
  font-weight: 700;
}

#results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.soup-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 22px;
  border: 1px solid rgba(24, 32, 47, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    var(--paper);
  box-shadow: var(--soft-shadow);
  animation: card-in 360ms ease both;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.soup-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--tomato), var(--gold), var(--leaf));
}

.soup-card:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 75, 61, 0.28);
  box-shadow: var(--shadow);
}

.soup-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.1;
  text-transform: capitalize;
}

.soup-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.empty-page {
  max-width: 720px;
  padding: 48px;
  border: 1px solid rgba(24, 32, 47, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  animation: rise-in 500ms ease both;
}

.error-card {
  position: relative;
  overflow: hidden;
  max-width: 760px;
  padding: 52px;
  border: 1px solid rgba(24, 32, 47, 0.08);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.86)),
    var(--paper);
  box-shadow: var(--shadow);
  animation: rise-in 500ms ease both;
}

.error-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--tomato), var(--gold));
}

.error-card h1 {
  margin-top: 0;
  font-size: 54px;
  overflow-wrap: anywhere;
}

.empty-page h1 {
  font-size: 54px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 24px;
  padding: 0 16px;
  border-radius: 8px;
  color: #ffffff;
  background: linear-gradient(180deg, var(--tomato), var(--tomato-dark));
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 22px rgba(217, 75, 61, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.back-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(217, 75, 61, 0.28);
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 60px;
    padding: 0 18px;
  }

  .shell {
    padding-top: 34px;
  }

  .intro {
    margin-bottom: 20px;
  }

  h1 {
    font-size: 42px;
  }

  .empty-page {
    padding: 28px;
  }

  .error-card {
    padding: 30px;
  }

  .empty-page h1 {
    font-size: 36px;
  }

  .error-card h1 {
    font-size: 36px;
  }

  .form-row {
    display: grid;
  }

  button {
    width: 100%;
  }
}
