:root {
  color-scheme: light;
  --bg: #f1ece4;
  --bg-deep: #e1eadf;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(16, 22, 27, 0.96);
  --text: #182028;
  --muted: #5f6470;
  --muted-soft: #8a909a;
  --accent: #106b58;
  --accent-strong: #0a5748;
  --accent-soft: #d9efe7;
  --border: rgba(24, 32, 40, 0.12);
  --border-strong: rgba(24, 32, 40, 0.18);
  --shadow: 0 22px 60px rgba(31, 35, 40, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 107, 87, 0.18), transparent 32%),
    radial-gradient(circle at right 20%, rgba(255, 186, 90, 0.14), transparent 24%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.75), transparent 28%),
    linear-gradient(135deg, var(--bg) 0%, #efe6d8 52%, var(--bg-deep) 100%);
}

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

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.7fr);
  gap: 20px;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

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

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 0.96;
}

.lede {
  margin: 16px 0 0;
  max-width: 56ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
}

.hero-meta {
  display: grid;
  gap: 12px;
  align-content: center;
}

.meta-pill {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(16, 107, 88, 0.12);
  background: linear-gradient(180deg, rgba(217, 239, 231, 0.88), rgba(255, 255, 255, 0.92));
}

.meta-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-soft);
}

.meta-value {
  font-weight: 700;
}

.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.row {
  display: flex;
  gap: 12px;
}

input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  cursor: pointer;
}

button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.status {
  min-height: 1.5rem;
  margin: 16px 0 0;
  color: var(--muted);
}

.result-shell {
  margin-top: 18px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(16, 22, 27, 0.08);
  background: var(--panel-strong);
  color: #f3f6f8;
  box-shadow: 0 24px 54px rgba(15, 18, 20, 0.24);
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.result-eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: #a4b4b0;
}

.result-header h2 {
  margin: 0;
  font-size: 1.4rem;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(217, 239, 231, 0.14);
  border: 1px solid rgba(217, 239, 231, 0.22);
  color: #d9efe7;
  font-weight: 700;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.summary-tile {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-label {
  display: block;
  margin-bottom: 8px;
  color: #a4b4b0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.summary-value {
  display: block;
  font-size: 1rem;
  line-height: 1.4;
  word-break: break-word;
}

.summary-empty {
  margin: 0;
  color: #c2cbc8;
}

.result-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.detail-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-key {
  color: #a4b4b0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  word-break: break-word;
}

.detail-value {
  color: #f3f6f8;
  word-break: break-word;
}

.result-json {
  margin: 18px 0 0;
  padding: 18px;
  overflow: auto;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  color: #f3f6f8;
  font-size: 0.92rem;
  line-height: 1.5;
}

.result-json:empty {
  display: none;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 20px, 960px);
    padding-top: 24px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

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

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

  .detail-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
