/* The style of every page; pages/build.mjs copies it next to them. */
:root {
  color-scheme: light dark;
  --text: #1c1c1e;
  --muted: #55555c;
  --background: #ffffff;
  --accent: #c2410c;
  --line: #e5e5ea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f2f2f7;
    --muted: #aeaeb2;
    --background: #1c1c1e;
    --accent: #fb923c;
    --line: #3a3a3c;
  }
}

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

/* Japanese breaks between phrases rather than inside a word, where the browser can tell them apart. */
:lang(ja) {
  word-break: auto-phrase;
}

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

header {
  padding-top: 1.25rem;
  border-bottom: 1px solid var(--line);
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-bottom: 1rem;
}

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

nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 2rem 0 0.25rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.25rem;
}

.updated {
  color: var(--muted);
  margin-top: 0;
}

/* The home page's opening paragraph and picture. */
.lead {
  font-size: 1.15rem;
}

.picture {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

/* Its points stay close together, so the page fits about a phone's screen. */
.lead ~ h2 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.15rem;
}

.lead ~ h2 + p {
  margin-top: 0;
}

li + li {
  margin-top: 0.35rem;
}

/* Filled in by the owner before the pages go live. */
.placeholder {
  background: #fde68a;
  color: #1c1c1e;
  padding: 0 0.2em;
  border-radius: 0.2em;
}

footer {
  color: var(--muted);
  font-size: 0.9rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
