:root {
  --bg: #0e0f13;
  --fg: #e6e6e6;
  --muted: #8b8f9a;
  --line: #22242c;
  --accent: #7ee787;
  --card: #14161c;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbfbfd;
    --fg: #16181d;
    --muted: #61656e;
    --line: #e3e4e8;
    --accent: #1a7f37;
    --card: #ffffff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;      /* 移动端地址栏收起时也不露馅 */
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  flex: 1 0 auto;           /* 内容不足一屏时把 footer 顶到页面底部 */
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 2rem;
}

header > .prompt { color: var(--muted); }
header h1 {
  font-size: 1.7rem;
  margin: .25rem 0 0;
  letter-spacing: -.02em;
}
header p { color: var(--muted); margin: .6rem 0 0; max-width: 38rem; }

.cursor::after {
  content: "▋";
  color: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  margin: 3rem 0 1rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--line);
}

ul.services { list-style: none; margin: 0; padding: 0; }
ul.services li {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .55rem .75rem;
  margin: 0 0 .35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
}
ul.services .name { font-weight: 700; }
ul.services .desc { color: var(--muted); font-size: .9rem; margin-left: auto; text-align: right; }
ul.services a { color: var(--accent); text-decoration: none; }
ul.services a:hover { text-decoration: underline; }



footer {
  flex-shrink: 0;
  margin-top: 3rem;
  padding: 1.3rem 1.25rem 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}
footer p { margin: 0 0 .35rem; }
footer p:last-child { margin-bottom: 0; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }
footer .beiyan { display: block; margin-top: .35rem; }

/* ── Article / prose ───────────────────────────────────────────── */
nav.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}
nav.top a { color: var(--muted); text-decoration: none; }
nav.top a:hover { color: var(--accent); }

article.post h1 { font-size: 1.55rem; line-height: 1.35; margin: .2rem 0 .4rem; letter-spacing: -.02em; }
article.post .meta { color: var(--muted); font-size: .8rem; margin: 0 0 2.5rem; }
article.post .meta span + span::before { content: " · "; }
article.post h2 { margin-top: 3.2rem; }
article.post h3 {
  font-size: .95rem;
  margin: 2rem 0 .6rem;
  color: var(--fg);
}
article.post p { margin: 0 0 1rem; }
article.post ul, article.post ol { padding-left: 1.25rem; margin: 0 0 1.1rem; }
article.post li { margin-bottom: .35rem; }
article.post a { color: var(--accent); }

article.post code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .05em .35em;
  font-size: .88em;
}
pre.code {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .8rem;
  line-height: 1.6;
  margin: 0 0 1.3rem;
  -webkit-overflow-scrolling: touch;
}
pre.code code { background: none; border: 0; padding: 0; font-size: inherit; }
pre.code .cm { color: var(--muted); }
pre.code .hl { color: var(--accent); }

table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  margin: 0 0 1.4rem;
}
table.spec th, table.spec td {
  text-align: left;
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.spec th { color: var(--muted); font-weight: 400; text-transform: uppercase; letter-spacing: .08em; font-size: .7rem; }
table.spec td code { white-space: nowrap; }

.box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: .9rem 1.1rem;
  margin: 0 0 1.4rem;
  font-size: .9rem;
  background: var(--card);
}
.box.warn { border-left-color: #e5a13c; }
.box p:last-child { margin-bottom: 0; }
.box .t { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .4rem; }

/* ── Article / prose ───────────────────────────────────────────── */
