:root {
  color-scheme: light;
  --bg: #f7f5ef;
  --card: #ffffff;
  --ink: #17201a;
  --muted: #68746d;
  --brand: #176b4d;
  --brand-dark: #0e4d37;
  --line: #e6e1d8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  padding: 0.8rem 1rem;
}

button {
  background: var(--brand);
  color: white;
  cursor: pointer;
  font-weight: 700;
}

button:disabled {
  background: #a8b6ae;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  color: var(--brand);
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px;
}

.hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin: 0.2rem 0;
}

.eyebrow {
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(23, 32, 26, 0.08);
  margin-bottom: 20px;
  padding: 24px;
}

.referral-card,
.inline-form {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.inline-form input,
.stack input,
.stack select {
  flex: 1;
  width: 100%;
}

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

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  margin-top: 6px;
}

.two-column {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.list {
  display: grid;
  gap: 12px;
}

.row {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.row img {
  border-radius: 50%;
  height: 42px;
  margin-right: 10px;
  object-fit: cover;
  vertical-align: middle;
  width: 42px;
}

.tree ul {
  border-left: 2px solid var(--line);
  list-style: none;
  margin: 8px 0 8px 12px;
  padding-left: 16px;
}

.stack {
  display: grid;
  gap: 12px;
}

.muted {
  color: var(--muted);
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .hero,
  .referral-card,
  .inline-form {
    align-items: stretch;
    flex-direction: column;
  }
}
