/*
 * The one stylesheet of the public pages. No fonts, images or scripts are
 * loaded from anywhere: the system's own font, the app's palette, and a dark
 * scheme that follows the reader's phone. See docs/operations/web-hosting.md.
 */

:root {
  color-scheme: light dark;
  --background: #f2fafd;
  --surface: #ffffff;
  --text: #0e2a38;
  --text-secondary: #4d6b79;
  --border: #cfe4ec;
  --tint: #086a8b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #061a24;
    --surface: #0d2b3a;
    --text: #eaf6fb;
    --text-secondary: #9dbbc8;
    --border: #1d4558;
    --tint: #5cc8ec;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

header .site {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

main {
  padding-top: 0.5rem;
  padding-bottom: 2rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 1.25rem 0 0.25rem;
}

h2 {
  font-size: 1.3125rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.4;
  margin: 1.5rem 0 0.25rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.375rem;
}

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

a:focus-visible {
  outline: 2px solid var(--tint);
  outline-offset: 2px;
}

.updated,
.note {
  color: var(--text-secondary);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  padding: 1rem 1.125rem;
  margin: 1rem 0 1.5rem;
}

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

footer {
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

footer a {
  display: inline-block;
  margin-right: 1rem;
}
