:root {
  color-scheme: light dark;
  --bg: #f7f6fb;
  --surface: #ffffff;
  --text: #1f1d2b;
  --muted: #6b6880;
  --accent: #6d5bd0;
  --border: #e7e4f0;
  --maxw: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14131c;
    --surface: #1c1b27;
    --text: #eceaf5;
    --muted: #9a97ad;
    --accent: #a99bf0;
    --border: #2b2939;
  }
}

* { box-sizing: border-box; }

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

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

header.site {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #e6a0c4);
  display: inline-block;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

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

h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.9rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 1.75rem 0 0.5rem;
  color: var(--accent);
}

p, ul, ol { margin: 0 0 1rem; }

ul, ol { padding-left: 1.4rem; }

li { margin-bottom: 0.45rem; }

/* nested lists sit tighter under their parent bullet */
li > ul, li > ol { margin: 0.5rem 0 0.5rem; }

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

.content { font-size: 1rem; }

.content strong { font-weight: 700; color: var(--text); }

.content em { font-style: italic; }

.content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  padding: 0.1em 0.4em;
}

/* first heading of the document shouldn't push a big top gap */
.content > h2:first-child { margin-top: 0.5rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem 2rem 1.5rem;
}

.home-links {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.home-links a {
  display: block;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.home-links a:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

footer.site {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}

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

@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { padding: 2rem 1rem 3.5rem; }
  h1 { font-size: 1.6rem; }
  .card { padding: 1.5rem 1.25rem; }
}
