@import url('https://unpkg.com/modern-css-reset/dist/reset.min.css');

:root {
  --bg: #f2e8cf; /* parchment */
  --bg-overlay: radial-gradient(circle at 20% 20%, rgba(56, 102, 65, 0.08), rgba(188, 71, 73, 0.06));
  --panel: #fff9f0;
  --border: rgba(56, 102, 65, 0.14); /* hunter green tint */
  --text: #2b332f;
  --muted: #6f7a73;
  --accent: #bc4749; /* bittersweet shimmer */
  --accent-2: #a7c957; /* yellow green */
  --shadow: 0 18px 48px rgba(38, 56, 44, 0.2);
  --radius: 16px;
  font-family: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
}

body {
  min-height: 100vh;
  background: var(--bg);
  background-image: var(--bg-overlay),
    radial-gradient(circle at 10% 12%, rgba(167, 201, 87, 0.12), transparent 18%),
    radial-gradient(circle at 80% 20%, rgba(188, 71, 73, 0.12), transparent 22%),
    radial-gradient(circle at 44% 70%, rgba(56, 102, 65, 0.12), transparent 28%);
  background-attachment: fixed;
  color: var(--text);
  letter-spacing: 0.01em;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
  margin-bottom: 32px;
}

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

h1 {
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  margin: 0 0 12px;
}

h2 {
  font-size: 24px;
  margin: 0 0 8px;
}

h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.lede {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badges span {
  background: rgba(167, 201, 87, 0.18);
  color: #2b332f;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(167, 201, 87, 0.4);
  font-size: 12px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  box-shadow: var(--shadow);
}

.highlight {
  border: 1px solid rgba(56, 102, 65, 0.3);
}

.card-head {
  margin-bottom: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

input,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

input:focus,
textarea:focus {
  border-color: rgba(188, 71, 73, 0.5);
  background: #fffdfa;
}

textarea {
  resize: vertical;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 15px;
}

.primary {
  background: linear-gradient(120deg, #d25d5d, var(--accent));
  color: #fffdf5;
  box-shadow: 0 10px 24px rgba(188, 71, 73, 0.26);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.full {
  width: 100%;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(167, 201, 87, 0.3);
  background: rgba(167, 201, 87, 0.12);
  color: #2b332f;
  font-weight: 500;
}

.chip input {
  width: 16px;
  height: 16px;
}

.slider {
  gap: 10px;
}

.slider-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
}

input[type='range'] {
  accent-color: var(--accent-2);
}

.info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  line-height: 1;
  cursor: help;
  position: relative;
}

.info::after {
  content: attr(data-tip);
  position: absolute;
  left: 110%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #f5f7f4;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.info:hover::after,
.info:focus-visible::after {
  opacity: 1;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.hero-art {
  background: linear-gradient(180deg, rgba(167, 201, 87, 0.14), rgba(56, 102, 65, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-art::before,
.hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.7) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-art::after {
  background-size: 26px 26px;
  opacity: 0.25;
  transform: translateY(4px);
}

.tree-illustration {
  width: 100%;
  max-width: 340px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.code {
  font-size: 28px;
  letter-spacing: 0.14em;
}

.token {
  word-break: break-all;
  font-family: 'Space Grotesk', monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed var(--border);
}

.result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(167, 201, 87, 0.12);
  border: 1px solid rgba(167, 201, 87, 0.32);
}

.hidden {
  display: none;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.status {
  min-height: 24px;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.list-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(167, 201, 87, 0.22);
  color: #2b332f;
  font-size: 12px;
}

.host-console {
  margin-top: 10px;
}

@media (max-width: 640px) {
  .page {
    padding: 20px 14px 48px;
  }

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

  button {
    width: 100%;
  }
}
