/* 【自开发代码】gethost.online 博客样式。
   原因：静态站不引入任何外部 CSS 框架/CDN，保证离线可渲染、首屏无阻塞。
   实现考虑：单文件、无预处理器；用 CSS 变量支持浅色/深色两套；正文最大宽度 42rem。 */

:root {
  --bg: #fdfdfc;
  --fg: #1f2328;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #0f766e;
  --code-bg: #f6f8fa;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e6e6e6;
    --muted: #9ca3af;
    --line: #262b33;
    --accent: #5eead4;
    --code-bg: #161b22;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

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

.site-header {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 1.2rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 650; font-size: 1.15rem; color: var(--fg); letter-spacing: .02em; }
.site-header nav { display: flex; gap: 1rem; font-size: .9rem; }
.site-header nav a { color: var(--muted); }

main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 3rem;
}

.intro { color: var(--muted); margin-bottom: 2.2rem; }
.intro p { margin: .4rem 0; }

.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 0; }

.post-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.post-title { font-size: 1.12rem; font-weight: 600; color: var(--fg); }
.post-head time { color: var(--muted); font-size: .82rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.post-summary { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }

.tags { margin-top: .4rem; font-size: .8rem; display: flex; gap: .7rem; flex-wrap: wrap; }
.tags a { color: var(--muted); }

.post header h1 { font-size: 1.7rem; line-height: 1.35; margin: 0 0 .5rem; }
.post .meta { color: var(--muted); font-size: .85rem; display: flex; gap: 1rem; align-items: center; }

.content { margin-top: 1.8rem; }
.content h2 { font-size: 1.25rem; margin: 2rem 0 .7rem; }
.content h3 { font-size: 1.05rem; margin: 1.6rem 0 .6rem; }
.content p, .content li { margin: .75rem 0; }
.content img { max-width: 100%; border-radius: var(--radius); }

.content blockquote {
  margin: 1.2rem 0;
  padding: .2rem 0 .2rem 1rem;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.content code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: .88em;
  background: var(--code-bg);
  padding: .12em .35em;
  border-radius: 4px;
}

.content pre {
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  overflow-x: auto;
  font-size: .86rem;
  line-height: 1.6;
}

.content pre code { background: none; padding: 0; font-size: inherit; }

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: .92rem;
}
.content th, .content td { border: 1px solid var(--line); padding: .45rem .6rem; text-align: left; }
.content th { background: var(--code-bg); font-weight: 600; }

.content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.list-title { font-size: 1.35rem; margin: 0 0 1.5rem; }

.tag-cloud { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; }
.tag-cloud a { font-size: 1rem; }
.tag-cloud .count { color: var(--muted); font-size: .8rem; }

.notfound { text-align: center; padding: 3rem 0; }
.notfound h1 { font-size: 3rem; margin: 0; color: var(--muted); }

.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex: 1 1 0;
  min-width: 0;
  text-align: left;
}

.footer-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.footer-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 0;
  min-width: 0;
}

.footer-sub { white-space: nowrap; }

.site-footer .icp {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.site-footer .icp:hover { color: var(--fg); text-decoration: none; }

.gongan {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.gongan:hover { color: var(--fg); text-decoration: none; }

.beian-icon { display: flex; align-items: center; justify-content: center; }
.beian-icon img { display: block; width: 16px; height: 18px; }
.beian-icon svg { display: block; width: 16px; height: 18px; }

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; align-items: center; }
  .footer-left, .footer-center, .footer-right { flex: none; width: 100%; justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .post-head { flex-direction: column; gap: .1rem; }
  .post .meta { flex-wrap: wrap; }
}
