/* Lowbuzz: one stylesheet for all pages.
   Contrast (WCAG 2.2): body text and links at least 7:1 (AAA) in both themes,
   focus ring and dividers at least 3:1. No external fonts, no tracking. */

:root {
  --bg: #F3F6F2;
  --surface: #FFFFFF;
  --ink: #142019;
  --muted: #46564C;
  --link: #1D5A3A;
  --line: #8A9A8F;
  --line-soft: #D5DED7;
  --battery: #D9A21B;
  --mint: #DDF3E5;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101813;
    --surface: #18231C;
    --ink: #E6EEE8;
    --muted: #A9BAAE;
    --link: #8FD3AA;
    --line: #5E7064;
    --line-soft: #26332B;
    --battery: #E8B83A;
    --mint: #1D2E24;
    color-scheme: dark;
  }
}

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

html {
  /* Percent, not px: respects the reader's own font size setting */
  font-size: 106.25%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

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

/* Skip link: hidden until focused with the keyboard */
.skip {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Links */
a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { text-decoration-thickness: 2px; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}
.batt {
  width: 34px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 4px;
  position: relative;
  padding: 2px;
  flex: none;
}
.batt::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 4px;
  width: 3px;
  height: 5px;
  background: currentColor;
  border-radius: 0 2px 2px 0;
}
.batt span {
  display: block;
  width: 24%;
  height: 100%;
  background: var(--battery);
  border-radius: 1px;
}

.site-nav ul,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.site-nav ul { gap: .25rem; margin: 0 -.6rem; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .6rem;
  color: var(--muted);
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--ink); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .35em;
}

/* Main content */
main.wrap {
  display: block;
  padding-top: 3rem;
  padding-bottom: 4rem;
}
main:focus { outline: none; }

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem);
  margin: 0 0 .75rem;
}
h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 .5rem;
}
p, li { max-width: 65ch; }
p { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
li::marker { color: var(--muted); }

.lede {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
}
.updated {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 2rem;
}

/* Legal pages: sections separated by a quiet rule */
.legal h2 {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-soft);
}
.legal h1 + .updated + h2 { border-top: 0; padding-top: 0; }

address { font-style: normal; }

/* Home page */
.hero {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 1rem;
}
.hero-art {
  justify-self: start;
  width: 9rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--mint);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-art img {
  width: 58%;
  height: auto;
  display: block;
}
@media (min-width: 40rem) {
  .hero { grid-template-columns: 1fr auto; gap: 2.5rem; }
  .hero-art { width: 12rem; justify-self: end; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-top: 2.5rem;
}
.card h2 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: .95rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}
.site-footer p { margin: 0; }
.footer-nav ul { gap: .25rem 1rem; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}
.footer-nav a:hover { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  a { transition: color .15s ease, text-decoration-thickness .15s ease; }
}

/* Windows high contrast: keep the battery visible */
@media (forced-colors: active) {
  .batt span, .batt::after { background: CanvasText; }
}

@media print {
  .skip, .site-nav { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
