@font-face {
  font-family: "Inter";
  src: url("/assets/inter-4.1.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --ink: #111820;
  --muted: #5b6673;
  --rule: #e3e6ea;
  --field: #c3cad3;
  --danger: #b92e32;
  --pad: clamp(28px, 6vw, 88px);
  --gap: clamp(24px, 4vw, 64px);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0f11;
    --ink: #f2f4f7;
    --muted: #a3adb9;
    --rule: #24282e;
    --field: #3d444d;
    --danger: #ff9398;
  }
}

* {
  box-sizing: border-box;
}

/* The page is as high as the visible area. Units such as 100svh can be taller than the area above
   the Safari toolbar, so the page would scroll a little and slide under the toolbar. */
html {
  height: 100%;
}

/* The home page is a poster: the wordmark and the caption in the optical center, the text in a
   band at the bottom. #content and the band share the columns of the page through subgrid. */
body {
  margin: 0;
  min-height: 100%;
  padding: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 34ch) minmax(0, 26ch) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr auto;
  column-gap: var(--gap);
}

.masthead {
  grid-area: 2 / 1 / 3 / -1;
}

.brand {
  display: inline-block;
  font-size: clamp(88px, 28vw, 248px);
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 32;
  line-height: 0.86;
  color: inherit;
  text-decoration: none;
}

/* The Frop arrow (design/app-icon/mark.svg) is as high as the F and has the width of its top arm. */
.mark {
  display: inline-block;
  width: 0.5055em;
  height: 0.7275em;
  margin-right: 0.11em;
  fill: currentColor;
  vertical-align: baseline;
}

#content {
  grid-area: 3 / 1 / 6 / -1;
  display: grid;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
}

#content::before {
  content: "";
  grid-area: 3 / 1 / 4 / -1;
  border-top: 1px solid var(--rule);
}

h1 {
  grid-area: 1 / 1 / 2 / -1;
  margin: 0.55em 0 0 0.06em;
  font-size: clamp(22px, 2.3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.25;
  color: var(--muted);
  overflow-wrap: anywhere;
}

p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  text-wrap: pretty;
}

.lead,
.note {
  padding-top: 22px;
}

.lead {
  grid-area: 3 / 1;
}

.note {
  grid-area: 3 / 2;
  color: var(--muted);
}

/* The waitlist sits in the third column of the band. Its steps replace each other in place. */
.waitlist {
  grid-area: 3 / 3;
  max-width: 27rem;
  padding-top: 22px;
}

.waitlist form {
  gap: 0;
  margin-top: 0;
}

.waitlist label,
.waitlist .title {
  display: block;
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 600;
}

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

.waitlist .row {
  display: flex;
  gap: 8px;
}

.waitlist .row input {
  flex: 1;
  min-width: 0;
}

.waitlist .row button,
.waitlist .actions button {
  margin-top: 0;
  white-space: nowrap;
}

/* One field takes the whole code, also from paste or AutoFill. */
.waitlist .row .code {
  flex: none;
  width: 10.5ch;
  padding: 10px 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.32em;
  font-variant-numeric: tabular-nums;
}

.waitlist textarea {
  width: 100%;
  min-height: 96px;
  padding: 13px 16px;
  border: 1px solid var(--field);
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  resize: vertical;
}

.waitlist .lede,
.waitlist .done {
  color: var(--muted);
}

.waitlist .lede {
  margin-bottom: 12px;
}

.waitlist strong {
  color: var(--ink);
  font-weight: 600;
}

.waitlist .done:focus {
  outline: none;
}

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

.waitlist .status {
  margin-top: 8px;
  font-size: 14px;
}

.waitlist .status:empty {
  display: none;
}

.waitlist .links,
.waitlist .actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 10px;
}

button.link {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.actions button.link {
  font-size: 14px;
}

/* The visible robot check is a button with the checkbox role. It starts the proof of work. */
.human-check {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-top: 10px;
  padding: 13px 16px;
  border: 1px solid var(--field);
  background: transparent;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.human-check .box {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--field);
  border-radius: 6px;
}

.human-check.is-busy .box {
  border-color: var(--muted);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.human-check.is-done .box {
  border-color: var(--ink);
  background: var(--ink);
}

.human-check.is-done .box::after {
  content: "";
  width: 6px;
  height: 11px;
  border: solid var(--bg);
  border-width: 0 2.5px 2.5px 0;
  transform: translateY(-1px) rotate(45deg);
}

.human-check .small {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .human-check.is-busy .box {
    border-style: dotted;
    animation: none;
  }
}

/* People never see or reach the honeypot field. A script that fills it gets no mail sent. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.colophon {
  grid-area: 5 / 3;
  justify-self: end;
  align-self: end;
  text-align: right;
}

.colophon p {
  padding-top: 22px;
  font-size: 13px;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

.brand:hover {
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Registration and share pages: the same wordmark, smaller, with the page content in one column
   on the same left edge. The server sets the class, so these pages never show the homepage. */
body.page {
  grid-template-columns: minmax(0, 30rem);
  grid-template-rows: auto auto 1fr auto;
}

.page .masthead {
  grid-area: 1 / 1;
}

.page .brand {
  font-size: clamp(64px, 20vw, 144px);
}

.page #content {
  grid-area: 2 / 1;
  display: block;
  padding-top: clamp(32px, 6vh, 56px);
}

.page #content::before {
  content: none;
}

.page h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

.page #content > p {
  color: var(--muted);
}

.page .colophon {
  grid-area: 4 / 1;
  justify-self: start;
  text-align: left;
}

.page .colophon p {
  padding-top: 48px;
}

/* The version history of the Mac app. scripts/render-release-notes.swift writes the page into the
   update folder. Each version is a section below a rule. */
.release {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}

.release h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.release h2 time,
.release h2 span {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.release h3 {
  margin: 20px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.release ul {
  margin: 0;
  padding-left: 20px;
}

.release li {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.55;
}

.release li::marker {
  color: var(--muted);
}

.release .important {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid var(--rule);
  border-radius: 10px;
}

form {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

label {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}

input,
button,
.button {
  font: inherit;
  border-radius: 10px;
  padding: 13px 16px;
}

input {
  width: 100%;
  border: 1px solid var(--field);
  background: transparent;
  color: inherit;
}

input:focus-visible {
  outline-offset: 2px;
}

button,
.button {
  display: block;
  margin-top: 16px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.error {
  color: var(--danger);
}

.detail {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

progress {
  width: 100%;
  height: 8px;
  margin-top: 24px;
  accent-color: var(--ink);
}

@media (max-width: 700px) {
  /* The Safari toolbar floats over the bottom of the page. The extra space keeps text above it. */
  body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto auto 1fr auto auto auto auto;
    padding-bottom: calc(var(--pad) + 32px);
  }

  #content {
    grid-area: 3 / 1 / 8 / -1;
  }

  .note {
    grid-area: 4 / 1;
    padding-top: 14px;
  }

  .waitlist {
    grid-area: 5 / 1;
    max-width: none;
    padding-top: 28px;
  }

  .colophon {
    grid-area: 8 / 1;
    justify-self: start;
    text-align: left;
  }

  .colophon p {
    padding-top: 18px;
  }
}
