:root {
  color-scheme: light;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", serif;
  --color-text: #1f1f1f;
  --color-muted: #5a5a5a;
  --color-border: #e0e0e0;
  --color-background: #f7f7f8;
  --color-surface: #ffffff;
  --color-accent: #0060df;
  --color-table-head: rgba(0, 96, 223, 0.12);
  --color-table-stripe: rgba(0, 96, 223, 0.06);
  --max-width: 960px;
  --shadow-soft: 0 8px 18px rgba(20, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 0 3.5rem;
}

.content {
  margin-top: 0;
  padding: 2.5rem;
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.page-meta {
  margin: 3rem 0 0;
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
}

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

.content h1 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.8rem, 2.1vw + 1.2rem, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
  position: relative;
  scroll-margin-top: 120px;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.content h2 {
  font-size: clamp(1.4rem, 1.25rem + 0.8vw, 2rem);
}

.content h3 {
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.6rem);
}

.content img {
  max-width: 90%;
  display: block;
  margin: 1rem auto;
}

.content p,
.content li {
  color: var(--color-text);
  word-break: break-word;
}

.content strong {
  font-weight: 600;
}

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

.content a:hover,
.content a:focus {
  text-decoration: underline;
}

.content ul,
.content ol {
  padding-left: 1.4rem;
  margin-top: 0.75rem;
  margin-bottom: 1.75rem;
}

.content li + li {
  margin-top: 0.5rem;
}

.content blockquote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #9bb3ff;
  background: rgba(155, 179, 255, 0.15);
  color: var(--color-muted);
}

.content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  /* font-size: clamp(0.88rem, 0.84rem + 0.25vw, 1rem); */
  line-height: 1.6;
  overflow: hidden;
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.content th,
.content td {
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
  word-break: break-word;
}

.content th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--color-table-head);
  font-weight: 600;
  color: var(--color-text);
}

.content tbody tr:last-child td {
  border-bottom: none;
}

/* .content tbody tr:nth-child(even) td {
  background-color: var(--color-table-stripe);
} */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0;
  padding: 0.5rem 0;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}

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

pre {
  padding: 1rem;
  background: #141a2b;
  color: #fff;
  border-radius: 12px;
  overflow-x: auto;
}

code {
  padding: 0.125rem 0.375rem;
  background: rgba(20, 26, 43, 0.08);
  border-radius: 6px;
}

@media (max-width: 720px) {
  .container {
    padding: 0;
  }

  .content {
    padding: 1.75rem 1.25rem;
    border-radius: 0;
  }

  .content img {
    max-width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --color-text: #f3f4f6;
    --color-muted: #c1c6d1;
    --color-border: rgba(120, 144, 180, 0.45);
    --color-background: #0f172a;
    --color-surface: #111827;
    --color-accent: #7ea8ff;
    --color-table-head: rgba(52, 74, 139, 0.75);
    --color-table-stripe: rgba(37, 56, 102, 0.55);
    --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.35);
  }

  .content blockquote {
    background: rgba(62, 84, 187, 0.35);
    color: #e1e5f3;
  }

  .content table {
    box-shadow: inset 0 0 0 1px rgba(120, 144, 180, 0.35);
  }

  .table-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
  }

  .table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(126, 168, 255, 0.45);
  }

  pre {
    background: #1b253d;
  }

  code {
    background: rgba(159, 173, 201, 0.25);
  }
}