:root {
  color-scheme: light dark;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #667085;
  --primary: #5b6ee1;
  --secondary: #13a887;
  --accent: #f59e0b;
  --border: #e4e7ec;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10141f;
    --surface: #171d2b;
    --text: #eef2ff;
    --muted: #a8b0c3;
    --border: #2a3347;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.nav, footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(18px, 5vw, 72px);
}
.nav nav { display: flex; gap: 18px; color: var(--muted); font-weight: 700; }
.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 38px;
  align-items: center;
  padding: 24px clamp(18px, 5vw, 72px) 70px;
}
.hero h1 { font-size: clamp(40px, 7vw, 82px); line-height: 0.98; margin: 0; letter-spacing: 0; }
.hero p { color: var(--muted); font-size: 20px; line-height: 1.55; max-width: 680px; }
.eyebrow { color: var(--secondary) !important; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px !important; }
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.button { border-radius: 8px; padding: 14px 18px; font-weight: 900; border: 1px solid var(--border); }
.primary { background: var(--primary); color: white; }
.secondary { background: var(--surface); }
.phone {
  width: min(100%, 370px);
  min-height: 620px;
  margin-inline: auto;
  border: 10px solid #20283a;
  border-radius: 34px;
  background: var(--surface);
  box-shadow: 0 30px 70px rgba(16, 24, 40, 0.22);
  padding: 28px;
}
.topline { width: 80px; height: 6px; border-radius: 99px; background: var(--border); margin: 0 auto 28px; }
.avatar { width: 110px; height: 110px; border-radius: 28px; background: var(--primary); color: white; display: grid; place-items: center; font-size: 28px; font-weight: 900; }
.quest { display: flex; justify-content: space-between; border: 1px solid var(--border); padding: 16px; border-radius: 8px; margin: 12px 0; font-weight: 800; }
.quest.done { border-color: var(--secondary); }
.quest span { color: var(--secondary); }
.progress { height: 12px; border-radius: 99px; background: var(--border); overflow: hidden; margin-top: 24px; }
.progress span { display: block; width: 68%; height: 100%; background: var(--accent); }
.band { padding: 70px clamp(18px, 5vw, 72px); border-top: 1px solid var(--border); }
.band h2 { font-size: clamp(28px, 4vw, 44px); margin-top: 0; letter-spacing: 0; }
.grid { display: grid; gap: 16px; }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
article, details, .rewards {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
}
article strong { font-size: 20px; }
article p, details p, .rewards p, li { color: var(--muted); line-height: 1.6; }
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 32px; align-items: center; }
.screenshots { display: flex; gap: 16px; align-items: center; overflow-x: auto; padding-bottom: 10px; }
.phone.small { min-width: 190px; min-height: 360px; display: grid; place-items: center; color: var(--muted); font-weight: 900; }
details { margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 900; }
footer { border-top: 1px solid var(--border); color: var(--muted); flex-wrap: wrap; }
code {
  background: color-mix(in srgb, var(--border) 55%, transparent);
  border-radius: 6px;
  padding: 2px 6px;
}
.install-hero {
  padding: 80px clamp(18px, 5vw, 72px) 52px;
  max-width: 980px;
}
.install-hero h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  margin: 0;
  letter-spacing: 0;
}
.install-hero p {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  max-width: 780px;
}
.device-note {
  display: inline-flex;
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 14px;
  color: var(--text);
  font-weight: 800;
}
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.download-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.download-card h2 {
  margin: 0;
}
.download-card .button {
  margin-top: auto;
}
.platform {
  color: var(--secondary);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
}
.small-copy {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.download-progress {
  min-height: 24px;
  color: var(--secondary);
  font-weight: 800;
}

@media (max-width: 780px) {
  .nav { align-items: flex-start; flex-direction: column; }
  .nav nav { flex-wrap: wrap; }
  .hero, .split, .three, .two, .install-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 10px; }
  .phone { min-height: 520px; }
  .install-hero { padding-top: 42px; }
}
