:root {
  --milk: #fbfff2;
  --milk-2: #f4f9e8;
  --lemon: #b9ff38;
  --lemon-deep: #75b900;
  --ink: #10170b;
  --muted: #66705b;
  --line: rgba(16, 23, 11, 0.12);
  --shadow: 0 26px 80px rgba(65, 88, 30, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 74% 12%, rgba(185, 255, 56, 0.34), transparent 28rem),
    linear-gradient(135deg, var(--milk), #ffffff 55%, var(--milk-2));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: var(--milk);
  transition: opacity 500ms ease, visibility 500ms ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-line {
  width: min(64vw, 420px);
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 23, 11, 0.1);
}

.loader-line span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lemon), #eaff9b);
  transform-origin: left center;
  animation: loadline 1.35s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
}

.brand {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.brand-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 320px) {
  .brand {
    width: 30px;
    height: 30px;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill,
.ghost-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 0.88rem;
  font-weight: 700;
}

.hero {
  display: flex;
  align-items: center;
  min-height: clamp(500px, 72vh, 760px);
  padding: 44px 0 76px;
}

.hero-copy {
  max-width: 880px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lemon-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(3rem, 7vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.lede {
  max-width: 630px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions,
.quest-actions,
.wallet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.quest-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-button:hover,
.quest-link:hover,
button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(16, 23, 11, 0.18);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.micro-copy,
.progress-copy,
.form-message {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.quest-panel {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

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

.panel-head h2,
.wallet-form h2 {
  margin-bottom: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(16, 23, 11, 0.1);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lemon), #dfff7d);
  transition: width 300ms ease;
}

.quests {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.quest {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(251, 255, 242, 0.74);
  transition: border-color 200ms ease, opacity 200ms ease, transform 200ms ease;
}

.quest.locked {
  opacity: 0.54;
}

.quest.active {
  border-color: rgba(117, 185, 0, 0.48);
}

.quest.done {
  border-color: rgba(117, 185, 0, 0.7);
  background: rgba(185, 255, 56, 0.14);
}

.quest-index {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lemon);
  font-weight: 900;
}

.quest h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.quest p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.quest-link {
  min-height: 42px;
  background: white;
  color: var(--ink);
  border: 1px solid var(--line);
}

.quest-actions button {
  min-height: 42px;
  background: var(--lemon);
  color: var(--ink);
}

.wallet-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.wallet-form.locked {
  opacity: 0.64;
}

.wallet-row {
  align-items: stretch;
}

.wallet-row input {
  flex: 1 1 320px;
  min-height: 56px;
  min-width: 0;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: white;
  color: var(--ink);
  font-weight: 700;
}

.wallet-row input:focus {
  border-color: var(--lemon-deep);
  box-shadow: 0 0 0 4px rgba(185, 255, 56, 0.28);
}

.wallet-row button {
  background: var(--lemon);
  color: var(--ink);
}

.form-message.success {
  color: #3f8900;
}

.form-message.error {
  color: #b3261e;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
  color: var(--muted);
  font-weight: 800;
}

.socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  transition: transform 180ms ease, background 180ms ease;
}

.socials a:hover {
  transform: translateY(-2px);
  background: var(--lemon);
}

.socials svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

@keyframes loadline {
  0% {
    transform: scaleX(0);
  }
  62% {
    transform: scaleX(0.74);
  }
  100% {
    transform: scaleX(1);
  }
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 22px, 720px);
  }

  .nav-actions .ghost-link {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 34px 0 52px;
  }

  .quest {
    grid-template-columns: 48px 1fr;
  }

  .quest-actions {
    grid-column: 1 / -1;
  }

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

@media (max-width: 520px) {
  .shell {
    width: min(100% - 18px, 420px);
  }

  .topbar {
    align-items: flex-start;
  }

  .brand {
    width: 50px;
    height: 50px;
  }

  .brand-feather {
    width: 27px;
    height: 27px;
  }

  .status-pill {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  h1 {
    font-size: clamp(2.5rem, 16vw, 4.2rem);
  }

  .quest-panel {
    padding: 18px;
  }

  .quest {
    padding: 14px;
  }

  .quest-actions,
  .wallet-row,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .quest-link,
  .quest-actions button,
  .wallet-row input,
  .wallet-row button,
  .primary-button {
    width: 100%;
  }

  .wallet-row input {
    flex: 0 0 auto;
  }

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