:root {
  --bg: #1b1b1b;
  --bg-alt: #262626;
  --border: #3a3a3a;
  --text: #e6e6e6;
  --muted: #a0a0a0;
  --link: #82aaff;
  --link-hover: #b4ccff;
  --accent: #82aaff;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration: underline;
}

header {
  background: #111;
  border-bottom: 1px solid var(--border);
}

header .bar,
footer .bar,
main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header .bar {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  height: 3.5rem;
}

header .brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
}

footer {
  background: #111;
  border-top: 1px solid var(--border);
}

footer .bar {
  padding-block: 1.25rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}

footer a:hover,
footer a:focus-visible {
  color: var(--text);
}

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

h1,
h2,
h3 {
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

/* Heading self-links: look like headings, not links */
h2 a,
h3 a {
  color: inherit;
}

.toc ul {
  margin: 0.25rem 0;
  padding-left: 1.25rem;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Official service buttons */
.brand-button {
  display: inline-block;
  border-radius: 10px;
  transition: filter 0.15s;
}

.brand-button img {
  display: block;
  height: 48px;
  width: auto;
}

.brand-button:hover,
.brand-button:focus-visible {
  filter: brightness(1.1);
  text-decoration: none;
}

/* GitHub Sponsors has no image button; styled after GitHub's own "Sponsor" button */
.gh-sponsor {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.25rem;
  background: #21262d;
  border: 1px solid #363b42;
  color: #f0f6fc;
  font-weight: 600;
}

.gh-sponsor svg {
  color: #db61a2;
}

.gh-sponsor:hover,
.gh-sponsor:focus-visible {
  background: #292e36;
  border-color: #8b949e;
  color: #f0f6fc;
}

/* Crypto: QR code with the address centered under it */
.coin {
  margin: 1rem 0;
  text-align: center;
}

.coin img {
  display: block;
  width: 180px;
  height: 180px;
  margin: 0 auto 0.75rem;
  border-radius: 16px;
  image-rendering: pixelated;
}

code.address {
  display: inline-block;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  font: 0.95rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  user-select: all;
}

button.copy {
  display: block;
  margin: 0.5rem auto 0;
  padding: 0.25rem 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

button.copy:hover {
  border-color: var(--accent);
}

.contact {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
