@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/Newsreader-500.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
:root {
  color-scheme: light dark;
  --bg: #f7faf8;
  --fg: #14241c;
  --muted: #5a6b62;
  --line: #d8e3dd;
  --accent: #0f783c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101814;
    --fg: #e8f0eb;
    --muted: #9db0a5;
    --line: #24322a;
    --accent: #6fd39a;
  }
}
/* Akahu logo: the official lockup is a black pill with white artwork, so in
   dark mode it needs a hairline to stay distinct from the page. */
.akahu-logo {
  display: block;
  width: 8.25rem;
  height: auto;
  margin: 0 0 1rem;
  border-radius: 999px;
}
@media (prefers-color-scheme: dark) {
  .akahu-logo { outline: 1px solid var(--line); outline-offset: -1px; }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
header, footer, main { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }
header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: 'Newsreader', ui-serif, Georgia, serif;
  font-weight: 500;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  line-height: 1;
  /* Mark and wordmark share one colour; the mark inherits it via currentColor. */
  color: var(--accent);
  text-decoration: none;
}
.brand svg { display: block; flex: none; }
.brand span {
  display: block;
  line-height: 1;
  /* Optical correction: with line-height 1 the wordmark's ink sits above the
     box centre, because the mark's viewBox is taller than the text box. Tuned
     by eye, so it holds as an adjustment rather than a computed offset. */
  position: relative;
  top: 2px;
}
a.brand:hover { color: color-mix(in srgb, var(--accent) 82%, white); }
nav ul { list-style: none; margin: 0; padding: 0; }
.nav-wide { display: flex; flex-wrap: wrap; gap: 1rem; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.9375rem; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent); }

/* Narrow screens get a Menu disclosure rather than a wrapping row of links, so
   the header stays one line and the links are not split across lines. No
   JavaScript: <details> is native. */
.nav-narrow { display: none; position: relative; }
.nav-narrow summary {
  cursor: pointer;
  list-style: none;
  color: var(--muted);
  font-size: 0.9375rem;
  padding: 0.15rem 0;
}
.nav-narrow summary::-webkit-details-marker { display: none; }
.nav-narrow summary::after { content: ' \25BE'; font-size: 0.75em; }
.nav-narrow[open] summary { color: var(--accent); }
.nav-narrow ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  z-index: 10;
  display: grid;
  gap: 0.125rem;
  min-width: 11rem;
  padding: 0.375rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 8%);
}
.nav-narrow li { padding: 0; }
.nav-narrow a { display: block; padding: 0.45rem 0.75rem; border-radius: 0.5rem; }
.nav-narrow a:hover { background: color-mix(in srgb, var(--line) 45%, transparent); }

@media (max-width: 40rem) {
  .nav-wide { display: none; }
  .nav-narrow { display: block; }
}
main { padding-top: 2.5rem; padding-bottom: 3rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.125rem; margin: 2.25rem 0 0.5rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.0625rem; color: var(--muted); }
.updated { color: var(--muted); font-size: 0.875rem; margin-bottom: 2rem; }
section { border-top: 1px solid var(--line); padding-top: 0.25rem; }
section:first-of-type { border-top: 0; }
main ul { margin: 0 0 1rem; padding-left: 1.35rem; }
main ul li { margin: 0 0 0.4rem; }
ul.pages { list-style: none; padding: 0; }
ul.pages li { border-top: 1px solid var(--line); padding: 1rem 0; }
ul.pages a { color: var(--accent); font-weight: 600; text-decoration: none; }
ul.pages p { color: var(--muted); margin: 0.25rem 0 0; }
footer {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}
footer a { color: var(--accent); }
