@charset "UTF-8";
/* ==========================================================================
   内容站前台样式 · v2
   设计基调：纸感底、墨色字、朱红点睛；靠留白和层级说话，不靠阴影和圆角堆砌。
   适配：移动优先，640 / 900 / 1200 三个断点，字号用 clamp() 流体缩放。
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
  --ink:        #14161A;
  --ink-2:      #414750;
  --ink-3:      #7C838D;
  --ink-4:      #A8AEB7;
  --paper:      #FBFAF7;
  --paper-2:    #F4F1EA;
  --paper-3:    #EDE9DF;
  --line:       #E6E2D9;
  --line-2:     #D6D0C2;
  --accent:     #BC4630;
  --accent-2:   #9E3722;
  --accent-soft:#F7EAE6;
  --ok:         #2F7A55;
  --warn:       #A8761C;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --radius: 6px;
  --radius-lg: 10px;

  --shadow-sm: 0 1px 2px rgba(20, 22, 26, .04);
  --shadow:    0 2px 10px rgba(20, 22, 26, .06);
  --shadow-lg: 0 8px 32px rgba(20, 22, 26, .10);
}

[data-theme="dark"] {
  --ink:        #ECEAE5;
  --ink-2:      #C2C6CC;
  --ink-3:      #8D949E;
  --ink-4:      #6A717B;
  --paper:      #14161A;
  --paper-2:    #1B1E23;
  --paper-3:    #23272D;
  --line:       #2C3138;
  --line-2:     #3A4048;
  --accent:     #E0705A;
  --accent-2:   #F08570;
  --accent-soft:#2A1D1A;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow:    0 2px 10px rgba(0, 0, 0, .35);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .5);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---------------------------------------------------------------- layout */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}
.wrap-narrow { max-width: var(--wrap-narrow); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 34px);
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: var(--accent);
  color: #FDF7EC;
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 5px; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
  margin-left: auto;
  min-width: 0;
}
.nav a {
  position: relative;
  font-size: 14.5px;
  color: var(--ink-2);
  padding: 6px 0;
  white-space: nowrap;
  transition: color .18s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.head-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-2);
  transition: background .16s, color .16s;
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }

.burger { display: none; }

/* 移动端抽屉 */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
}
.drawer[data-open="1"] { display: block; }
.drawer-veil {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 17, .45);
  backdrop-filter: blur(2px);
  animation: fade .2s ease;
}
.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(84vw, 320px);
  background: var(--paper);
  padding: 20px;
  overflow-y: auto;
  animation: slideIn .26s cubic-bezier(.2,.7,.3,1);
  box-shadow: var(--shadow-lg);
}
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.drawer-panel nav { display: flex; flex-direction: column; }
.drawer-panel nav a {
  padding: 13px 4px;
  font-size: 15.5px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-panel nav a span { color: var(--ink-4); font-size: 13px; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideIn { from { transform: translateX(100%) } to { transform: translateX(0) } }

/* ---------------------------------------------------------------- hero */
.hero {
  border-bottom: 1px solid var(--line);
  padding: clamp(30px, 6vw, 68px) 0 clamp(30px, 5vw, 54px);
  background:
    radial-gradient(120% 90% at 78% 0%, var(--accent-soft) 0%, transparent 58%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-kicker::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--accent);
}

.hero-title {
  font-size: clamp(28px, 5.2vw, 48px);
  line-height: 1.3;
  letter-spacing: -.022em;
  font-weight: 800;
  margin-bottom: 16px;
  text-wrap: balance;
}
.hero-title a:hover { color: var(--accent); }

.hero-desc {
  font-size: clamp(14.5px, 1.7vw, 16.5px);
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 46ch;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--ink-3);
}

.hero-cover {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  background: var(--paper-2);
  box-shadow: var(--shadow);
}
.hero-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2,.7,.3,1);
}
.hero:hover .hero-cover img { transform: scale(1.03); }

/* ---------------------------------------------------------------- section */
.section { padding: clamp(34px, 5vw, 62px) 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 32px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -.015em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: "";
  width: 3px; height: 1.05em;
  background: var(--accent);
  border-radius: 2px;
}
.section-more {
  font-size: 13.5px;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .16s, gap .16s;
}
.section-more:hover { color: var(--accent); gap: 8px; }

/* ---------------------------------------------------------------- 文章卡片 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(20px, 2.6vw, 34px);
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: transform .2s;
}
.post-card:hover { transform: translateY(-2px); }

.post-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  background: var(--paper-2);
  margin-bottom: 14px;
}
.post-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}
.post-card:hover .post-thumb img { transform: scale(1.04); }

.post-body { display: flex; flex-direction: column; gap: 8px; flex: 1; }

.post-cat {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent);
  padding: 2px 9px;
  border-radius: 3px;
  background: var(--accent-soft);
  transition: background .16s, color .16s;
}
.post-cat:hover { background: var(--accent); color: #fff; }

.post-title {
  font-size: clamp(16px, 1.9vw, 18px);
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: -.008em;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* 整卡可点：标题链接的伪元素铺满卡片 */
.post-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.post-title a:hover { color: var(--accent); }

.post-excerpt {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: auto;
  padding-top: 8px;
}
.post-meta .dot::before { content: "·"; margin: 0 2px; }

/* 列表式（栏目页 / 搜索结果） */
.post-list { display: flex; flex-direction: column; gap: 0; }

.post-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: clamp(16px, 3vw, 32px);
  padding: clamp(18px, 2.4vw, 26px) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.post-item:first-child { border-top: 1px solid var(--line); }

.post-item .post-body { gap: 9px; }
.post-item .post-item-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  background: var(--paper-2);
  order: 2;
}
.post-item .post-item-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.post-item:hover .post-item-thumb img { transform: scale(1.05); }

/* ---------------------------------------------------------------- 侧栏 */
.with-aside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.aside { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 26px; }

.widget {
  padding: 20px;
  background: var(--paper-2);
  border-radius: var(--radius);
}
.widget-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.widget-list { display: flex; flex-direction: column; gap: 12px; }
.widget-list a {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  display: flex;
  gap: 10px;
  transition: color .16s;
}
.widget-list a:hover { color: var(--accent); }
.widget-list .n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-4);
  flex-shrink: 0;
  padding-top: 3px;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  font-size: 13px;
  padding: 5px 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-2);
  transition: all .16s;
}
.tag-cloud a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- 文章详情 */
.article-head {
  padding: clamp(28px, 4vw, 52px) 0 clamp(20px, 3vw, 30px);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper-2) 0%, var(--paper) 100%);
}

.crumbs { font-size: 13px; color: var(--ink-4); margin-bottom: 18px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--line-2); }
.crumbs a:hover { color: var(--accent); }

.article-title {
  font-size: clamp(25px, 4.4vw, 40px);
  line-height: 1.32;
  letter-spacing: -.022em;
  font-weight: 800;
  margin-bottom: 18px;
  text-wrap: balance;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.article-meta .sep { width: 1px; height: 12px; background: var(--line-2); }

.article-cover {
  margin: clamp(22px, 3vw, 32px) 0 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  background: var(--paper-2);
}

/* 正文排版：这里是读者停留最久的地方，节奏比花哨重要 */
.prose {
  font-size: clamp(16px, 1.85vw, 17.5px);
  line-height: 1.95;
  color: var(--ink-2);
  letter-spacing: .005em;
  padding: clamp(28px, 4vw, 44px) 0;
}
.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  font-size: clamp(19px, 2.4vw, 23px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.5;
  margin-top: 2.1em;
  padding-left: 13px;
  border-left: 3px solid var(--accent);
  letter-spacing: -.012em;
}
.prose h3 {
  font-size: clamp(17px, 2vw, 19px);
  font-weight: 650;
  color: var(--ink);
  margin-top: 1.8em;
  line-height: 1.55;
}
.prose h4 { font-size: 17px; font-weight: 600; color: var(--ink); margin-top: 1.6em; }

.prose p { margin: 0; }

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transition: text-decoration-color .16s;
}
.prose a:hover { text-decoration-color: var(--accent); }

.prose strong { color: var(--ink); font-weight: 650; }

.prose ul, .prose ol { padding-left: 1.35em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin: .45em 0; padding-left: .2em; }
.prose li::marker { color: var(--accent); }

.prose blockquote {
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--line-2);
  color: var(--ink-3);
  font-style: normal;
}
.prose blockquote p { margin: 0; }

.prose img {
  border-radius: var(--radius);
  margin: 1.6em auto;
  box-shadow: var(--shadow-sm);
}

.prose code {
  font-family: var(--mono);
  font-size: .87em;
  background: var(--paper-3);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--accent-2);
}
.prose pre {
  background: var(--paper-3);
  padding: 18px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.7;
}
.prose pre code { background: none; padding: 0; color: inherit; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  display: block;
  overflow-x: auto;
}
.prose th, .prose td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
.prose th { background: var(--paper-2); font-weight: 650; color: var(--ink); }

.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }

/* 文末 */
.article-foot {
  border-top: 1px solid var(--line);
  padding: clamp(22px, 3vw, 32px) 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article-tags a {
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--paper-2);
  color: var(--ink-2);
  transition: all .16s;
}
.article-tags a:hover { background: var(--accent-soft); color: var(--accent); }

/* 相关推荐 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: clamp(16px, 2.4vw, 26px);
}
.related-grid .post-title { font-size: 15.5px; }
.related-grid .post-thumb { aspect-ratio: 1200 / 630; margin-bottom: 10px; }

/* ---------------------------------------------------------------- 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: clamp(28px, 4vw, 44px) 0;
  flex-wrap: wrap;
}
.pager a, .pager span {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  transition: all .16s;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .is-current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager .gap { border: 0; background: none; color: var(--ink-4); min-width: 24px; padding: 0 2px; }
.pager .is-off { opacity: .4; pointer-events: none; }

/* ---------------------------------------------------------------- 搜索 */
.search-box {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin-top: 20px;
}
.search-box input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  transition: border-color .16s, box-shadow .16s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-box button {
  height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .16s;
}
.search-box button:hover { background: var(--accent); }

/* ---------------------------------------------------------------- 空状态 */
.empty {
  text-align: center;
  padding: clamp(48px, 9vw, 100px) 20px;
  color: var(--ink-3);
}
.empty h2 { font-size: 20px; color: var(--ink); margin-bottom: 10px; font-weight: 650; }
.empty p { font-size: 14.5px; margin-bottom: 22px; }
.empty .btn { display: inline-flex; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 42px;
  padding: 0 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--paper);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .16s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink-2);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: transparent; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }

/* ---------------------------------------------------------------- 页脚 */
.site-foot {
  border-top: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 80px);
  padding: clamp(34px, 5vw, 54px) 0 28px;
  background: var(--paper-2);
  font-size: 14px;
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(130px, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 32px;
}
.foot-brand { font-weight: 700; font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 9px; }
.foot-desc { color: var(--ink-3); line-height: 1.8; max-width: 34ch; font-size: 13.5px; }
.foot-col h4 {
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 12px;
  font-weight: 600;
}
.foot-col a {
  display: block;
  padding: 5px 0;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: color .16s;
}
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: var(--ink-4);
}

/* ---------------------------------------------------------------- 工具类 */
.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;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 3px;
  font-weight: 600;
  white-space: nowrap;
}
.tag-red   { background: #FBEAE6; color: #A83A26; }
.tag-green { background: #E6F2EB; color: #2A6B4C; }
.tag-amber { background: #FBF1DC; color: #92650F; }
.tag-gray  { background: var(--paper-3); color: var(--ink-3); }
.tag-blue  { background: #E8EEF9; color: #31538F; }

/* 入场动效：只做一次，不打断阅读 */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- 响应式 */
@media (max-width: 1080px) {
  .with-aside { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; flex-direction: row; flex-wrap: wrap; }
  .aside > * { flex: 1 1 240px; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .hero-cover { order: -1; max-width: 520px; }
  .nav { display: none; }
  .burger { display: grid; margin-left: auto; }
  .head-inner { height: 60px; }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .post-item { grid-template-columns: minmax(0, 1fr) 118px; gap: 14px; }
  .post-item .post-excerpt { -webkit-line-clamp: 2; font-size: 13px; }
  .section-head { flex-wrap: wrap; }
  .search-box { flex-direction: column; }
  .search-box button { width: 100%; }
  .pager a, .pager span { min-width: 34px; height: 34px; font-size: 13px; }
  .article-meta { font-size: 12.5px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand-col { grid-column: 1 / -1; }
}
