/* Shared by the pages at the site root. Light and dark follow the device setting. */
:root {
  --bg: #ffffff;
  --fg: #181c1f;
  --muted: #576f76;
  --border: #c5d0d5;
  --rule: #e5ebee;
  --link: #0a449b;
  --link-hover: #06306f;
  --avatar-bg: #e5ebee;
  --focus: #0a449b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1113;
    --fg: #eef1f3;
    --muted: #8ba2ad;
    --border: #3e4a50;
    --rule: #2a3236;
    --link: #6a9bf4;
    --link-hover: #9cbcf8;
    --avatar-bg: #2a3236;
    --focus: #6a9bf4;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

/* Links in running text. */
a {
  color: var(--link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 140ms ease, text-decoration-color 140ms ease;
}
/* Hover goes halfway; pressing goes the rest of the way. */
a:hover {
  color: color-mix(in srgb, var(--link) 50%, var(--link-hover));
  text-decoration-thickness: 2px;
}
a:active { color: var(--link-hover); }

/* Small grey links around the page: Privacy Policy, back links, Back to top. */
a.quiet {
  color: var(--muted);
  font-size: 0.8125rem;
}
a.quiet:hover { color: color-mix(in srgb, var(--muted) 50%, var(--fg)); }
a.quiet:active { color: var(--fg); }

/* Bordered pill, with the hover and press of community-home hub pills (.hub-cta-pill). */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, scale 120ms ease;
}
.button svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.button.icon-only { width: 40px; padding: 0; justify-content: center; }
/* Hover goes halfway (border halfway to the text colour, half the tint); pressing goes all the way. */
.button:hover,
.button:focus-visible {
  color: var(--fg);
  border-color: color-mix(in srgb, var(--border) 50%, var(--fg));
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  text-decoration: none;
}
.button:active {
  color: var(--fg);
  border-color: var(--fg);
  background: color-mix(in srgb, var(--fg) 14%, transparent);
  text-decoration: none;
  scale: 0.95;
  filter: brightness(0.9);
}
@media (prefers-color-scheme: dark) {
  .button:active { filter: brightness(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a, .button { transition: none; }
}
