/* The static pages of the website (privacy policy, wordset format, blog).
   Plain CSS, no external fonts or scripts; light and dark follow the system. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --border: #d8dde3;
  --text: #1f2328;
  --muted: #59636e;
  --accent: #1f8a8a;
  --code-bg: #eceff2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #1b1e22;
    --border: #2f343a;
    --text: #e6e6e6;
    --muted: #9aa3ad;
    --accent: #4fc1c1;
    --code-bg: #23272c;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    16px/1.55 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Noto Sans',
    'Noto Sans SC',
    'PingFang SC',
    'Microsoft YaHei',
    sans-serif;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.75rem 16px;
}

.site-header .brand {
  margin-right: auto;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.site-header .brand span {
  color: var(--accent);
  font-weight: 400;
  margin-left: 0.35rem;
}

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 16px 3rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.4rem;
}

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

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

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

li + li {
  margin-top: 0.25rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.05em 0.3em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.45;
}

pre code {
  background: none;
  padding: 0;
  overflow-wrap: normal;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.posts {
  list-style: none;
  padding: 0;
}

.posts li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}

.posts h2 {
  margin: 0.25rem 0;
}

.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 16px 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

button {
  font: inherit;
  color: #ffffff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  min-height: 44px;
  cursor: pointer;
}

@media (prefers-color-scheme: dark) {
  button {
    color: #121417;
  }
}
