:root {
  --bg: rgb(24 26 29);
  --panel: rgb(31 33 36);
  --raised: rgb(37 40 44);
  --line: rgb(46 50 56);
  --line-strong: rgb(63 68 75);
  --text: rgb(244 246 247);
  --body: rgb(203 210 214);
  --muted: rgb(143 156 168);
  --accent: #2f7bf6;
  --accent-strong: #1d63e0;
  --accent-tint: rgb(47 123 246 / 12%);
  --logo: #fff;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: rgb(250 250 250);
    --panel: rgb(255 255 255);
    --raised: rgb(244 244 244);
    --line: rgb(230 230 230);
    --line-strong: rgb(205 205 205);
    --text: rgb(20 20 20);
    --body: rgb(52 52 52);
    --muted: rgb(98 98 98);
    --accent-tint: rgb(47 123 246 / 8%);
    --logo: rgb(20 20 20);
    color-scheme: light;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font: 15px/1.55 "Inter Variable", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid rgb(47 123 246 / 70%);
  outline-offset: 2px;
}

.top,
.bottom,
main {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.top {
  padding-top: 28px;
}

.brand {
  display: inline-block;
}

.logo {
  display: block;
  width: 100px;
  height: 40px;
  background: var(--logo);
  mask: url(logo.svg) no-repeat left center / contain;
}

main {
  flex: 1;
  padding-bottom: 64px;
}

.hero {
  padding: 56px 0 36px;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.1;
  font-weight: 650;
}

.lead {
  margin: 16px 0 0;
  max-width: 60ch;
  font-size: 16px;
}

.version {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.picker {
  display: grid;
  gap: 28px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

fieldset[hidden] {
  display: none;
}

legend,
h2 {
  margin: 0 0 10px;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.option {
  position: relative;
  display: grid;
  gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}

.option:hover {
  border-color: var(--line-strong);
}

.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.option:has(input:focus-visible) {
  outline: 2px solid rgb(47 123 246 / 70%);
  outline-offset: 2px;
}

#kind .option {
  grid-template-columns: 28px 1fr;
  column-gap: 14px;
  align-content: center;
}

#kind .hint {
  grid-column: 2;
}

#os .option {
  align-content: start;
}

#os .icon {
  grid-row: auto;
  margin-bottom: 10px;
}

.icon {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  background: var(--muted);
  mask: no-repeat center / contain;
  transition: background-color 0.15s;
}

.icon[hidden] {
  display: none;
}

.option:has(input:checked) .icon {
  background: var(--accent);
}

.icon-windows {
  mask-image: url(icons/windows.svg);
}

.icon-macos {
  mask-image: url(icons/macos.svg);
}

.icon-linux {
  mask-image: url(icons/linux.svg);
}

.icon-android {
  mask-image: url(icons/android.svg);
}

.icon-app {
  mask-image: url(icons/app.svg);
}

.icon-cli {
  mask-image: url(icons/cli.svg);
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--body);
  font-size: 11.5px;
  font-weight: 500;
}

.badge[hidden] {
  display: none;
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.name {
  color: var(--text);
  font-weight: 600;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.files {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}

.file-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.file-head > div {
  display: grid;
  min-width: 0;
}

.file-label {
  color: var(--text);
  font-weight: 600;
}

.file-name {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.button {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--accent-strong);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s;
}

.button:hover {
  background: #184fb5;
}

.note {
  margin: 0;
  font-size: 13px;
}

.note[hidden],
.command[hidden] {
  display: none;
}

code {
  font: 12.5px/1.5 "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-ligatures: none;
}

.command {
  display: block;
  overflow-x: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--raised);
  color: var(--text);
  white-space: pre;
}

.sha {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11.5px;
}

.error {
  color: #f87171;
}

.all {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.all summary {
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.all ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.all li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.all li a {
  overflow-wrap: anywhere;
}

.all li span {
  flex-shrink: 0;
  color: var(--muted);
}

.bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
