:root {
  --bg: #f5f0e6;
  --bg-soft: #fbf7f1;
  --paper: rgba(255, 252, 247, 0.84);
  --text: #21332c;
  --muted: #627269;
  --line: rgba(33, 51, 44, 0.12);
  --accent: #2d7a59;
  --accent-soft: #d9eadf;
  --clay: #c96f4a;
  --shadow: 0 24px 60px rgba(58, 43, 24, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(201, 111, 74, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(45, 122, 89, 0.18), transparent 32%),
    linear-gradient(180deg, #f7f1e5 0%, #efe5d5 100%);
}

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

.hero,
.table-panel,
.metric-card {
  background: var(--paper);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.hero {
  padding: 40px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
  animation: rise-in 700ms ease-out both;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -35% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(45, 122, 89, 0.16), transparent 68%);
  pointer-events: none;
}

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

h1,
h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  line-height: 0.95;
  max-width: 10ch;
}

h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.lede {
  max-width: 58ch;
  margin: 18px 0 0;
  font-size: 1.03rem;
  line-height: 1.65;
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.metric-card {
  padding: 22px 20px;
  border-radius: 22px;
  animation: rise-in 800ms ease-out both;
}

.metric-card:nth-child(2) {
  animation-delay: 70ms;
}

.metric-card:nth-child(3) {
  animation-delay: 140ms;
}

.metric-card:nth-child(4) {
  animation-delay: 210ms;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 10px;
}

.metric-card strong {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.table-panel {
  border-radius: 28px;
  padding: 24px;
  animation: rise-in 950ms ease-out both;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f0e7d7;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4c5d54;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.62);
}

tbody tr:hover {
  background: rgba(217, 234, 223, 0.46);
}

.loading-cell,
.error-cell {
  text-align: center;
  padding: 28px;
  color: var(--muted);
}

.mobile-only {
  display: none;
}

.mobile-cards {
  gap: 14px;
}

.response-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}

.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.card-id,
.card-profile {
  margin: 0;
}

.card-id {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.response-card h3 {
  margin: 6px 0 4px;
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  line-height: 1;
}

.card-profile {
  color: var(--muted);
  line-height: 1.4;
}

.card-age {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 10px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}

.card-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.card-meta div {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.card-meta dt {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-meta dd {
  margin: 0;
  font-weight: 600;
}

.card-copy {
  display: grid;
  gap: 10px;
}

.card-copy p {
  margin: 0;
  line-height: 1.55;
}

.loading-card,
.error-card {
  text-align: center;
  color: var(--muted);
}

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

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

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 20px, 1280px);
    padding-top: 20px;
  }

  .hero,
  .table-panel {
    padding: 20px;
    border-radius: 24px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: grid;
  }

  .table-panel {
    padding: 18px;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 24px 20px;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 3.6rem);
  }

  .lede {
    font-size: 0.98rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .card-head {
    flex-direction: column;
  }

  .card-age {
    min-width: 0;
  }

  .card-meta {
    grid-template-columns: 1fr;
  }
}
