:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --text: #1f2937;
  --text-soft: #4b5563;
  --heading: #0f172a;
  --accent: #0369a1;
  --accent-soft: #e0f2fe;
  --border: #e2e8f0;
  --code-bg: #0b1120;
  --code-text: #e2e8f0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-soft: #111a2e;
    --text: #d1d5db;
    --text-soft: #94a3b8;
    --heading: #f1f5f9;
    --accent: #38bdf8;
    --accent-soft: #0c2a3f;
    --border: #1e293b;
    --code-bg: #020617;
    --code-text: #e2e8f0;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

header.site .inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.1rem;
}

header.site .brand {
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
  margin-right: auto;
  font-size: 1.05rem;
}

header.site .brand span {
  color: var(--accent);
}

header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  font-size: 0.95rem;
}

header.site nav a {
  color: var(--text-soft);
  text-decoration: none;
}

header.site nav a:hover,
header.site nav a[aria-current='page'] {
  color: var(--accent);
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.25;
}

h1 {
  font-size: 2.1rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.45rem;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.8rem;
}

a {
  color: var(--accent);
}

p.lead {
  font-size: 1.15rem;
  color: var(--text-soft);
  max-width: 46rem;
}

.hero {
  padding: 1.5rem 0 0.5rem;
}

.hero .actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--accent);
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.secondary {
  color: var(--accent);
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 1rem 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.55;
}

code {
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

p code,
li code,
td code {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1rem 0.35rem;
  font-size: 0.88em;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-soft);
  color: var(--heading);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.cards li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  background: var(--bg-soft);
}

.cards li strong {
  display: block;
  color: var(--heading);
  margin-bottom: 0.3rem;
}

.note {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
}

footer.site {
  border-top: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.9rem;
}

footer.site .inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

footer.site a {
  color: var(--text-soft);
}
