:root {
  color-scheme: light;
  --bg: #f3f5f1;
  --surface: #ffffff;
  --surface-soft: #f9faf7;
  --text: #151716;
  --muted: #65706a;
  --quiet: #8a948e;
  --line: #d8dfd9;
  --linux: #228b62;
  --macos: #2d66ad;
  --windows: #b5542d;
  --shadow: 0 28px 70px rgba(22, 29, 24, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(34, 139, 98, 0.12), transparent 38%),
    linear-gradient(315deg, rgba(45, 102, 173, 0.1), transparent 36%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 34px 18px;
}

.panel {
  width: min(100%, 760px);
  padding: 26px;
  border: 1px solid rgba(216, 223, 217, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.brand img {
  flex: 0 0 auto;
}

.status-pill {
  min-width: 132px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.status-pill[data-state="available"] {
  border-color: rgba(34, 139, 98, 0.28);
  background: rgba(34, 139, 98, 0.08);
  color: var(--linux);
}

.status-pill[data-state="partial"] {
  border-color: rgba(181, 84, 45, 0.28);
  background: rgba(181, 84, 45, 0.08);
  color: var(--windows);
}

.intro {
  padding: 28px 0 22px;
}

h1,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: 38px;
  font-weight: 780;
  line-height: 1.04;
}

.eyebrow {
  color: var(--linux);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.2;
  text-transform: uppercase;
}

.lede {
  max-width: 510px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.download-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  min-height: 236px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
    transform 160ms ease,
    background-color 160ms ease;
}

.download-card:hover,
.download-card:focus-visible {
  box-shadow: 0 10px 28px rgba(22, 29, 24, 0.1);
  outline: none;
  transform: translateY(-1px);
}

.download-card:active {
  transform: translateY(0);
}

.download-card[data-state="missing"] {
  background: var(--surface-soft);
}

.download-card[data-state="missing"] .download-action {
  border-color: var(--line);
  background: transparent;
  color: var(--quiet);
}

.platform-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
}

.download-copy {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.card-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 760;
  line-height: 1.1;
}

.filename {
  min-width: 0;
  color: var(--muted);
  font-family:
    "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace,
    monospace;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.meta {
  color: var(--quiet);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.download-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: currentColor;
  font-size: 14px;
  font-weight: 760;
  line-height: 1;
}

.download-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.linux {
  color: var(--linux);
}

.linux:hover,
.linux:focus-visible {
  border-color: rgba(34, 139, 98, 0.55);
}

.linux .platform-mark {
  background: var(--linux);
}

.macos {
  color: var(--macos);
}

.macos:hover,
.macos:focus-visible {
  border-color: rgba(45, 102, 173, 0.55);
}

.macos .platform-mark {
  background: var(--macos);
}

.windows {
  color: var(--windows);
}

.windows:hover,
.windows:focus-visible {
  border-color: rgba(181, 84, 45, 0.55);
}

.windows .platform-mark {
  background: var(--windows);
}

.footnote {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 680;
  line-height: 1.2;
}

.footnote span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

@media (max-width: 720px) {
  .page {
    align-items: start;
    padding-top: 20px;
  }

  .panel {
    padding: 20px;
  }

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

  h1 {
    font-size: 32px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .download-card {
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
  }

  .platform-mark {
    grid-row: span 2;
  }

  .download-action {
    grid-column: 2;
    width: min(100%, 180px);
  }
}

@media (max-width: 420px) {
  .download-card {
    grid-template-columns: 1fr;
  }

  .platform-mark,
  .download-action {
    grid-column: auto;
  }

  .platform-mark {
    grid-row: auto;
  }
}
