:root {
  color-scheme: light dark;
  --bg: #fdfdfc;
  --fg: #1b1b1a;
  --muted: #5a5a58;
  --accent: #1e6feb;
  --border: #e6e5e2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --fg: #e9e8e4;
    --muted: #9a9894;
    --accent: #79a9ff;
    --border: #2b2b29;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

.site-header,
main,
.site-footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.site-title {
  font-weight: 600;
  text-decoration: none;
  color: var(--fg);
}
.site-nav { display: flex; gap: 1rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--fg); }

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

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
p { margin: 0 0 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

details {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: color-mix(in srgb, var(--fg) 4%, transparent);
  border-radius: 0.5rem;
}
details > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}
details[open] > summary::before { transform: rotate(90deg); }

.puzzle-list,
.games-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}
.puzzle-list li { padding: 0.35rem 0; }
.games-list li { margin-bottom: 1.25rem; }
.games-list li a { font-weight: 600; }
.games-list li p { color: var(--muted); margin: 0.25rem 0 0; }

.back-link { margin-top: 2.5rem; color: var(--muted); }
.back-link a { color: var(--muted); }

.contact-icons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}
.contact-icons a {
  color: var(--fg);
  display: inline-flex;
  padding: 0.35rem;
  border-radius: 0.35rem;
}
.contact-icons a:hover { color: var(--accent); }
.contact-icons svg { display: block; }

.site-footer {
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
