:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --text: #f1f1ef;
  --muted: #8b8b91;
  --faint: #79797f;
  --line: #232327;
  --line-strong: #37373d;
  --error: #d7a3a0;
  --font-sans:
    ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    monospace;
}

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

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px 24px 24px;
}

.content {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 56px 0 48px;
}

.screen {
  width: 100%;
}

.screen--auth {
  max-width: 336px;
  margin: 0 auto;
  text-align: center;
}

.screen--downloads {
  max-width: 620px;
  margin: 0 auto;
}

.wordmark,
.downloads-title {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.wordmark {
  margin-bottom: 40px;
  font-size: 1.5rem;
}

.password-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.password-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  background: #0e0e10;
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.password-input::placeholder {
  color: var(--faint);
}

.password-input:focus {
  border-color: #65656d;
  background: #111113;
  box-shadow: 0 0 0 3px rgb(241 241 239 / 6%);
}

.button {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--text);
  color: var(--bg);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 140ms ease,
    opacity 140ms ease;
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.button:focus-visible,
.platform__action:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.password-input:focus-visible {
  outline: none;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: var(--error);
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: left;
}

.downloads-header {
  margin-bottom: 42px;
}

.downloads-title {
  margin-bottom: 14px;
  font-size: clamp(2rem, 7vw, 2.5rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.description {
  max-width: 52ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
  white-space: pre-line;
}

.platforms {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

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

.platform__details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.platform__name {
  font-size: 0.9375rem;
  font-weight: 500;
}

.platform__meta {
  color: var(--muted);
  font-size: 0.8125rem;
}

.platform__checksum {
  margin-top: 3px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.platform__action {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition:
    border-color 140ms ease,
    background-color 140ms ease;
}

.platform__status {
  flex: none;
  color: var(--faint);
  font-size: 0.8125rem;
}

.site-footer {
  padding-top: 20px;
  color: var(--faint);
  font-size: 0.6875rem;
  letter-spacing: 0.015em;
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.no-script {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 24px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

@media (hover: hover) {
  .password-input:hover {
    border-color: var(--line-strong);
  }

  .button:hover:not(:disabled) {
    background: #d8d8d3;
  }

  .platform__action:hover {
    border-color: #5b5b63;
    background: #141416;
  }
}

@media (max-width: 520px) {
  .page {
    padding: 24px 20px 20px;
  }

  .content {
    padding: 40px 0;
  }

  .downloads-header {
    margin-bottom: 34px;
  }

  .platform {
    gap: 16px;
    padding: 18px 0;
  }

  .platform__action {
    min-width: 0;
    padding: 8px 14px;
  }

  .platform__checksum {
    font-size: 0.625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
