:root {
  --bg: #f5f9fc;
  --ink: #1c2836;
  --muted: #56677a;
  --link: #4d68a8;
  --ice: #93c8e3;
  --line: #d9e5ef;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e151d;
    --ink: #e4ecf4;
    --muted: #93a4b6;
    --link: #93b0e8;
    --line: #243244;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
}

.page {
  max-width: 38rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

a:focus-visible {
  outline: 3px solid var(--ice);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Site header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 1.75rem;
  height: 1.75rem;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

/* Headings */
h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
}

h2 {
  margin: 2.5rem 0 0.5rem;
  font-size: 1.2rem;
  line-height: 1.5;
}

h3 {
  margin: 1.75rem 0 0.25rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.updated {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Home hero */
.hero .snowball {
  display: block;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 1.25rem;
  object-fit: contain;
}

.hero h1 {
  font-size: 2.6rem;
}

.links {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.links li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.links li:last-child {
  border-bottom: 1px solid var(--line);
}

.links a {
  font-weight: 600;
}

.links span {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 30rem) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .site-header {
    flex-wrap: wrap;
  }
}
