:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1c1c1e;
  --muted: #5c5c66;
  --border: #e2e2e8;
  --surface: #f5f6f8;
  --accent: #0066cc;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --fg: #f2f2f7;
    --muted: #a1a1aa;
    --border: #2c2c30;
    --surface: #1b1b1e;
    --accent: #4da3ff;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "PingFang TC", "Hiragino Sans", "Apple SD Gothic Neo", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 20px 64px;
}

header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
  margin-bottom: 28px;
}

.header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.brand-group {
  min-width: 220px;
  flex: 1 1 320px;
}

h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 6px;
}

h2 {
  font-size: 21px;
  line-height: 1.35;
  margin: 30px 0 12px;
}

h3 {
  font-size: 16px;
  line-height: 1.4;
  margin: 22px 0 8px;
}

p,
li {
  font-size: 15px;
  overflow-wrap: anywhere;
}

ul {
  padding-left: 20px;
  margin: 10px 0 16px;
}

li + li {
  margin-top: 8px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.updated-line {
  margin-bottom: 20px;
}

.lang-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-label {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.lang-select {
  appearance: auto;
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  min-height: 36px;
  max-width: 100%;
  cursor: pointer;
}

.lang-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  font-size: 14px;
}

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

a:hover {
  text-decoration: underline;
}

nav a[aria-current="page"] {
  font-weight: 600;
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 18px 0;
}

.callout p:first-child {
  margin-top: 0;
}

.callout p:last-child,
.callout ul:last-child {
  margin-bottom: 0;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 560px) {
  main {
    padding: 24px 16px 48px;
  }

  .header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-group {
    min-width: 0;
    flex: 0 0 auto;
  }

  .lang-control {
    justify-content: space-between;
  }

  .lang-select {
    flex: 1 1 auto;
  }
}
