:root {
  --green: #008000;
  --green-dark: #006400;
  --green-light: #e3f2e3;
  --gold: #ecc02c;
  --ink: #111827;
  --muted: #5b6573;
  --line: #e6e9ee;
  --bg: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 100, 0, 0.10);
  --shadow-sm: 0 2px 10px rgba(17, 24, 39, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green-dark); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  max-width: 980px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.brand img { border-radius: 9px; }
.brand strong { color: var(--green); }
.header-link {
  font-size: .92rem;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  transition: background .15s;
}
.header-link:hover { background: var(--green-light); color: var(--green-dark); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 50% -120px, rgba(236, 192, 44, .25), transparent 60%),
    linear-gradient(180deg, var(--green-light), #ffffff 70%);
  padding: 40px 22px 56px;
  text-align: center;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.pill {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--green-dark);
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.1;
  margin: 18px 0 10px;
  letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--green); }
.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 540px;
}

/* ---------- Latest download card ---------- */
.latest-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  max-width: 520px;
  margin: 0 auto;
  text-align: left;
}
.latest-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  color: var(--muted);
  padding: 8px 0;
}
.latest-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.latest-version {
  font-size: 1.35rem;
  font-weight: 700;
}
.badge-latest {
  background: var(--green);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.latest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: .9rem;
  margin: 6px 0 18px;
}
.latest-meta span { display: inline-flex; align-items: center; gap: 6px; }

.btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--green);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  padding: 16px 20px;
  border-radius: 12px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s;
  box-shadow: 0 6px 18px rgba(0, 128, 0, .28);
}
.btn-download:hover { background: var(--green-dark); box-shadow: 0 8px 22px rgba(0, 100, 0, .35); }
.btn-download:active { transform: translateY(1px); }
.btn-download .arrow { font-size: 1.25rem; }

.release-notes {
  margin-top: 18px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.release-notes summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--green-dark);
  font-size: .92rem;
}
.release-notes .notes-body {
  margin-top: 10px;
  font-size: .92rem;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}

.fineprint {
  margin-top: 16px;
  color: var(--muted);
  font-size: .85rem;
}

/* ---------- How to install ---------- */
.how, .releases {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 22px;
}
.how h2, .releases h2 {
  font-size: 1.5rem;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.releases-sub { color: var(--muted); margin: 0 0 22px; }

.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.step-num {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
  display: grid;
  place-items: center;
}
.steps p { margin: 4px 0 0; color: var(--muted); font-size: .94rem; }
code {
  background: var(--green-light);
  color: var(--green-dark);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: .88em;
}

/* ---------- Releases list ---------- */
.releases-list { display: grid; gap: 12px; }
.release-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.release-row:hover { border-color: var(--green); box-shadow: var(--shadow); }
.release-info { min-width: 0; }
.release-title {
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.release-sub { color: var(--muted); font-size: .85rem; margin-top: 3px; }
.btn-row {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  padding: 10px 16px;
  border-radius: 10px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-row:hover { background: var(--green); color: #fff; }
.btn-row[aria-disabled="true"] {
  background: #f1f2f4;
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- States (empty / error) ---------- */
.state-box {
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 30px 22px;
  color: var(--muted);
}
.state-box strong { color: var(--ink); display: block; margin-bottom: 6px; font-size: 1.05rem; }
.state-box a { font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding: 26px 22px;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.site-footer img { border-radius: 7px; opacity: .9; }

/* ---------- Spinner ---------- */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--green-light);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .release-row { flex-direction: column; align-items: stretch; }
  .btn-row { justify-content: center; }
  .header-link { display: none; }
}
