:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-2: #eef5ee;
  --text: #111815;
  --muted: #58645d;
  --line: rgba(17, 24, 21, .12);
  --brand: #0d6b3d;
  --brand-2: #0a4d2d;
  --accent: #dff6aa;
  --shadow: 0 18px 60px rgba(12, 36, 24, .12);
  --radius: 28px;
  --button-radius: 999px;
  --esp-tools-button-color: var(--brand);
  --esp-tools-button-text-color: #fff;
  --esp-tools-button-border-radius: 999px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07110c;
    --surface: #101b15;
    --surface-2: #13251b;
    --text: #edf7ef;
    --muted: #aab8af;
    --line: rgba(237, 247, 239, .14);
    --brand: #4fd083;
    --brand-2: #8cf5b0;
    --accent: #263d1b;
    --shadow: 0 18px 60px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, rgba(116, 210, 127, .22), transparent 28rem),
    radial-gradient(circle at 86% 18%, rgba(191, 230, 130, .22), transparent 25rem),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  font-weight: 900;
  letter-spacing: -.06em;
}
.brand strong { display: block; font-size: 1rem; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .95rem;
}
.nav a {
  padding: 8px 12px;
  border-radius: 999px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 52px 24px 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  align-items: center;
  min-height: 560px;
}

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

h1, h2 { margin: 0; letter-spacing: -.055em; }
h1 {
  max-width: 720px;
  font-size: clamp(3.8rem, 8vw, 6.8rem);
  line-height: .9;
}
h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.1;
}
.lead {
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.55;
  margin: 24px 0;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badges span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  color: var(--muted);
  font-weight: 700;
}

.install-card, .panel {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.install-card {
  padding: 28px;
}
.install-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
  font-size: .82rem;
  white-space: nowrap;
}
.status.ready { color: #06391e; background: #c8ffd9; }
.status.missing { color: #743700; background: #ffe4ba; }
.status.error { color: #681a1a; background: #ffd6d6; }

esp-web-install-button { display: block; margin: 28px 0; }
.install-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 62px;
  border: 0;
  border-radius: var(--button-radius);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 12px 28px rgba(13, 107, 61, .26);
  font-size: 1.1rem;
  font-weight: 900;
  cursor: pointer;
}
.install-button:hover { transform: translateY(-1px); }
.support-message {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: #ffe4ba;
  color: #743700;
  font-weight: 700;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  color: var(--muted);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--brand-2);
  font-weight: 900;
}
.steps strong { color: var(--text); display: block; margin-bottom: 2px; }
.steps span { display: block; line-height: 1.45; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.panel {
  padding: 24px;
  box-shadow: none;
}
.panel h2 { font-size: 1.25rem; margin-bottom: 14px; }
.panel p, .panel li {
  color: var(--muted);
  line-height: 1.55;
}
.panel ul { margin: 0; padding-left: 1.15rem; }
pre {
  overflow: auto;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
}

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 24px 42px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .92rem;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: clamp(3.2rem, 15vw, 5rem); }
}

@media (max-width: 640px) {
  .topbar { position: static; align-items: flex-start; }
  .nav { display: none; }
  main { padding-top: 24px; }
  .install-head { flex-direction: column; }
  .footer { flex-direction: column; gap: 8px; }
}
