/*
 * One stylesheet for five pages that exist to be read, not browsed.
 *
 * No web fonts and no third-party requests of any kind: a privacy policy that
 * phones home to a font CDN would contradict itself on page load. Noto Sans is
 * the app's typeface and is used where the device already has it.
 */

:root {
  --bg: #f6fbf5;
  --surface: #ffffff;
  --ink: #16201a;
  --muted: #4a5a50;
  --rule: #d9e4dc;
  --brand: #1b4332;
  --link: #2d6a4f;
  --callout: #e9f4ec;
  --callout-ink: #1b4332;
  --warn-bg: #fff4d6;
  --warn-ink: #5c4300;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121615;
    --surface: #1a211d;
    --ink: #e6efe8;
    --muted: #a9b8ae;
    --rule: #2a3530;
    --brand: #a5d0b9;
    --link: #86c9a2;
    --callout: #1f2b24;
    --callout-ink: #c1ecd4;
    --warn-bg: #3a2f10;
    --warn-ink: #ffe29a;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}

a:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 2px;
  border-radius: 2px;
}

.draft-banner {
  background: var(--warn-bg);
  color: var(--warn-ink);
  padding: 0.75rem 1.25rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font-size: 0.95rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 0.25rem;
}

nav a[aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--brand);
}

main {
  padding-block: 2.5rem 3rem;
}

h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
  color: var(--brand);
  text-wrap: balance;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.6rem;
  text-wrap: balance;
}

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

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

ul,
ol {
  padding-inline-start: 1.35rem;
}

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

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.muted {
  color: var(--muted);
}

.callout {
  background: var(--callout);
  color: var(--callout-ink);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
}

.callout p:last-child,
.callout ol:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-inline-start: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-inline-start: 2.4rem;
  min-height: 1.8rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0.05rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand);
  color: var(--surface);
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

th,
td {
  text-align: start;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--rule);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.page-links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.page-links li + li {
  margin-top: 0;
}

.page-links a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
}

.page-links a:hover {
  border-color: var(--link);
}

.page-links strong {
  display: block;
  color: var(--brand);
}

.page-links span {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 2rem;
  font-size: 0.93rem;
}

.site-footer p {
  margin-bottom: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
