:root {
  color-scheme: light dark;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #edf2f7;
  --text: #172033;
  --muted: #647083;
  --line: #d8e0eb;
  --primary: #1769e0;
  --primary-strong: #0e55ba;
  --success: #12805c;
  --shadow: 0 18px 42px rgba(19, 32, 51, 0.11);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151f;
    --surface: #171e2b;
    --surface-soft: #202a3b;
    --text: #edf3fb;
    --muted: #a5b1c2;
    --line: #2e3a4f;
    --primary: #6aa8ff;
    --primary-strong: #8dbcff;
    --success: #6ee7b7;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(23, 105, 224, 0.14), transparent 34rem),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 10px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand img {
  display: block;
  border-radius: 8px;
}

.status-pill,
.platform {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero {
  padding: 58px 0 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 700;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 7%);
}

.toolbar div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
}

.toolbar strong {
  color: var(--text);
}

.ghost-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 13px;
  font-weight: 800;
  cursor: pointer;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 28px;
}

.app-card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}

.file-size {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.app-card h2 {
  margin: 18px 0 14px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: 0;
}

.details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.details div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 14px;
}

dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.release-notes {
  flex: 1;
  margin: 16px 0 18px;
  color: var(--muted);
  line-height: 1.65;
}

.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
}

.download-button:hover {
  background: var(--primary-strong);
}

.download-button.is-disabled {
  background: var(--surface-soft);
  color: var(--muted);
  pointer-events: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0 34px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

@media (max-width: 940px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .nav,
  .toolbar,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand span {
    font-size: 14px;
  }

  .details div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  dd {
    text-align: left;
  }
}
