:root {
  /* The palette of the app (`frontend/src/theme/colors.css`), without its schemes: the site follows the system's. */
  --text: light-dark(#030303, #9ca3af);
  --bg: light-dark(#ffffff, #16171d);
  --border: light-dark(#e5e4e7, #2e303a);
  --accent: light-dark(#3b96ff, #7f39c8);

  /* The app has no secondary text color. */
  --muted: color-mix(in srgb, var(--text) 75%, var(--bg));

  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font:
    1.0625rem/1.65 Literata,
    Georgia,
    "Times New Roman",
    serif;
  color: var(--text);
  background: var(--bg);
}

/* The accent is too pale for the text of a link (3:1 on the light and 2.8:1 on the dark background), so it underlines. */
a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

.header,
.main,
.footer {
  max-inline-size: 48rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;

  padding-block: 1.25rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
}

.nav a:not(.button) {
  text-decoration: none;
}

.nav a:not(.button):hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.button {
  display: inline-block;

  padding: 0.5rem 1.1rem;
  border-radius: 0.5rem;

  font-weight: 600;
  color: #ffffff;
  text-decoration: none;

  background: var(--accent);
}

.button:hover {
  opacity: 0.88;
}

.hero {
  padding-block: 3rem 2.5rem;
}

.hero h1 {
  margin-block: 0 1rem;
  font-size: clamp(2rem, 6vi, 2.75rem);
  line-height: 1.2;
}

.hero p {
  margin-block: 0 1.75rem;
  font-size: 1.2rem;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem;

  padding-block: 1rem 2rem;
  border-block-start: 1px solid var(--border);
}

.feature h2 {
  margin-block: 0 0.4rem;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.prose {
  padding-block: 1.5rem;
}

.prose h1 {
  line-height: 1.25;
}

.prose h2 {
  margin-block-start: 2rem;
}

.meta {
  font-size: 0.95rem;
  color: var(--muted);
}

.articles {
  padding: 0;
  list-style: none;
}

.articles li {
  padding-block: 1rem;
  border-block-start: 1px solid var(--border);
}

.article-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.articles p {
  margin-block: 0.25rem 0;
}

.articles .meta {
  margin-inline-start: 0.75rem;
}

.footer {
  padding-block: 2rem;
  border-block-start: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--muted);
}
