:root {
  --bg: #fbfaf7;
  --fg: #1f1d1a;
  --muted: #6b665e;
  --rule: #e4e0d8;
  --accent: #2f5d8a;
  --code-bg: #f0ede6;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161514;
    --fg: #ebe7e0;
    --muted: #a39d93;
    --rule: #34312d;
    --accent: #8ab4dc;
    --code-bg: #24221f;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", sans-serif;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .25rem; }
h2 { font-size: 1.2rem; margin: 2.5rem 0 .5rem; }
p, ul { margin: 0 0 1rem; }
li { margin-bottom: .35rem; }

a { color: var(--accent); }
code {
  background: var(--code-bg);
  padding: .1em .35em;
  border-radius: 4px;
  font-size: .9em;
}

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

.lang {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-bottom: 2rem;
  font-size: .9rem;
}
.lang a[aria-current="page"] { color: var(--fg); font-weight: 600; text-decoration: none; }

.note {
  color: var(--muted);
  font-size: .9rem;
  border-left: 3px solid var(--rule);
  padding-left: .75rem;
}
.meta { color: var(--muted); font-size: .9rem; }

table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .5rem; border-bottom: 1px solid var(--rule); }
th { font-weight: 600; }

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 30rem) {
  table, thead, tbody, tr, th, td { display: block; }
  thead { display: none; }
  td { border: 0; padding: .25rem 0; }
  tr { border-bottom: 1px solid var(--rule); padding: .5rem 0; }
}
