:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --radius: 18px;
  --max: 46rem;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1016;
    --surface: #121a23;
    --text: #e8eef4;
    --muted: #9fb0c0;
    --line: #223041;
    --accent: #5eead4;
    --accent-soft: #123a37;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1.0625rem;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--surface);
  border-radius: 10px;
}
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

.site-header, main, .site-footer {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-header { padding-top: 1.75rem; padding-bottom: 0.5rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #0f766e, #134e4a);
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.05rem;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  padding: 0;
  margin: 1rem 0 0;
}
nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; }
nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

main { padding-top: 1.25rem; padding-bottom: 2.5rem; }

.hero { padding: 1.5rem 0 0.5rem; }
.hero h1 {
  font-size: clamp(2rem, 7vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
}
.lede { color: var(--muted); font-size: 1.15rem; margin: 0 0 1.25rem; }

h1 { font-size: clamp(1.8rem, 6vw, 2.3rem); letter-spacing: -0.03em; line-height: 1.15; margin: 0.5rem 0 0.5rem; }
h2 { font-size: 1.2rem; letter-spacing: -0.015em; margin: 0 0 0.5rem; }
h3 { font-size: 1.02rem; margin: 1rem 0 0.25rem; }

.meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 1.25rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 0 0 0.9rem;
}
.card p:last-child, .card ul:last-child, .card ol:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 0.9rem; grid-template-columns: 1fr; margin-bottom: 0.9rem; }
@media (min-width: 640px) { .grid { grid-template-columns: 1fr 1fr; } }
.grid .card { margin: 0; }

.pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

ul, ol { padding-left: 1.2rem; }
li + li { margin-top: 0.3rem; }

.toc ol { columns: 1; margin: 0; }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 2rem; } }

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0 0 0.75rem; }
