:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #101828;
  --muted: #475467;
  --border: #d0d5dd;
  --link: #175cd3;
  --link-visited: #6938ef;
  --code-bg: #f2f4f7;
  --code-text: #111827;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2b;
    --text: #e6eaf2;
    --muted: #b3bdd1;
    --border: #2a3550;
    --link: #84caff;
    --link-visited: #c3b5fd;
    --code-bg: #0f172a;
    --code-text: #e6eaf2;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.5);
  }
}

html[data-theme="light"] {
  color-scheme: light;

  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #101828;
  --muted: #475467;
  --border: #d0d5dd;
  --link: #175cd3;
  --link-visited: #6938ef;
  --code-bg: #f2f4f7;
  --code-text: #111827;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b1220;
  --surface: #111a2b;
  --text: #e6eaf2;
  --muted: #b3bdd1;
  --border: #2a3550;
  --link: #84caff;
  --link-visited: #c3b5fd;
  --code-bg: #0f172a;
  --code-text: #e6eaf2;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:visited {
  color: var(--link-visited);
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 12px 14px;
  border-radius: 10px;
  overflow: auto;
  border: 1px solid var(--border);
}

code {
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.15em 0.35em;
  border-radius: 6px;
}

pre code {
  background: transparent;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  text-align: left;
  color: var(--text);
  background: color-mix(in srgb, var(--surface), var(--bg) 35%);
}

tr:last-child th,
tr:last-child td {
  border-bottom: none;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg), var(--surface) 20%);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-title {
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.theme-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-switcher__label {
  color: var(--muted);
  font-size: 14px;
}

.theme-switcher__select {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.content {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 18px 40px;
}

.content > :first-child {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg), var(--surface) 20%);
}

.site-footer__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px;
  color: var(--muted);
  font-size: 14px;
}
