:root {
  color-scheme: light;
  --ink: #182033;
  --muted: #5d6678;
  --line: #d9dee7;
  --paper: #ffffff;
  --surface: #f5f7fa;
  --accent: #087f5b;
  --accent-dark: #056447;
  --code: #172033;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--surface);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.75;
}

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

.header-inner,
.page-content,
.site-footer {
  width: min(100% - 40px, 900px);
  margin: 0 auto;
}

.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 20px;
  min-height: 64px;
}

.site-nav a {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}

.page-content {
  min-height: calc(100vh - 132px);
  padding: 56px 0 72px;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 20px;
  font-size: 32px;
}

h2 {
  margin: 52px 0 16px;
  padding-top: 10px;
  font-size: 24px;
  border-top: 1px solid var(--line);
}

h3 {
  margin: 32px 0 12px;
  font-size: 19px;
}

p,
ul,
ol,
blockquote,
pre,
table {
  margin: 0 0 20px;
}

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

blockquote {
  padding: 4px 20px;
  color: var(--muted);
  border-left: 3px solid #99d8c9;
}

code {
  padding: 2px 5px;
  color: #9f2d45;
  background: #f6f0f1;
  border-radius: 3px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  text-align: left;
  border: 1px solid var(--line);
}

th {
  background: var(--surface);
}

.sample-list {
  margin-top: 38px;
  border-top: 1px solid var(--line);
}

.sample-link {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 24px 4px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.sample-link:hover {
  background: #f0faf7;
}

.sample-number {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.sample-link strong,
.sample-link small {
  display: block;
}

.sample-link strong {
  font-size: 18px;
}

.sample-link small {
  color: var(--muted);
}

.sample-arrow {
  color: var(--accent);
  font-size: 24px;
}

.site-footer {
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.markdown-source {
  overflow: auto;
  margin: 0;
  padding: 24px;
  color: #000000;
  background: #ffffff;
  border-radius: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.7;
  tab-size: 4;
  white-space: pre;
}

@media (max-width: 560px) {
  .header-inner,
  .page-content,
  .site-footer {
    width: min(100% - 32px, 900px);
  }

  .header-inner {
    min-height: 56px;
  }

  .site-nav {
    min-height: 56px;
    gap: 14px;
  }

  .page-content {
    padding: 36px 0 52px;
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    margin-top: 42px;
    font-size: 22px;
  }

  .markdown-source {
    padding: 14px 16px;
  }
}
