/* bwhaze.com — one small stylesheet, no external fonts or scripts. */
:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #172b4d;
  --muted: #505f79;
  --border: #dfe1e6;
  --accent: #0c66e4;
  --accent-text: #ffffff;
  --code: #f1f2f4;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d2125;
    --surface: #22272b;
    --text: #dee4ea;
    --muted: #9fadbc;
    --border: #38414a;
    --accent: #579dff;
    --accent-text: #1d2125;
    --code: #2c333a;
  }
}

* { 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, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

header.site, footer.site, main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

header.site {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

header.site .brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

header.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }
header.site nav a { color: var(--muted); text-decoration: none; }
header.site nav a:hover, header.site nav a[aria-current="page"] { color: var(--text); }

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

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-size: 1.35rem; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 0.25rem; }

.lead { font-size: 1.15rem; color: var(--muted); margin-top: 0; }
.flush { margin-top: 0; }
.muted { color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1.25rem 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}
.grid .card { margin: 0; }
.grid h3 { margin-top: 0; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }

code {
  background: var(--code);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}

table { width: 100%; border-collapse: collapse; margin: 1rem 0; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
th { white-space: nowrap; }

ol li, ul li { margin: 0.25rem 0; }

footer.site {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site a { color: var(--muted); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 0.5rem; }
