@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/plex-mono-300.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/plex-mono-500.woff2") format("woff2");
}

:root {
  --paper: #f4f0e8;
  --sheet: #fbf9f5;
  --rule: #dcd5c9;
  --graphite: #6e675e;
  --body: #4a443d;
  --ink: #1d1b18;
  --vermilion: #d2462d;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.7 "IBM Plex Mono", ui-monospace, monospace;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top)) 20px max(40px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 32px;
}

nav {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

nav a {
  color: var(--graphite);
  text-decoration: none;
}

nav a[aria-current="page"], nav a:hover {
  color: var(--ink);
}

h1, h2 {
  margin: 0;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(34px, 9vw, 48px);
}

h2 {
  font-size: 22px;
  font-weight: 400;
}

.mark {
  color: var(--vermilion);
}

.lede {
  margin: 14px 0 0;
  color: var(--body);
  font-size: 14px;
}

.label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
}

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

.links li {
  border-bottom: 1px solid var(--rule);
}

.links a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  color: var(--ink);
  text-decoration: none;
}

.links a:hover .arrow {
  color: var(--vermilion);
}

.links small {
  display: block;
  color: var(--graphite);
  font-size: 13px;
}

.arrow {
  color: var(--graphite);
  align-self: center;
}

.apps {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ink);
}

.app {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app p {
  margin: 0;
  color: var(--body);
  font-size: 14px;
}

.downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.download {
  display: inline-flex;
  flex-direction: column;
  min-width: 150px;
  padding: 10px 14px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.download small {
  font-weight: 400;
  font-size: 12px;
  color: var(--graphite);
}

.download:hover {
  background: var(--ink);
  color: var(--sheet);
}

.download:hover small {
  color: var(--rule);
}

.download.pending {
  border-style: dashed;
  border-color: var(--rule);
  color: var(--graphite);
  pointer-events: none;
}

.note {
  font-size: 12px;
  color: var(--graphite);
}

a:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}

footer {
  font-size: 12px;
  color: var(--graphite);
}

.login {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}

.login[hidden], .apps[hidden], footer[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field input {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.field input:focus {
  outline: none;
  border-bottom-color: var(--vermilion);
}

.primary {
  min-height: 52px;
  border: 0;
  border-radius: 2px;
  background: var(--ink);
  color: var(--sheet);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

button.download {
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.status {
  margin: 0;
  min-height: 1.7em;
  color: var(--graphite);
  font-size: 13px;
}

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--graphite);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid var(--vermilion);
  outline-offset: 2px;
}
