/* ==========================================================================
   副业网 · 前台样式
   设计方向：编辑部（editorial）· 浅色纸感 · 墨绿 / 赤陶
   图标全部为内联 SVG，不使用 emoji
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  /* 纸面 */
  --paper:        #FBFAF7;
  --paper-warm:   #F4F0E6;
  --paper-deep:   #EDE8DB;
  --surface:      #FFFFFF;

  /* 墨色 */
  --ink:          #1A1917;
  --ink-2:        #4A4842;
  --ink-3:        #77736A;
  --ink-4:        #A5A094;

  /* 线条 */
  --line:         #E4DFD4;
  --line-strong:  #D3CCBC;

  /* 品牌 */
  --brand:        #1F4E4A;
  --brand-dark:   #163B38;
  --brand-mid:    #2E635D;
  --brand-soft:   #E7EFEC;

  /* 强调 */
  --accent:       #B4432A;
  --accent-soft:  #F7E9E3;
  --gold:         #8C6A2B;

  /* 字体 */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "HarmonyOS Sans SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* 尺寸 */
  --container: 1180px;
  --container-pad: 28px;
  --measure: 700px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-full: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
time { font-variant-numeric: tabular-nums; }

::selection { background: var(--brand); color: var(--paper); }

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

.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;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper); padding: 10px 16px; font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--container-pad) * 2);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}
.container--wide { max-width: 1320px; }

.dot { color: var(--ink-4); margin: 0 2px; }

/* ---------- 3. 页头 ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s var(--ease);
}
.masthead.is-scrolled { box-shadow: 0 8px 26px -18px rgba(26, 25, 23, 0.35); }

.masthead__top {
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}
.masthead__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 32px;
}
.masthead__issue { color: var(--ink-4); }
.masthead__top-link { color: var(--ink-3); transition: color 0.2s; }
.masthead__top-link:hover { color: var(--brand); }

.masthead__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 78px;
}

.brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.brand__mark {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
  white-space: nowrap;
}
.brand__tagline {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__link {
  position: relative;
  padding: 8px 12px;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: color 0.2s;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 1.5px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--brand); font-weight: 600; }

.masthead__actions { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  color: var(--ink-2);
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--paper-warm); color: var(--brand); }
.menu-btn { display: none; }

/* ---------- 4. 移动抽屉 ---------- */
.drawer { position: fixed; inset: 0; z-index: 120; }
.drawer[hidden] { display: none; }
.drawer__scrim {
  position: absolute; inset: 0;
  background: rgba(26, 25, 23, 0.4);
  backdrop-filter: blur(2px);
  animation: fade-in 0.25s var(--ease);
}
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(84vw, 360px);
  background: var(--paper);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 20px 28px;
  animation: slide-in 0.3s var(--ease);
  overflow-y: auto;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__brand { font-family: var(--font-serif); font-size: 20px; font-weight: 700; letter-spacing: 0.04em; }

.drawer__search {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-3);
}
.drawer__search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14.5px;
}

.drawer__nav { display: flex; flex-direction: column; margin-top: 12px; }
.drawer__nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  color: var(--ink-2);
}
.drawer__nav a span { font-size: 11.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.drawer__nav a.is-active { color: var(--brand); font-weight: 600; }

.drawer__foot { margin-top: auto; padding-top: 28px; font-size: 12.5px; color: var(--ink-3); }
.drawer__foot a { color: var(--brand); }

body.no-scroll { overflow: hidden; }

/* ---------- 5. 首页 Hero ---------- */
.hero { padding: 62px 0 8px; }
.hero__eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.hero__eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--accent); flex: none;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.32;
  letter-spacing: -0.005em;
  font-weight: 700;
  max-width: 22em;
  margin-top: 22px;
  text-wrap: balance;
}
.hero__desc {
  max-width: 36em;
  margin-top: 20px;
  font-size: 16.5px;
  color: var(--ink-2);
  line-height: 1.9;
}

/* ---------- 6. 头版 ---------- */
.front {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  gap: 56px;
  padding-top: 44px;
  padding-bottom: 8px;
}

.lead { min-width: 0; }
.lead__cover {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--paper-deep);
}
.lead__cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.lead__cover:hover img { transform: scale(1.025); }

.lead__body { padding-top: 24px; }
.lead__kicker {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; color: var(--ink-3);
  margin-bottom: 14px;
}
.lead__kicker a { color: var(--brand); font-weight: 600; }
.tag-solid {
  display: inline-block;
  background: var(--accent);
  color: #FFF7F3;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: 1px;
}
.lead__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.7vw, 2.1rem);
  line-height: 1.42;
  font-weight: 700;
  letter-spacing: -0.005em;
}
.lead__title a { transition: color 0.2s; }
.lead__title a:hover { color: var(--brand); }
.lead__excerpt {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.85;
  max-width: 40em;
}
.lead__meta {
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--ink-3);
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px;
}

/* 侧栏 */
.front__side { min-width: 0; padding-left: 40px; border-left: 1px solid var(--line); }

.side-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}
.side-head h2 {
  font-size: 14px;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.side-head span { font-size: 11px; color: var(--ink-4); }

.hot__list { list-style: none; }
.hot__list li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.hot__num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.hot__list a {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  transition: color 0.2s;
}
.hot__list a:hover { color: var(--brand); }
.hot__views {
  font-size: 10.5px;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

.tagbox { margin-top: 34px; }
.tagbox__list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tagchip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.tagchip span { font-size: 10px; color: var(--ink-4); }
.tagchip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ---------- 7. 分类条 ---------- */
.chips {
  display: flex;
  gap: 9px;
  padding-top: 36px;
  padding-bottom: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.chip span { font-size: 10.5px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip.is-active span { color: rgba(251, 250, 247, 0.6); }

/* ---------- 8. 列表 ---------- */
.feed { padding-top: 40px; padding-bottom: 12px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  margin-bottom: 30px;
}
.section-head h2 { font-size: 18px; letter-spacing: 0.03em; }
.section-head__note { font-size: 12px; color: var(--ink-3); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 32px;
}

.card { min-width: 0; display: flex; flex-direction: column; }
.card__cover {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--paper-deep);
  margin-bottom: 15px;
}
.card__cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.card__cover:hover img { transform: scale(1.03); }

.card__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.card__meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px;
  color: var(--ink-4);
  margin-bottom: 8px;
}
.card__cat { color: var(--brand); font-weight: 600; letter-spacing: 0.02em; }
.card__title {
  font-size: 17px;
  line-height: 1.52;
  font-weight: 700;
  letter-spacing: -0.002em;
}
.card__title a { transition: color 0.2s; }
.card__title a:hover { color: var(--brand); }
.card__excerpt {
  margin-top: 9px;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__foot {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--ink-4);
  display: flex; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums;
}

/* 程序化封面（无图时的栏目章） */
.ph {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 16px;
  overflow: hidden;
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0) 58%);
}
.ph::after {
  content: "";
  position: absolute;
  right: -18%;
  bottom: -46%;
  width: 78%;
  height: 118%;
  border: 1px solid rgba(31, 78, 74, 0.14);
  transform: rotate(-20deg);
}
.ph__kicker {
  position: relative;
  z-index: 1;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.78;
  align-self: flex-start;
}
.ph__glyph {
  position: absolute;
  right: 10px;
  bottom: -6px;
  font-family: var(--font-serif);
  font-size: clamp(52px, 7vw, 76px);
  line-height: 1;
  font-weight: 700;
  opacity: 0.18;
  z-index: 0;
}
.ph--lg .ph__glyph { font-size: clamp(88px, 12vw, 148px); right: 24px; bottom: -18px; }
.ph--lg .ph__kicker { font-size: 11px; padding: 18px 20px; align-self: flex-start; }

.ph--0 { background: #E7EFEC; color: #1F4E4A; }
.ph--1 { background: #F7E7E0; color: #A8452C; }
.ph--2 { background: #F3EBD6; color: #7E6128; }
.ph--3 { background: #E7EDF3; color: #3B4C60; }
.ph--4 { background: #EAEEDC; color: #4F5C39; }

/* 头版大图：保留深色，作为版面重心 */
.ph--lg { background: var(--brand) !important; color: #EFE9DB !important; }
.ph--lg::before { background: linear-gradient(140deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 58%); }
.ph--lg::after { border-color: rgba(255, 255, 255, 0.2); }
.ph--lg .ph__glyph { opacity: 0.22; }

/* 图片加载失败时的兜底，不改变原有布局 */
.ph-fallback {
  background: var(--paper-warm) !important;
  position: relative;
  overflow: hidden;
}
.ph-fallback .ph__glyph {
  position: absolute;
  right: 8px;
  bottom: -4px;
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  color: var(--brand);
  opacity: 0.18;
}

/* ---------- 9. 分页 ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 54px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.pager__num, .pager__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px; height: 36px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-variant-numeric: tabular-nums;
}
.pager__num:hover, .pager__step:hover { border-color: var(--ink); color: var(--ink); }
.pager__num.is-current { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.pager__step.is-disabled { color: var(--ink-4); border-color: var(--line); cursor: not-allowed; }
.pager__gap { color: var(--ink-4); padding: 0 2px; font-size: 12px; }

/* ---------- 10. 投稿条 ---------- */
.invite { margin-top: 64px; }
.invite__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 44px 46px;
  background: var(--paper-warm);
  border-left: 3px solid var(--brand);
}
.invite__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.invite__text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.5;
  letter-spacing: 0.005em;
}
.invite__text p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-2);
  max-width: 46em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.btn--primary { background: var(--brand); color: var(--paper); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--light { background: var(--surface); border-color: var(--line-strong); color: var(--brand); }
.btn--light:hover { border-color: var(--brand); background: var(--brand-soft); }
.btn--sm { padding: 8px 14px; font-size: 12.5px; }

/* ---------- 11. 页脚 ---------- */
.footer {
  margin-top: 80px;
  background: var(--brand-dark);
  color: rgba(251, 250, 247, 0.66);
}
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  padding-top: 58px;
  padding-bottom: 42px;
}
.footer__mark {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--paper);
}
.footer__brand p { margin-top: 8px; font-size: 13px; }
.footer__desc { color: rgba(251, 250, 247, 0.45) !important; max-width: 26em; line-height: 1.8; margin-top: 14px !important; }

.footer__col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.footer__col h3 {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: rgba(251, 250, 247, 0.38);
  margin-bottom: 4px;
}
.footer__col a, .footer__static { font-size: 13.5px; color: rgba(251, 250, 247, 0.7); transition: color 0.2s; }
.footer__col a:hover { color: var(--paper); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
  padding-bottom: 22px;
  border-top: 1px solid rgba(251, 250, 247, 0.12);
  font-size: 11.5px;
  color: rgba(251, 250, 247, 0.42);
}
.footer__legal { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__legal a:hover { color: var(--paper); }

/* ---------- 12. 页头（内页） ---------- */
.page-head { padding: 46px 0 30px; }
.crumb {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px;
  color: var(--ink-4);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.crumb a { color: var(--ink-3); transition: color 0.2s; }
.crumb a:hover { color: var(--brand); }

.page-head__kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}
.page-head__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  line-height: 1.38;
  letter-spacing: 0.005em;
  margin-top: 12px;
}
.page-head__desc {
  margin-top: 14px;
  font-size: 15.5px;
  color: var(--ink-2);
  max-width: 40em;
  line-height: 1.85;
}
.page-head__note { margin-top: 16px; font-size: 12px; color: var(--ink-4); }

/* 搜索框 */
.search-form {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  max-width: 640px;
}
.search-form input {
  flex: 1; min-width: 0;
  padding: 12px 15px;
  font-size: 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- 13. 文章页 ---------- */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  z-index: 100;
  transition: width 0.1s linear;
}

.article__head { padding: 44px 0 34px; }
.article__head-inner { max-width: 860px; margin: 0 auto; padding-left: var(--container-pad); padding-right: var(--container-pad); }

.article__title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.6vw, 2.55rem);
  line-height: 1.4;
  letter-spacing: -0.004em;
  margin-top: 6px;
  text-wrap: balance;
  max-width: 24em;
}
.article__summary {
  margin-top: 20px;
  padding-left: 18px;
  border-left: 3px solid var(--brand);
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.85;
  max-width: 36em;
}
.article__meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  margin-top: 24px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.badge-draft {
  margin-left: 10px;
  font-size: 10.5px;
  padding: 2px 7px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 1px;
}

.article__cover { margin: 6px 0 0; }
.article__cover img {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.article__layout { padding-top: 46px; padding-bottom: 8px; }

/* 正文 */
.article__body {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: 17.5px;
  line-height: 1.95;
  color: #2C2A26;
  letter-spacing: 0.012em;
  counter-reset: h2;
  overflow-wrap: break-word;
}
.article__body > *:first-child { margin-top: 0; }
.article__body p { margin: 0 0 1.45em; }
.article__body p + p { margin-top: -0.2em; }

.article__body h2 {
  counter-increment: h2;
  position: relative;
  font-family: var(--font-sans);
  font-size: 1.28em;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.005em;
  margin: 2.5em 0 0.85em;
  padding-left: 2.5em;
  color: var(--ink);
}
.article__body h2::before {
  content: counter(h2, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.42em;
  font-family: var(--font-mono);
  font-size: 0.62em;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.article__body h2::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1.05em;
  height: 1px;
  background: var(--line);
}

.article__body h3 {
  font-size: 1.08em;
  font-weight: 700;
  margin: 2em 0 0.6em;
  line-height: 1.6;
}
.article__body h4 { font-size: 1em; margin: 1.6em 0 0.5em; }

.article__body a {
  color: var(--brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(31, 78, 74, 0.35);
  transition: text-decoration-color 0.2s;
}
.article__body a:hover { text-decoration-color: var(--brand); }

.article__body strong, .article__body b { font-weight: 700; color: var(--ink); }

.article__body ul, .article__body ol { margin: 0 0 1.5em; padding-left: 1.35em; }
.article__body li { margin: 0.5em 0; padding-left: 0.2em; }
.article__body li::marker { color: var(--brand); }
.article__body ul li::marker { font-size: 0.9em; }

.article__body blockquote {
  margin: 2.1em 0;
  padding: 2px 0 2px 24px;
  border-left: 2px solid var(--brand);
  color: var(--ink-2);
  font-size: 1.02em;
  line-height: 1.9;
}
.article__body blockquote p:last-child { margin-bottom: 0; }

.article__body img { margin: 2em auto; border-radius: var(--radius-sm); }
.article__body figure { margin: 2.4em 0; }
.article__body figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.72em;
  color: var(--ink-4);
  line-height: 1.7;
}

.article__body hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 3em 0;
}
.article__body code {
  background: var(--paper-warm);
  padding: 2px 6px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.86em;
}
.article__body pre {
  background: var(--paper-warm);
  padding: 18px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.8em 0;
  font-size: 0.86em;
  line-height: 1.7;
}
.article__body pre code { background: none; padding: 0; }

.article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 0.9em;
}
.article__body th, .article__body td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}
.article__body th { font-weight: 700; border-bottom-color: var(--line-strong); }

.article__foot { margin-top: 20px; }
.article__end {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 0 28px;
}
.article__end span { width: 4px; height: 4px; background: var(--line-strong); border-radius: 50%; }
.article__end span:nth-child(2) { background: var(--brand); }

.article__meta-foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.article__source { margin-top: 16px; font-size: 12.5px; color: var(--ink-3); }
.article__source a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.article__actions { margin-top: 20px; }

/* 相关阅读 */
.related { margin-top: 52px; padding: 48px 0 52px; background: var(--paper-warm); }
.related .section-head { border-top-color: var(--ink); margin-bottom: 24px; }
.related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rel-card {
  display: flex; flex-direction: column; gap: 9px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.22s, transform 0.22s var(--ease);
  min-width: 0;
}
.rel-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.rel-card__cat { font-size: 10.5px; letter-spacing: 0.12em; color: var(--brand); }
.rel-card__title { font-size: 15.5px; font-weight: 700; line-height: 1.55; }
.rel-card__meta { font-size: 11.5px; color: var(--ink-4); margin-top: auto; }

/* 上下篇 */
.prevnext { border-top: 1px solid var(--line); }
.prevnext__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.prevnext__item { display: flex; flex-direction: column; gap: 6px; padding: 26px 0; min-width: 0; }
.prevnext__item--next { text-align: right; align-items: flex-end; }
.prevnext__label { font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-4); }
.prevnext__title { font-size: 14.5px; line-height: 1.55; color: var(--ink-2); transition: color 0.2s; }
a.prevnext__item:hover .prevnext__title { color: var(--brand); }

/* ---------- 14. 关于页 ---------- */
.about { padding-bottom: 20px; }
.about__body {
  max-width: var(--measure);
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.95;
  color: #2C2A26;
  padding-bottom: 20px;
}
.about__body h2 {
  font-size: 1.18em;
  margin: 2.1em 0 0.7em;
  padding-bottom: 0.5em;
  border-bottom: 1px solid var(--line);
}
.about__body h2:first-child { margin-top: 0.2em; }
.about__body p { margin-bottom: 1.3em; }
.about__body ul, .about__body ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.about__body li { margin: 0.45em 0; }
.about__body li::marker { color: var(--brand); }
.about__body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.about__body blockquote {
  margin: 1.8em 0; padding-left: 20px; border-left: 2px solid var(--brand); color: var(--ink-2);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 56px;
  margin: 56px 0 40px;
  padding: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.contact__eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.contact h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  line-height: 1.45;
}
.contact__intro > p { margin-top: 14px; font-size: 14.5px; color: var(--ink-2); line-height: 1.85; }
.contact__facts { list-style: none; margin-top: 26px; }
.contact__facts li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 11px 0;
  border-top: 1px dashed var(--line-strong);
  font-size: 13.5px;
}
.contact__facts li span { flex: none; width: 40px; font-size: 11.5px; color: var(--ink-4); letter-spacing: 0.08em; }
.contact__facts li em { font-style: normal; color: var(--ink-2); }
.contact__facts li a { color: var(--brand); }

.form__row { margin-bottom: 18px; }
.form__row label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}
.form__row label span { color: var(--ink-4); font-size: 11.5px; }
.form__row input, .form__row textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: 14.5px;
  line-height: 1.6;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form__row input:focus, .form__row textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__note { margin-top: 14px; font-size: 11.5px; color: var(--ink-4); line-height: 1.7; }

.alert {
  padding: 11px 14px;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  border-left: 3px solid;
}
.alert--success { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.alert--error { background: var(--accent-soft); border-color: var(--accent); color: #8C3122; }

/* ---------- 15. 空状态 / 404 ---------- */
.empty {
  padding: 70px 24px;
  text-align: center;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--line-strong);
  background: var(--surface);
}
.empty svg { color: var(--ink-4); }
.empty p { font-size: 14.5px; }
.empty__hint { font-size: 12.5px !important; color: var(--ink-4); }
.empty .btn { margin-top: 8px; }

.notfound { padding: 13vh 0 16vh; }
.notfound__code {
  font-family: var(--font-serif);
  font-size: clamp(72px, 12vw, 120px);
  line-height: 1;
  color: var(--paper-deep);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.notfound__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  margin-top: 18px;
}
.notfound__desc { margin-top: 12px; color: var(--ink-2); font-size: 15px; max-width: 34em; }
.notfound__actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ---------- 16. 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  width: 42px; height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink-2);
  box-shadow: 0 6px 22px -12px rgba(26, 25, 23, 0.4);
  transition: color 0.2s, border-color 0.2s, opacity 0.2s;
}
.to-top:hover { color: var(--brand); border-color: var(--brand); }
.to-top[hidden] { display: none; }

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1080px) {
  .front { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; }
  .front__side { padding-left: 30px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__inner { grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(0, 1fr)); gap: 36px; }
}

@media (max-width: 920px) {
  :root { --container-pad: 22px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }

  .front { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .front__side { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 28px; }
  .hot__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

  /* 平板宽度下头图收窄比例，避免一屏只看到半张图 */
  .lead__cover { aspect-ratio: 2 / 1; }

  .article__layout { padding-top: 36px; }
  .contact { grid-template-columns: 1fr; gap: 32px; padding: 32px; }
}

@media (max-width: 720px) {
  .masthead__top { display: none; }
  .masthead__main { min-height: 62px; gap: 12px; }
  .brand { gap: 0; }
  .brand__mark { font-size: 22px; }
  .brand__tagline { display: none; }
  .icon-btn { width: 38px; height: 38px; }

  .hero { padding: 34px 0 4px; }
  .hero__title { font-size: clamp(1.55rem, 6.4vw, 2rem); margin-top: 16px; line-height: 1.42; }
  .hero__desc { font-size: 14.5px; margin-top: 14px; line-height: 1.85; }
  .hero__eyebrow { font-size: 10px; }

  .front { padding-top: 30px; gap: 32px; }
  .lead__cover { aspect-ratio: 16 / 10; }
  .lead__title { font-size: 1.32rem; line-height: 1.48; }
  .lead__excerpt { font-size: 14px; }
  .lead__body { padding-top: 18px; }

  .hot__list { grid-template-columns: 1fr; }
  .chips { padding-top: 28px; }

  .feed { padding-top: 30px; }
  .section-head { margin-bottom: 22px; }
  .section-head h2 { font-size: 16px; }

  /* 手机端卡片改为横向列表，信息密度更高 */
  .post-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .card:first-child { padding-top: 0; }
  .card__cover { margin-bottom: 0; aspect-ratio: 1 / 1; }
  .card__title { font-size: 15.5px; line-height: 1.5; }
  .card__excerpt { display: none; }
  .card__meta { margin-bottom: 5px; font-size: 10.5px; gap: 7px; }
  .card__foot { margin-top: 7px; font-size: 10.5px; }
  .ph__glyph { font-size: 40px; right: 6px; bottom: -4px; }
  .ph__kicker { font-size: 8.5px; letter-spacing: 0.12em; padding: 10px; }
  .post-grid .ph, .post-grid .ph--lg { position: absolute; }

  .pager { margin-top: 34px; padding-top: 20px; gap: 5px; }
  .pager__num, .pager__step { min-width: 33px; height: 33px; padding: 0 9px; font-size: 12.5px; }

  .invite { margin-top: 44px; }
  .invite__inner { flex-direction: column; align-items: flex-start; gap: 22px; padding: 28px 24px; }
  .invite__text h2 { font-size: 1.15rem; }

  .footer { margin-top: 52px; }
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px 24px;
    padding-top: 40px;
    padding-bottom: 28px;
  }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; font-size: 11px; }

  .page-head { padding: 30px 0 22px; }
  .page-head__title { font-size: 1.55rem; }
  .crumb { margin-bottom: 14px; }
  .search-form { margin-top: 18px; gap: 8px; }
  .search-form .btn span { display: none; }
  .search-form .btn { padding: 12px 14px; }

  .article__head { padding: 28px 0 24px; }
  .article__title { font-size: 1.55rem; line-height: 1.46; }
  .article__summary { font-size: 14.5px; padding-left: 14px; margin-top: 16px; }
  .article__meta { font-size: 11.5px; margin-top: 18px; }
  .article__cover img { aspect-ratio: 16 / 10; }
  .article__layout { padding-top: 30px; }
  .article__body { font-size: 16.5px; line-height: 1.92; letter-spacing: 0.014em; }
  .article__body h2 { font-size: 1.16em; padding-left: 1.95em; margin: 2.1em 0 0.75em; }
  .article__body h2::before { font-size: 0.58em; }
  .article__body blockquote { padding-left: 16px; font-size: 0.98em; }

  .related { margin-top: 38px; padding: 34px 0 38px; }
  .related__grid { grid-template-columns: 1fr; gap: 12px; }
  .rel-card { padding: 17px 18px; }
  .prevnext__inner { grid-template-columns: 1fr; gap: 0; }
  .prevnext__item { padding: 18px 0; border-bottom: 1px solid var(--line); }
  .prevnext__item--next { text-align: left; align-items: flex-start; }

  .contact { margin: 36px 0 24px; padding: 24px 20px; }
  .notfound { padding: 9vh 0 12vh; }
  .to-top { right: 16px; bottom: 16px; width: 38px; height: 38px; }
}

@media (max-width: 380px) {
  .post-grid .card { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
  .card__title { font-size: 14.5px; }
}

/* ---------- 18. 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 19. 打印 ---------- */
@media print {
  .masthead, .footer, .related, .prevnext, .to-top, .drawer, .read-progress, .article__actions { display: none !important; }
  body { background: #fff; color: #000; }
  .article__body { font-size: 12pt; max-width: none; }
}
