/*
Theme Name: TechMinimal 简界
Description: 现代简约 · 科技感双栏 Typecho 主题。首页横幅 + 日志列表 + 侧边信息区，纯浅色、响应式可折叠侧边栏、无外部依赖。
Version: 1.0.1
Author: 给力的疯子
*/

/* ==========================================================================
   1. 设计令牌（Design Tokens）
   ========================================================================== */

:root {
  color-scheme: light;

  /* 色彩 —— 浅色（冷色调，克制的蓝/青） */
  --bg:            #F5F7FA;
  --surface:       #FFFFFF;
  --surface-2:     #EEF2F7;
  --border:        #E3E9F0;
  --border-strong: #C9D5E4;
  --text:          #17212F;
  --text-2:        #55677F;
  --text-3:        #8A9AB0;
  --accent:        #2F6BEF;
  --accent-2:      #0EA5B7;
  --accent-soft:   rgba(47, 107, 239, 0.08);
  --accent-ink:    #FFFFFF;
  --ok:            #16A34A;
  --warn:          #D98A0B;
  --danger:        #D9544D;
  --grid-line:     rgba(23, 33, 47, 0.045);
  --glow:          rgba(47, 107, 239, 0.10);

  /* 排版 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas,
               "Liberation Mono", "Courier New", monospace;
  --fs-base:  16px;
  --lh-base:  1.75;
  --fs-h1:    clamp(1.75rem, 1.2rem + 2.2vw, 2.375rem);
  --fs-h2:    1.375rem;
  --fs-h3:    1.125rem;
  --fs-sm:    0.875rem;
  --fs-xs:    0.8125rem;

  /* 间距（8px 基准栅格） */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* 圆角与阴影 */
  --r-sm: 6px; --r: 10px; --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-2: 0 6px 20px rgba(16, 24, 40, 0.07);

  /* 结构 */
  --wrap: 1200px;
  --side-w: 320px;
}

/* 本主题为纯浅色站点：已彻底移除深色模式。
   历史上主题在 [data-theme="dark"] 下切换 --bg/--text 等令牌，
   但文章正文由编辑器输出硬编码内联色（color:#222、#1F3864 等），
   不会跟随令牌变化，导致深色底上正文与标题对比度不足。
   根治方式即取消深色模式，见 style.css 顶部 color-scheme 声明与
   header.php 的 <meta name="color-scheme" content="light">。 */

/* ==========================================================================
   2. 基础重置与全局
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .25s ease, color .25s ease;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 var(--s4); }
ul, ol { margin: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s6) 0; }

/* 无障碍：跳转链接与焦点态 */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: var(--s2) var(--s4); border-radius: 0 0 var(--r) 0; z-index: 100;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   3. 布局骨架
   ========================================================================== */

.wrap {
  width: 100%; max-width: var(--wrap);
  margin: 0 auto; padding: 0 var(--s5);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-w);
  gap: var(--s7);
  padding: var(--s7) 0 var(--s8);
  align-items: start;
}

/* ==========================================================================
   4. 站点头部与导航
   ========================================================================== */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header { background: var(--bg); }
}

.site-header__inner {
  display: flex; align-items: center; gap: var(--s5);
  height: 60px;
}

.brand {
  display: flex; align-items: center; gap: var(--s3);
  font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em;
  color: var(--text);
}
.brand:hover { color: var(--accent); }
.brand__mark {
  width: 26px; height: 26px; flex: none;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 1px var(--border-strong), 0 2px 8px var(--glow);
}
.brand__img { width: 28px; height: 28px; border-radius: 7px; object-fit: cover; }

.nav { display: flex; align-items: center; gap: var(--s2); margin-left: auto; }
.nav__link {
  position: relative;
  padding: var(--s2) var(--s3);
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-2); border-radius: var(--r-sm);
  transition: color .18s ease, background-color .18s ease;
}
.nav__link:hover { color: var(--text); background: var(--surface-2); }
.nav__link.is-active { color: var(--accent); }
.nav__link.is-active::after {
  content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: -1px;
  height: 2px; background: var(--accent); border-radius: 2px;
}

/* 图标按钮（主题切换 / 菜单） */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 17px; height: 17px; }

/* （深浅色切换按钮及其图标规则已随深色模式一并移除） */

/* 移动端菜单开关 */
.nav-toggle { display: none; }

/* ==========================================================================
   5. 首页横幅（Hero）
   ========================================================================== */

.hero {
  position: relative;
  padding: var(--s8) 0 var(--s7);
  border-bottom: 1px solid var(--border);
  background-image:
    radial-gradient(900px 320px at 12% -20%, var(--glow), transparent 72%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  overflow: hidden;
}
.hero__tag {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s3);
  margin-bottom: var(--s4);
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: .02em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border); border-radius: 999px;
}
.hero__tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero__title {
  font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: var(--s3);
}
.hero__desc {
  max-width: 46ch; margin: 0 0 var(--s5);
  font-size: 1.0625rem; color: var(--text-2);
}
.hero__nav { display: flex; flex-wrap: wrap; gap: var(--s3); }

.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 10px var(--s4);
  font-size: var(--fs-sm); font-weight: 550;
  border: 1px solid var(--border); border-radius: var(--r);
  color: var(--text); background: var(--surface);
  transition: border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:hover {
  color: var(--accent); border-color: var(--border-strong);
  transform: translateY(-1px); box-shadow: var(--shadow-1);
}
.btn--primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.btn--primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn svg { width: 15px; height: 15px; }

/* ==========================================================================
   6. 日志列表
   ========================================================================== */

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s2);
  padding-bottom: var(--s3); border-bottom: 1px solid var(--border);
}
.section-head__title { font-size: var(--fs-h3); }
.section-head__meta { font-size: var(--fs-xs); color: var(--text-3); }

.archive-title {
  font-size: var(--fs-h2); margin-bottom: var(--s5);
  padding-bottom: var(--s3); border-bottom: 1px solid var(--border);
}
.archive-title span { color: var(--accent); }

.post-list { list-style: none; }
.post-card {
  padding: var(--s5) 0;
  border-bottom: 1px solid var(--border);
  transition: background-color .2s ease;
}
.post-card:first-child { padding-top: var(--s4); }
.post-card:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }

.post-card__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
  margin-bottom: var(--s2);
  font-size: var(--fs-xs); color: var(--text-3);
}
.post-card__date { font-variant-numeric: tabular-nums; }
.post-card__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }
.post-card__cat { color: var(--text-2); }
.post-card__cat:hover { color: var(--accent); }

.post-card__title { font-size: 1.25rem; margin-bottom: var(--s2); font-weight: 650; }
.post-card__title a { color: var(--text); }
.post-card:hover .post-card__title a { color: var(--accent); }

.post-card__excerpt {
  margin: 0 0 var(--s3);
  color: var(--text-2); font-size: var(--fs-sm); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.tag-list { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; }
.tag {
  display: inline-block; padding: 2px var(--s2);
  font-size: var(--fs-xs); color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: color .18s ease, border-color .18s ease;
}
a.tag:hover { color: var(--accent); border-color: var(--border-strong); }

/* 文章标签（Typecho 直接输出 <a>，故用后代选择器接管样式） */
.tag-list a {
  display: inline-block; padding: 2px var(--s2);
  font-size: var(--fs-xs); color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: color .18s ease, border-color .18s ease;
}
.tag-list a:hover { color: var(--accent); border-color: var(--border-strong); }
.post-card__more { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.post-card:hover .post-card__more { color: var(--accent); }

.empty-state {
  padding: var(--s7) 0; text-align: center; color: var(--text-3);
}

/* 分页 */
.pagination { margin-top: var(--s6); }
.page-navigator {
  display: flex; flex-wrap: wrap; gap: var(--s2);
  list-style: none; justify-content: center;
}
.page-navigator li { list-style: none; }
.page-navigator a,
.page-navigator li > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 var(--s3);
  font-size: var(--fs-sm); color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.page-navigator a:hover { color: var(--accent); border-color: var(--border-strong); }
.page-navigator li.current a,
.page-navigator li.current > span {
  color: var(--accent-ink); background: var(--accent); border-color: var(--accent);
}

/* ==========================================================================
   7. 文章正文
   ========================================================================== */

.post-single { padding-bottom: var(--s6); }
.post-head { margin-bottom: var(--s5); padding-bottom: var(--s5); border-bottom: 1px solid var(--border); }
.post-head__title { font-size: var(--fs-h1); margin-bottom: var(--s3); }
.post-head__meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
  font-size: var(--fs-xs); color: var(--text-3);
}

.post-content { font-size: 1rem; line-height: 1.8; color: var(--text); }
.post-content h2 { font-size: var(--fs-h2); margin: var(--s6) 0 var(--s3); }
.post-content h3 { font-size: var(--fs-h3); margin: var(--s5) 0 var(--s2); }
.post-content h4 { font-size: 1rem; margin: var(--s4) 0 var(--s2); }
.post-content p { margin: 0 0 var(--s4); }
.post-content ul, .post-content ol { margin: 0 0 var(--s4); padding-left: 1.4em; }
.post-content li { margin-bottom: var(--s1); }
.post-content blockquote {
  margin: var(--s5) 0; padding: var(--s3) var(--s4);
  color: var(--text-2); background: var(--surface-2);
  border-left: 3px solid var(--accent); border-radius: 0 var(--r) var(--r) 0;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content code {
  padding: 2px 6px; font-size: .875em; font-family: var(--font-mono);
  background: var(--surface-2); border-radius: var(--r-sm);
}
.post-content pre {
  margin: var(--s5) 0; padding: var(--s4);
  overflow-x: auto; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r);
  line-height: 1.6;
}
.post-content pre code { padding: 0; background: none; font-size: var(--fs-sm); }
.post-content img { border-radius: var(--r); border: 1px solid var(--border); }
.post-content table { width: 100%; margin: var(--s5) 0; border-collapse: collapse; font-size: var(--fs-sm); }
.post-content th, .post-content td { padding: var(--s2) var(--s3); border: 1px solid var(--border); text-align: left; }
.post-content th { background: var(--surface-2); font-weight: 600; }

.post-tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--border); }
.post-nav {
  display: flex; flex-wrap: wrap; gap: var(--s4); justify-content: space-between;
  margin-top: var(--s5); font-size: var(--fs-sm); color: var(--text-2);
}

/* ==========================================================================
   8. 侧边栏
   ========================================================================== */

.sidebar { position: sticky; top: 76px; }
.sidebar__toggle { display: none; }

.widget { margin-bottom: var(--s6); }
.widget__title {
  display: flex; align-items: center; gap: var(--s2);
  margin-bottom: var(--s3); padding-bottom: var(--s2);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.widget__title::before {
  content: ""; width: 3px; height: 12px; border-radius: 2px;
  background: linear-gradient(var(--accent), var(--accent-2));
}

/* 博主简介 */
.profile { text-align: center; }
.profile__avatar {
  width: 72px; height: 72px; margin: 0 auto var(--s3);
  border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.profile__name { font-size: 1rem; margin-bottom: var(--s1); }
.profile__bio { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s3); }
.profile__links { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; }

/* 列表类组件 */
.link-list { list-style: none; }
.link-list li { border-bottom: 1px dashed var(--border); }
.link-list li:last-child { border-bottom: 0; }
.link-list a {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3);
  padding: var(--s2) 0; font-size: var(--fs-sm); color: var(--text-2);
  transition: color .18s ease, padding-left .18s ease;
}
.link-list a:hover { color: var(--accent); padding-left: var(--s2); }
.link-list .count {
  flex: none; font-size: var(--fs-xs); color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.link-list .date { flex: none; font-size: var(--fs-xs); color: var(--text-3); font-variant-numeric: tabular-nums; }
.link-list .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 标签云 */
.tag-cloud { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag-cloud a {
  padding: 4px var(--s3); font-size: var(--fs-xs); line-height: 1.5;
  color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px;
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}
.tag-cloud a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.tag-cloud .t1 { opacity: .75; }
.tag-cloud .t2 { opacity: .85; }
.tag-cloud .t3 { color: var(--text); border-color: var(--border-strong); }
.tag-cloud .t4 { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); font-weight: 550; }

/* 订阅 */
.subscribe {
  padding: var(--s4); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.subscribe__text { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: var(--s3); }
.subscribe .btn { width: 100%; justify-content: center; }

/* 小号图标按钮（侧边栏「立即刷新」） */
.icon-btn--sm { width: 26px; height: 26px; border-radius: var(--r-sm); }
.icon-btn--sm svg { width: 14px; height: 14px; }
.widget__title .icon-btn--sm { margin-left: auto; }

/* --------------------------------------------------------------------------
   服务器状态（实时数据 · 与订阅卡片同款容器风格）
   数据来源：主题自带接口 status.php（读取 /proc 等真实指标）
   -------------------------------------------------------------------------- */

.status__card {
  padding: var(--s4);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-1);
}

/* 顶部：运行状态 + 运行时间 */
.status__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s2);
  padding-bottom: var(--s3); margin-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}
.status__state {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--fs-xs); font-weight: 550; color: var(--text-2);
}
.status__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-3);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.status__state[data-state="online"] .status__dot { background: var(--ok); }
.status__state[data-state="online"] { color: var(--text); }
.status__state[data-state="loading"] .status__dot { background: var(--accent-2); animation: status-pulse 1.2s ease-in-out infinite; }
.status__state[data-state="offline"] .status__dot { background: var(--danger); }
.status__state[data-state="offline"] { color: var(--danger); }
.status__state[data-state="stale"] .status__dot { background: var(--warn); }
.status__state[data-state="stale"] { color: var(--warn); }
.status__uptime {
  font-size: var(--fs-xs); color: var(--text-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

@keyframes status-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* 指标列表 */
.status-metrics { list-style: none; display: grid; gap: var(--s3); }
.status-metric__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s2); margin-bottom: var(--s2);
}
.status-metric__label {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: var(--fs-xs); color: var(--text-2);
}
.status-metric__icon { width: 14px; height: 14px; flex: none; color: var(--text-3); }
.status-metric__value {
  font-size: var(--fs-sm); font-weight: 650; color: var(--text);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.status-metric__value .unit { font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); margin-left: 1px; }

.status-bar {
  height: 6px; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px;
}
.status-bar__fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .5s ease, background-color .3s ease;
}
.status-metric[data-level="warn"] .status-bar__fill { background: linear-gradient(90deg, var(--accent-2), var(--warn)); }
.status-metric[data-level="high"] .status-bar__fill { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.status-metric[data-level="unknown"] .status-bar__fill { background: var(--border-strong); }
.status-metric[data-level="high"] .status-metric__value { color: var(--danger); }

.status-metric__detail {
  margin: var(--s2) 0 0; font-size: var(--fs-xs); color: var(--text-3);
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 底部：更新时间 / 自动刷新说明 */
.status__foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s2); margin: var(--s3) 0 0;
  font-size: var(--fs-xs); color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.status__auto { white-space: nowrap; }

/* 加载中骨架屏（仅首次无数据时出现） */
.status-skeleton { display: grid; gap: var(--s2); }
.status-skeleton__line,
.status-skeleton__bar {
  display: block; border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: status-shimmer 1.4s ease-in-out infinite;
}
.status-skeleton__line { height: 10px; width: 45%; }
.status-skeleton__bar { height: 6px; width: 100%; }
@keyframes status-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.status:not(.is-loading) .status-skeleton { display: none; }

/* 错误 / 超时 / 离线提示 */
.status-alert {
  display: flex; align-items: flex-start; gap: var(--s2);
  margin: var(--s3) 0 0; padding: var(--s2) var(--s3);
  font-size: var(--fs-xs); line-height: 1.6; color: var(--warn);
  background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.status-alert[hidden] { display: none; }
.status-alert.is-error { color: var(--danger); }

.status-note { margin: var(--s2) 0 0; font-size: var(--fs-xs); color: var(--text-3); }

/* 刷新按钮忙碌态 */
.status-refresh.is-busy { color: var(--accent); border-color: var(--border-strong); }
.status-refresh.is-busy svg { animation: status-spin .8s linear infinite; }
@keyframes status-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .status__card { padding: var(--s3); }
}

@media (prefers-reduced-motion: reduce) {
  .status-skeleton__line,
  .status-skeleton__bar { animation: none; }
  .status__dot { animation: none !important; }
  .status-refresh.is-busy svg { animation: none; }
}

/* ==========================================================================
   9. 评论
   ========================================================================== */

.comments { margin-top: var(--s7); padding-top: var(--s6); border-top: 1px solid var(--border); }
.comments__title { font-size: var(--fs-h3); margin-bottom: var(--s5); }
.comment-list { list-style: none; }
.comment-list .comment-list { margin-left: var(--s5); padding-left: var(--s4); border-left: 1px solid var(--border); }
.comment-body { padding: var(--s4) 0; border-bottom: 1px solid var(--border); }
.comment-body:last-child { border-bottom: 0; }
.comment-children {
  list-style: none; margin: 0 0 0 var(--s4);
  padding-left: var(--s4); border-left: 1px solid var(--border);
}
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); font-size: var(--fs-xs); color: var(--text-3); margin-bottom: var(--s2); }
.comment-author { font-weight: 600; color: var(--text); font-size: var(--fs-sm); }
.comment-author cite { font-style: normal; }
.comment-content { font-size: var(--fs-sm); color: var(--text-2); }
.comment-content p { margin: 0 0 var(--s2); }
.comment-reply { font-size: var(--fs-xs); }
.cancel-comment-reply { margin-bottom: var(--s2); font-size: var(--fs-xs); }

.comment-form { margin-top: var(--s6); }
.comment-form .field { margin-bottom: var(--s4); }
.comment-form label { display: block; margin-bottom: var(--s2); font-size: var(--fs-sm); color: var(--text-2); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 10px var(--s3);
  font-family: inherit; font-size: var(--fs-sm); color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color .18s ease;
}
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.comment-form textarea { min-height: 120px; resize: vertical; }

/* ==========================================================================
   10. 页脚
   ========================================================================== */

.site-footer {
  margin-top: var(--s8); padding: var(--s6) 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--s4); font-size: var(--fs-sm); color: var(--text-3);
}
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--accent); }
.site-footer__links { display: flex; gap: var(--s4); }

/* 回到顶部 */
.to-top {
  position: fixed; right: var(--s5); bottom: var(--s5);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ==========================================================================
   11. 响应式
   ========================================================================== */

@media (max-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }

  .sidebar { position: static; }
  .sidebar__toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: var(--s3) var(--s4); margin-bottom: var(--s4);
    font-size: var(--fs-sm); font-weight: 550; color: var(--text);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r); cursor: pointer;
  }
  .sidebar__toggle svg { width: 16px; height: 16px; transition: transform .2s ease; }
  .sidebar__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .sidebar__body { display: none; }
  .sidebar__body.is-open { display: block; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 var(--s4); }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 60px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch;
    gap: 0; margin: 0; padding: var(--s2);
    background: var(--surface); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-2);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: var(--s3) var(--s4); }
  .nav__link.is-active::after { display: none; }
  .site-header__inner { position: relative; }

  .hero { padding: var(--s7) 0 var(--s6); }
  .layout { padding: var(--s5) 0 var(--s6); }
  .post-card { padding: var(--s4) 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
