/* One stylesheet for every page, so the landing pages, support and privacy read as one site. */

:root {
  color-scheme: light dark;
  --ground: #ffffff;
  --ink: #16181c;
  --muted: #5b6472;
  --line: #e2e6ec;
  --accent: #034ea2;
  --accent-ink: #ffffff;
  --card: #f6f7f9;
  --flag: #034ea2;
  --warn-ground: #fff8e6;
  --warn-line: #e8cf94;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1216;
    --ink: #e8ecf2;
    --muted: #9aa5b4;
    --line: #262d36;
    --accent: #74a9f2;
    --accent-ink: #0f1216;
    --card: #161b21;
    --warn-ground: #211c10;
    --warn-line: #4a3d1c;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }

/* Header ------------------------------------------------------------------ */

.top {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.top-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: .8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wordmark {
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}

.langs { display: flex; gap: .5rem; font-size: .85rem; }
.langs a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .1rem .55rem;
}
.langs a[aria-current="true"] { color: var(--ink); border-color: var(--ink); }

/* Layout ------------------------------------------------------------------ */

main { max-width: 62rem; margin: 0 auto; padding: 0 1.5rem 5rem; }
section { padding-top: 3.2rem; }
.prose { max-width: 44rem; }

h1 {
  font-size: clamp(1.9rem, 4.4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 3rem 0 .8rem;
  max-width: 34ch;
}

h2 {
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 0 0 .7rem;
}

h3 { font-size: 1.05rem; margin: 1.6rem 0 .3rem; }

.lede { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin: 0 0 1.6rem; }

.deadline {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--flag);
  border-radius: 6px;
  padding: .35rem .7rem;
  font-size: .92rem;
  margin-bottom: 1.4rem;
}

/* Buttons ----------------------------------------------------------------- */

.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.6rem 0 0; }

.button {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  padding: .65rem 1.1rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.button.secondary { background: transparent; color: var(--accent); }

/* Cards and lists --------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.25rem 0;
}

.card p:last-child { margin-bottom: 0; }

.rules { list-style: none; padding: 0; margin: 1rem 0 0; }
.rules li {
  border-top: 1px solid var(--line);
  padding: .85rem 0;
}
.rules li:last-child { border-bottom: 1px solid var(--line); }
.rules b { font-weight: 600; }
.source {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  margin-top: .2rem;
}

/* The example strip ------------------------------------------------------- */

figure { margin: 1.4rem 0; }
figure img {
  width: 100%;
  max-width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .8rem;
}
figcaption { color: var(--muted); font-size: .85rem; margin-top: .5rem; }

/* Text beside a picture. Text comes first in the markup, so on a narrow screen it is read
   before the image rather than after it. */

.split {
  display: grid;
  gap: 1.6rem;
  align-items: start;
}

@media (min-width: 48rem) {
  .split { grid-template-columns: minmax(0, 1fr) 20rem; }
}

.label-example { margin: 0; }
.label-example img { padding: 0; border-radius: 6px; }

/* The app, shown rather than described. The whole thing is a link to the App Store. */

.shot { margin: 1.6rem 0 0; }
.shot a { display: block; }
.shot img {
  width: 100%;
  height: auto;
  /* No frame and no background: the capture keeps the window's own rounded corners and
     transparency, so anything drawn behind it shows at the corners. */
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  transition: box-shadow .18s ease, transform .18s ease;
}
.shot:hover img { box-shadow: 0 12px 38px rgba(0, 0, 0, .26); transform: translateY(-2px); }
.shot figcaption { color: var(--muted); font-size: .85rem; margin-top: .6rem; }

/* Downloads --------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: .7rem;
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

.grid li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7rem .8rem;
  background: var(--card);
}

.grid .years { font-weight: 600; display: block; }
.grid .files { font-size: .85rem; display: flex; gap: .6rem; margin-top: .2rem; }

table { border-collapse: collapse; width: 100%; margin-top: 1.2rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* FAQ --------------------------------------------------------------------- */

details {
  border-top: 1px solid var(--line);
  padding: .85rem 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: .6rem 0 0; }

dl { margin: 0; }
dt { font-weight: 600; margin-top: 1.2rem; }
dd { margin: .3rem 0 0; }

code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .05rem .3rem;
  font-size: .9em;
}

/* Footer ------------------------------------------------------------------ */

footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 1.6rem 1.5rem 3rem;
  color: var(--muted);
  font-size: .88rem;
}

.footer-inner { max-width: 62rem; margin: 0 auto; display: grid; gap: .6rem; }
.footer-inner a { color: var(--accent); }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }
