/* Colors follow the app: plum accent on parchment, lighter plum in dark mode. */
:root {
  color-scheme: light dark;
  --text: #241a24;
  --muted: #6b5b69;
  --background: #fdfaf4;
  --accent: #8e3f86;
  --rule: #e6dcd0;
  --button: #8e3f86; /* white text on it: 6.6 : 1, in both modes */
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ece4ea;
    --muted: #a8979f;
    --background: #1b141b;
    --accent: #d08ac6;
    --rule: #3a2c39;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 16px;
  background: var(--background);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

header, main {
  max-width: 42rem;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

/* On the home page the header holds only the language switch, over the centered content. */
header.bare {
  position: absolute;
  inset: 0 16px auto;
  max-width: none;
  justify-content: flex-end;
  border-bottom: 0;
}

main { padding: 2rem 0 4rem; }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; text-wrap: balance; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; text-wrap: balance; }
p, li { overflow-wrap: break-word; text-wrap: pretty; }

ul { padding-left: 1.25rem; }
li + li { margin-top: 0.5rem; }

/* The "Last updated" line under the title. */
h1 + p { color: var(--muted); }

a { color: var(--accent); text-underline-offset: 0.15em; }

a.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

/* Pills: the language switch and the beta mark. */
.lang, .beta {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-decoration: none;
  text-transform: uppercase;
}

a.lang:hover { background: var(--accent); border-color: var(--accent); color: var(--background); }

main.home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 3rem 0;
  text-align: center;
}

main.home .icon { display: block; width: 128px; height: 128px; margin-bottom: 1.25rem; }
main.home h1 { margin-bottom: 0.5rem; }

/* Sits on the name like a superscript, so the name stays centered on its own. */
main.home .beta {
  position: absolute;
  margin: 0.15rem 0 0 0.5rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.6875rem;
}

main.home .tagline { max-width: 22rem; margin: 0 0 2rem; color: var(--muted); text-wrap: balance; }

a.download {
  display: inline-block;
  min-width: 11rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: var(--button);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

a.download:hover { filter: brightness(1.1); }

main.home .requirements { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.8125rem; }

/* Contact and policy: small print under everything, not a call to action. */
main.home footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

main.home footer a { color: inherit; }
main.home footer a:hover { color: var(--accent); }
