:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #f6f6f6;
  --fg: #1a1a1a;
  --muted: #555555;
  --rule: #e5e5e5;
  --edge: #8a8a8a;

  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;

  --text-xs: 0.8rem;
  --text-sm: 0.9rem;
  --text-md: 1.05rem;
  --text-lg: 1.15rem;
  --text-xl: 1.3rem;
  --text-2xl: 1.5rem;

  --text-word: 2.4rem;

  --radius: 8px;

  --tap: 44px;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    sans-serif;

  --leading: 1.7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --surface: #1e2126;
    --fg: #f2f2f2;
    --muted: #a0a0a0;
    --rule: #2e3238;
    --edge: #6b7480;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);

  line-height: var(--leading);
}

.app {
  max-width: 44rem;
  margin: 0 auto;
  padding: var(--sp-3);
  padding-left: max(var(--sp-3), env(safe-area-inset-left));
  padding-right: max(var(--sp-3), env(safe-area-inset-right));
  padding-bottom: max(var(--sp-8), env(safe-area-inset-bottom));
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--rule);
}

.masthead a {
  color: inherit;
}

.wordmark {
  font-weight: 600;
  text-decoration: none;
}

.masthead nav {
  font-size: var(--text-sm);
}

h1 {
  font-size: var(--text-2xl);
  margin-bottom: 0.2em;
}

h2 {
  margin-top: var(--sp-8);
  font-size: var(--text-lg);
}

h3 {
  margin-top: var(--sp-6);
  font-size: 1rem;
}

.lede {
  font-size: var(--text-md);
}

.muted,
.effective {
  color: var(--muted);
}

.effective {
  margin-top: 0;
  font-size: var(--text-sm);
}

.summary {
  background: var(--surface);
  border-left: 3px solid var(--rule);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-6) 0;
}

.summary p {
  margin: 0;
}

ul {
  padding-left: var(--sp-4);
}

li {
  margin-bottom: var(--sp-1);
}

footer {
  margin-top: var(--sp-12);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: var(--text-sm);
}
