/* ==========================================================================
   设计 05 · 简约留白
   --------------------------------------------------------------------------
   一句话：把装饰减到最少，把注意力还给内容。

   骨相
   · 纯白底 + 1px 细线，不用粗边、不用实心投影
   · 字号往上走（大标题 clamp 到 68px），留白往上走（版块间距 104px）
   · 灰阶承担全部结构，强调色只在「可点」与「当前」两处出现
   · 夜间是中性黑，不是蓝黑 —— 蓝黑会让白字发虚

   阅读优先
   · 正文行宽 68ch、行高 1.85、字号 17px
   · 正文色用 #0a0a0a 而不是纯黑 #000（纯黑配纯白边缘会发涩）
   ========================================================================== */

/* --------------------------------------------------------------------------
   1 · 设计令牌
   -------------------------------------------------------------------------- */

:root {
  --paper: #ffffff;
  --paper-2: #fafafa;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #f1f1f3;

  /* 正文不是纯黑：纯黑配纯白在细字重下边缘会发涩 */
  --ink: #0a0a0a;
  --ink-2: #3f3f46;
  --ink-3: #71717a;

  --line: #e7e7e9;
  --line-2: #d4d4d8;
  --line-3: #a1a1aa;

  /* 文字用的强调色对白底 6.7，软底上 6.0；装饰另给一个亮一档的 */
  --accent: #1d4ed8;
  --accent-2: #2563eb;
  --accent-soft: #eff3ff;

  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.05);
  --shadow: 0 12px 32px -18px rgba(9, 9, 11, 0.28);

  /* 顶栏半透明底 —— 用令牌而不是 color-mix()，老一点的 Safari 也认 */
  --header-bg: rgba(255, 255, 255, 0.82);

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Source Han Sans SC', 'Noto Sans CJK SC', sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono',
    'Courier New', monospace;

  --wrap: 1120px;
  --measure: 68ch;
  --radius: 8px;
  --radius-lg: 12px;
}

[data-theme='dark'] {
  --paper: #0a0a0a;
  --paper-2: #101012;
  --surface: #0f0f11;
  --surface-2: #17171a;
  --surface-3: #1d1d21;

  --ink: #f4f4f5;
  --ink-2: #b4b4bb;
  --ink-3: #8b8b93;

  --line: #232327;
  --line-2: #35353b;
  --line-3: #52525b;

  --accent: #7ea6ff;
  --accent-2: #93b4ff;
  --accent-soft: #14192b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.8);

  --header-bg: rgba(10, 10, 10, 0.82);
}

/* --------------------------------------------------------------------------
   2 · 基础
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  /* 锚点跳转时给顶栏留位置 */
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* 通用小标签 */
.pn-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
  white-space: nowrap;
}
.pn-chip-link:hover {
  border-color: var(--line-2);
  color: var(--ink);
}

.pn-dot {
  color: var(--ink-3);
}

/* 按钮 */
.pn-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
}
.pn-btn:hover {
  border-color: var(--line-3);
  background: var(--surface-2);
}
.pn-btn-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.pn-btn-primary:hover {
  border-color: var(--ink);
  background: var(--ink);
  opacity: 0.88;
}
.pn-btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}
.pn-btn-quiet:hover {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   3 · 顶栏
   -------------------------------------------------------------------------- */

.pn-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
}

.pn-header-inner {
  /* 主题切换器的下拉面板锚在这一层 —— 见第 4 节 */
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
}

.pn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.pn-brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--ink);
  /* 一个极小的几何记号，替代头像 —— 顶栏保持轻 */
  box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px var(--ink);
}
.pn-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.pn-brand-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pn-brand-sub {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.pn-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}
.pn-nav-item {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  white-space: nowrap;
  transition: color 0.16s, background 0.16s;
}
.pn-nav-item:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.pn-nav-item.is-active {
  color: var(--ink);
  font-weight: 600;
}

.pn-header-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.pn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.pn-toggle:hover {
  color: var(--ink);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.pn-toggle-icon {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid currentColor;
  /* 半明半暗：一眼看出是「切换明暗」 */
  background: linear-gradient(90deg, currentColor 0 50%, transparent 50% 100%);
}

/* --------------------------------------------------------------------------
   4 · 主题切换器（核心注入的标记，这里只做简约留白的皮肤）
      五套皮肤收进一个按钮，点开才是菜单。
   -------------------------------------------------------------------------- */

.theme-switch {
  display: inline-flex;
  align-items: center;
}

/* <summary> 自带的小三角要去掉，换成自己画的箭头 */
.theme-switch-trigger,
.theme-hero-trigger {
  list-style: none;
  cursor: pointer;
}
.theme-switch-trigger::-webkit-details-marker,
.theme-hero-trigger::-webkit-details-marker {
  display: none;
}
.theme-switch-trigger::marker,
.theme-hero-trigger::marker {
  content: '';
}

.theme-switch-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}
.theme-switch-trigger:hover {
  color: var(--ink);
  border-color: var(--line-2);
  background: var(--surface-2);
}
.theme-switch-label {
  color: var(--ink-3);
}
.theme-switch-current {
  color: var(--ink);
  font-weight: 500;
}
.theme-switch-caret {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.16s;
}
.theme-switch-picker[open] .theme-switch-caret {
  transform: rotate(-135deg) translate(-1px, -1px);
}

/* 面板锚在**顶栏内层容器**上，而不是按钮上。
   按钮在窄屏会被推到左边，锚按钮的话右对齐的面板会伸出屏幕左侧；
   锚容器就永远是「贴着容器右缘往左展开」，任何宽度都不会横向溢出。 */
.theme-switch-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: grid;
  gap: 2px;
  width: min(272px, calc(100vw - 44px));
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.theme-switch-panel-title {
  padding: 4px 10px 9px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}
.theme-switch-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 13.5px;
  transition: color 0.16s, background 0.16s;
}
.theme-switch-item:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.theme-switch-item.is-current {
  color: var(--accent);
  background: var(--accent-soft);
}
.theme-switch-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--line-3);
}
.theme-switch-item.is-current .theme-switch-dot {
  background: currentColor;
}
.theme-switch-name {
  flex: 1;
  min-width: 0;
}
.theme-switch-state {
  flex: none;
  color: var(--ink-3);
  font-size: 11.5px;
}
.theme-switch-item.is-current .theme-switch-state {
  color: currentColor;
}

/* 首页那处：同样一个按钮，展开才是那排卡片 */
.theme-hero {
  width: 100%;
  max-width: var(--wrap);
  margin: 104px auto 0;
  padding: 0 24px;
}
.theme-hero-head {
  margin-bottom: 22px;
}
.theme-hero-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.theme-hero-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.theme-hero-note {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 15px;
}

/* 首页这处不浮层：展开就把版面撑开，不会盖住页脚 */
.theme-hero-picker {
  display: block;
}
.theme-hero-trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.theme-hero-trigger:hover {
  border-color: var(--line-3);
  box-shadow: var(--shadow-sm);
}
.theme-hero-trigger-label {
  flex: none;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.theme-hero-trigger-name {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.theme-hero-caret {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.16s;
}
.theme-hero-picker[open] .theme-hero-caret {
  transform: rotate(-135deg) translate(-2px, -2px);
}
.theme-hero-panel {
  margin-top: 16px;
}
.theme-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.theme-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.theme-card:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.theme-card.is-current {
  border-color: var(--accent-2);
  background: var(--accent-soft);
}
.theme-card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.theme-card.is-current .theme-card-name {
  color: var(--accent);
}
.theme-card-desc {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
}
.theme-card-flag {
  margin-top: auto;
  padding-top: 6px;
  color: var(--ink-3);
  font-size: 12px;
}
.theme-card.is-current .theme-card-flag {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   5 · 首页 · 开场
   -------------------------------------------------------------------------- */

.pn-hero {
  padding: 96px 0 0;
}
.pn-hero-inner {
  max-width: 900px;
}
.pn-hero-kicker {
  margin: 0 0 20px;
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pn-hero-title {
  margin: 0 0 22px;
  font-size: clamp(38px, 6.4vw, 68px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.pn-hero-lead {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 500;
}
.pn-hero-desc {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.8;
}
.pn-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.pn-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 72px 0 0;
  border-top: 1px solid var(--line);
}
.pn-stat {
  padding: 22px 0 0;
  /* 用左侧细线分隔，比每个都画框轻得多 */
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.pn-stat:first-child {
  border-left: 0;
  padding-left: 0;
}
.pn-stat-key {
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pn-stat-val {
  margin: 6px 0 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   6 · 版块通用
   -------------------------------------------------------------------------- */

/* 注意：这些版块元素身上同时挂着 .wrap（负责左右内边距），
   所以这里只能用 padding-top —— 用 padding 简写会把 .wrap 的左右内边距一起清掉，
   内容就贴到屏幕边上了。 */
.pn-sec {
  padding-top: 104px;
}
.pn-sec-head {
  max-width: 720px;
  margin-bottom: 36px;
}
.pn-sec-kicker {
  margin: 0 0 12px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pn-sec-title {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 36px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}
.pn-sec-note {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 15.5px;
}

/* --------------------------------------------------------------------------
   7 · 关于我
   -------------------------------------------------------------------------- */

.pn-about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.pn-about-text {
  margin: 0 0 18px;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 1.85;
}
.pn-about-text:last-child {
  margin-bottom: 0;
}

.pn-honor-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pn-honor-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.pn-honor-dot {
  width: 5px;
  height: 5px;
  flex: none;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--accent-2);
}
.pn-honor-text {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   8 · 服务能力
   -------------------------------------------------------------------------- */

.pn-svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.pn-svc {
  padding: 30px 28px 34px 0;
  border-right: 1px solid var(--line);
}
.pn-svc:last-child {
  border-right: 0;
  padding-right: 0;
}
.pn-svc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  color: var(--accent);
}
.pn-svc-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.pn-svc-detail {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.8;
}

/* --------------------------------------------------------------------------
   9 · 作品
   -------------------------------------------------------------------------- */

.pn-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px 24px;
}
.pn-work {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pn-work-figure {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}
.pn-work-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.pn-work:hover .pn-work-figure img {
  transform: scale(1.025);
}
.pn-work-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.pn-work-title a:hover {
  color: var(--accent);
}
.pn-work-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   10 · 荣誉与活动
   -------------------------------------------------------------------------- */

.pn-gal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px 18px;
}
.pn-gal {
  margin: 0;
}
.pn-gal-figure {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.pn-gal-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.pn-gal:hover .pn-gal-figure img {
  transform: scale(1.03);
}
.pn-gal-cap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 11px;
}
.pn-gal-kind {
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pn-gal-title {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   11 · 课程
   -------------------------------------------------------------------------- */

.pn-course-list {
  display: grid;
  gap: 18px;
}
.pn-course {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.pn-course:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}
.pn-course-figure {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.pn-course-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.pn-course-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11.5px;
}
.pn-course-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pn-course-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.pn-course-desc {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.75;
}
.pn-course-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   12 · 文章卡片
   -------------------------------------------------------------------------- */

.pn-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.pn-card {
  display: flex;
}
.pn-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.pn-card-link:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.pn-card-cover {
  overflow: hidden;
  background: var(--surface-2);
}
.pn-card-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.pn-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  padding: 22px;
}
.pn-card-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
  font-size: 12px;
}
.pn-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.42;
  letter-spacing: -0.015em;
}
.pn-card-dek {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.72;
  /* 摘要最多三行，卡片高度才对得齐 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pn-card-byline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* 近期文章列表 */
.pn-recent {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pn-recent-item {
  border-bottom: 1px solid var(--line);
}
.pn-recent-link {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 4px;
  transition: background 0.16s;
}
.pn-recent-link:hover {
  background: var(--surface-2);
}
.pn-recent-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}
.pn-recent-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.pn-recent-link:hover .pn-recent-title {
  color: var(--accent);
}
.pn-recent-dek {
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pn-recent-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  color: var(--ink-3);
  font-size: 12.5px;
  white-space: nowrap;
}

.pn-more {
  margin-top: 28px;
}

/* --------------------------------------------------------------------------
   13 · 分类卡
   -------------------------------------------------------------------------- */

.pn-tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.pn-tag-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.pn-tag-card:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.pn-tag-card-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.pn-tag-card-count {
  color: var(--ink-3);
  font-size: 12.5px;
}
.pn-tag-card-lg {
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  padding: 24px;
}
.pn-tag-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.pn-tag-card-samples {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pn-tag-sample {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pn-tag-card-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: none;
  text-align: right;
}
.pn-tag-card-date {
  color: var(--ink-3);
  font-size: 12px;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   14 · 联系
   -------------------------------------------------------------------------- */

.pn-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.pn-contact {
  padding: 26px 24px 26px 0;
  border-right: 1px solid var(--line);
}
.pn-contact:last-child {
  border-right: 0;
  padding-right: 0;
}
.pn-contact-label {
  margin: 0 0 8px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pn-contact-value {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  word-break: normal;
  overflow-wrap: anywhere;
}
a.pn-contact-value:hover {
  color: var(--accent);
}
.pn-contact-qr {
  width: 120px;
  height: 120px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

/* --------------------------------------------------------------------------
   15 · 内页外壳
   -------------------------------------------------------------------------- */

/* 同上：身上挂着 .wrap，只能用 padding-top */
.pn-page {
  padding-top: 72px;
}
.pn-page-head {
  max-width: 760px;
  margin-bottom: 48px;
}
.pn-page-kicker {
  margin: 0 0 12px;
  color: var(--ink-3);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pn-page-title {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.pn-page-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.8;
}

.pn-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--ink-3);
  font-size: 13px;
}
.pn-crumb a:hover {
  color: var(--accent);
}
.pn-crumb-sep {
  color: var(--line-3);
}

.pn-center {
  text-align: center;
  padding-top: 120px;
  padding-bottom: 120px;
}
.pn-center-actions {
  justify-content: center;
  margin-top: 30px;
}
.pn-404-code {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   16 · 归档
   -------------------------------------------------------------------------- */

.pn-year-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.pn-year-jump-item {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.16s, color 0.16s;
}
.pn-year-jump-item:hover {
  border-color: var(--line-3);
  color: var(--ink);
}

.pn-year {
  margin-bottom: 52px;
}
.pn-year-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.pn-year-num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.pn-year-count {
  color: var(--ink-3);
  font-size: 13px;
}
.pn-archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pn-archive-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.pn-archive-date {
  flex: none;
  width: 48px;
  color: var(--ink-3);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pn-archive-link {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.6;
}
.pn-archive-link:hover {
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   17 · 检索
   -------------------------------------------------------------------------- */

.pn-search {
  margin-bottom: 28px;
}
.pn-search-input {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.pn-search-input::placeholder {
  color: var(--ink-3);
}
.pn-search-input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.pn-search-hint {
  margin-top: 12px;
  color: var(--ink-3);
  font-size: 13.5px;
}
.pn-search-results {
  display: grid;
  gap: 12px;
}

/* 检索结果由客户端脚本渲染（类名与其它主题一致，改一处即可） */
.sr-item {
  display: block;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.sr-item:hover {
  border-color: var(--line-3);
  box-shadow: var(--shadow-sm);
}
.sr-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.sr-cat {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.sr-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.015em;
}
.sr-excerpt {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.75;
}
.sr-empty {
  padding: 24px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-lg);
  color: var(--ink-2);
  font-size: 14.5px;
}
mark {
  padding: 0 3px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   18 · 文章页
   -------------------------------------------------------------------------- */

.pn-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: 2px;
  pointer-events: none;
}
.pn-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent-2);
}

.pn-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  gap: 64px;
  align-items: start;
  padding-top: 56px;
}

.pn-article-head {
  margin-bottom: 34px;
}
.pn-article-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--ink-3);
  font-size: 13px;
}
.pn-article-group {
  color: var(--ink-3);
}
.pn-article-title {
  margin: 0 0 18px;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.032em;
}
.pn-article-dek {
  margin: 0 0 26px;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.75;
}
.pn-article-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.pn-byline-avatar {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}
.pn-byline-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.pn-byline-name {
  font-size: 14.5px;
  font-weight: 500;
}
.pn-byline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 12.5px;
}
.pn-article-cover {
  margin: 0 0 40px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.pn-article-cover img {
  width: 100%;
}

.pn-article-end {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.pn-end-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pn-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 40px;
}
.pn-pager-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.pn-pager-item:hover {
  border-color: var(--line-3);
  box-shadow: var(--shadow-sm);
}
.pn-pager-item.is-empty {
  border: 0;
  background: none;
}
.pn-pager-next {
  text-align: right;
}
.pn-pager-dir {
  color: var(--ink-3);
  font-size: 12.5px;
}
.pn-pager-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
}

.pn-related {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}

/* 侧栏 */
.pn-article-side {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pn-toc {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.pn-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pn-toc-kicker {
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pn-toc-count {
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pn-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 46vh;
  overflow-y: auto;
}
.pn-toc-item a {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.55;
  transition: color 0.16s;
}
.pn-toc-item a:hover {
  color: var(--ink);
}
.pn-toc-item.is-active a {
  color: var(--accent);
  font-weight: 500;
}
.pn-toc-no {
  flex: none;
  width: 18px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.pn-toc-l3 a,
.pn-toc-l4 a {
  padding-left: 26px;
  font-size: 13px;
}

.pn-side-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.pn-side-kicker {
  margin: 0 0 14px;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pn-side-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}
.pn-side-name {
  margin: 14px 0 6px;
  font-size: 16px;
  font-weight: 600;
}
.pn-side-desc {
  margin: 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.7;
}
.pn-side-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   19 · 正文排版
   -------------------------------------------------------------------------- */

.prose {
  max-width: var(--measure);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
}
.prose > *:first-child {
  margin-top: 0;
}
.prose p {
  margin: 1.35em 0;
}
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  margin: 2.2em 0 0.7em;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  scroll-margin-top: 88px;
}
.prose h2 {
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--line);
  font-size: 26px;
}
.prose h3 {
  font-size: 20px;
}
.prose h4 {
  font-size: 17px;
}
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover {
  color: var(--accent-2);
}
.prose strong {
  font-weight: 600;
}
.prose ul,
.prose ol {
  margin: 1.2em 0;
  padding-left: 1.5em;
}
.prose li {
  margin: 0.45em 0;
}
.prose li::marker {
  color: var(--ink-3);
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--line-3);
  color: var(--ink-2);
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose hr {
  margin: 2.6em 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.prose img {
  margin: 1.8em auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.prose code {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.88em;
}
.prose table {
  width: 100%;
  margin: 1.8em 0;
  border-collapse: collapse;
  font-size: 15px;
}
.prose th,
.prose td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
}
.prose th {
  background: var(--surface-2);
  font-weight: 600;
}

/* 代码块：shiki 双主题 + 行号 */
.code-block {
  position: relative;
  margin: 1.8em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  overflow: hidden;
}
.code-block pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.75;
}
.code-block code {
  font-size: inherit;
}
.code-block .shiki,
.code-block .shiki span {
  color: var(--shiki-light);
}
.code-block .shiki {
  background-color: var(--shiki-light-bg, var(--surface-2));
}
[data-theme='dark'] .code-block .shiki,
[data-theme='dark'] .code-block .shiki span {
  color: var(--shiki-dark);
}
[data-theme='dark'] .code-block .shiki {
  background-color: var(--shiki-dark-bg, var(--surface-2));
}
/* 没有语言标记的代码块不显示角标——否则会渲染出一个空的背景方块 */
.code-block:not([data-lang])::before {
  display: none;
}
.code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: 0;
  right: 0;
  padding: 4px 11px;
  /* 用 ink/paper 这一对而不是 line/paper：深色下 line 是中间调，
     压深色文字只有 2:1。ink 在浅色下近黑、深色下近白，两端都稳。 */
  background: var(--ink);
  color: var(--paper);
  border-bottom-left-radius: var(--radius);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* 行号用 counter 生成，不额外包一层 DOM。
   必须用 display:inline-block 让 counter 落在正确的行上。 */
.code-block .shiki code {
  counter-reset: shiki-line;
}
.code-block .line {
  display: inline-block;
  counter-increment: shiki-line;
}
.code-block .line::before {
  content: counter(shiki-line);
  display: inline-block;
  box-sizing: border-box;
  width: 3em;
  padding-right: 1.4em;
  text-align: right;
  /* 探针量的是计算样式里的 color，所以必须用现成的弱化色，
     不能靠 opacity —— 那在对比度检查里是看不见的。 */
  color: var(--ink-3);
  user-select: none;
}

/* --------------------------------------------------------------------------
   20 · 评论区 / 复制工具条（外壳由 features 注入，这里只调间距）
   -------------------------------------------------------------------------- */

.pn-article .comments,
.pn-main .comments {
  margin: 48px 0 0;
}

/* --------------------------------------------------------------------------
   21 · 页脚
   -------------------------------------------------------------------------- */

.pn-footer {
  margin-top: 104px;
  border-top: 1px solid var(--line);
}
.pn-footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  padding-top: 52px;
  padding-bottom: 52px;
}
.pn-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pn-footer-brand strong {
  font-size: 16px;
  font-weight: 600;
}
.pn-footer-brand span {
  color: var(--ink-2);
  font-size: 14px;
}
.pn-footer-mail {
  color: var(--ink-3);
  font-size: 13.5px;
  overflow-wrap: anywhere;
}
.pn-footer-mail:hover {
  color: var(--accent);
}

.pn-footer-label {
  display: block;
  margin-bottom: 14px;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pn-index-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.pn-index-link {
  color: var(--ink-2);
  font-size: 14px;
  transition: color 0.16s;
}
.pn-index-link:hover {
  color: var(--accent);
}

.pn-footer-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pn-footer-social {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.pn-social {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-2);
  font-size: 14px;
  transition: color 0.16s;
}
.pn-social:hover {
  color: var(--accent);
}
.pn-social-arrow {
  color: var(--ink-3);
  font-size: 12px;
}
.pn-footer-copy {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   22 · 响应式
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .pn-article {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .pn-article-side {
    position: static;
  }
  .pn-toc-list {
    max-height: none;
  }
  .pn-about {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}

@media (max-width: 900px) {
  .pn-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    row-gap: 10px;
  }
  .pn-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .pn-nav::-webkit-scrollbar {
    display: none;
  }
  .pn-header-side {
    margin-left: auto;
  }
  .pn-footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

@media (max-width: 760px) {
  .pn-hero {
    padding-top: 64px;
  }
  .pn-sec {
    padding-top: 72px;
  }
  .theme-hero {
    margin-top: 72px;
  }
  .pn-page {
    padding-top: 52px;
  }
  .pn-article {
    padding-top: 40px;
  }
  .pn-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 26px;
  }
  .pn-stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .pn-svc {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .pn-svc:last-child {
    border-bottom: 0;
  }
  .pn-contact {
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .pn-contact:last-child {
    border-bottom: 0;
  }
  .pn-course {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .pn-pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .pn-pager-next {
    text-align: left;
  }
  .pn-tag-card-lg {
    flex-direction: column;
    gap: 14px;
  }
  .pn-tag-card-foot {
    align-items: flex-start;
    text-align: left;
  }
  .pn-recent-link {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .pn-recent-meta {
    flex-wrap: wrap;
    white-space: normal;
  }
  .pn-gal-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px 14px;
  }
  .pn-archive-item {
    flex-wrap: wrap;
    gap: 8px 14px;
  }
  .pn-archive-link {
    flex: 1 0 100%;
    order: 3;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }
  .theme-hero {
    padding: 0 18px;
  }
  .pn-card-grid,
  .pn-work-grid,
  .pn-tag-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .pn-footer-inner {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}

/* --------------------------------------------------------------------------
   23 · 系列（一个装了多篇文章的目录）

   三处外观全部从本主题现成的语汇里长出来，不新造一档：
   · 系列卡 = .pn-card 的「1px 边 + hover 抬 2px」
   · 系列目录 = .pn-recent 的「细线分隔 + hover 一层浅灰」，外面不再套圆角框
   · 编号与侧栏「本系列」= .pn-toc 的「tabular-nums 灰字 + 当前项给强调色」
   颜色一律走令牌，所以本节没有 [data-theme='dark'] 覆盖块 —— 深浅两版共用。
   -------------------------------------------------------------------------- */

/* 分类页两段的间距：比首页那 104px 的版块距紧凑一档。
   它们讲的是同一个分类下的东西，隔太远就读不出「这是一页的两段」 */
.pn-block + .pn-block {
  margin-top: 72px;
}

/* --- 系列卡：首页 / 分类页 / 系列总览页共用 --------------------------- */

.pn-series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.pn-series-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.16s, transform 0.16s, box-shadow 0.16s;
}
.pn-series-card:hover {
  border-color: var(--line-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.pn-series-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pn-series-card-count {
  flex: none;
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.pn-series-card-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}
.pn-series-card-dek {
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.72;
  /* 摘要压到两行：下面还挂着三行目录，再长就把整页的节奏撑乱了 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pn-series-card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pn-series-card-row {
  display: flex;
  gap: 8px;
}
.pn-series-card-row-text {
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
  /* 目录行一律单行截断：系列里的文章标题动辄三四十字，换成两行
     卡片高度就不齐了，而这三行本来就是给人扫「先读哪篇」的 */
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.pn-series-card-no {
  flex: none;
  width: 18px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.pn-series-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--ink-3);
  font-size: 12.5px;
}

/* --- 系列页 -------------------------------------------------------------- */

.pn-series-kicker {
  margin: 0 0 14px;
}
.pn-series-start {
  margin-top: 26px;
}

/* 目录行走 .pn-recent 那套细线，不做外框 —— 圆角大框是琥珀的骨相，
   这一套靠分隔线和留白分层 */
.pn-series-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pn-series-item {
  border-bottom: 1px solid var(--line);
}
.pn-series-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 20px 4px;
  transition: background 0.16s;
}
.pn-series-link:hover {
  background: var(--surface-2);
}
.pn-series-no {
  padding-top: 4px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.pn-series-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.pn-series-item-title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.pn-series-link:hover .pn-series-item-title {
  color: var(--accent);
}
.pn-series-item-dek {
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pn-series-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  padding-top: 4px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 侧栏「关于本系列」：dl 走 .pn-honor-list 的细线行，不堆卡片 */
.pn-series-facts {
  margin: 0;
  border-top: 1px solid var(--line);
}
.pn-series-fact {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.pn-series-fact dt {
  color: var(--ink-3);
  font-size: 12.5px;
}
.pn-series-fact dd {
  margin: 0;
  color: var(--ink);
  font-size: 13.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pn-series-all {
  display: block;
  padding-top: 14px;
  color: var(--accent);
  font-size: 13px;
}
.pn-series-all:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.pn-series-mini {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.pn-series-mini li {
  border-bottom: 1px solid var(--line);
}
.pn-series-mini a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.55;
  transition: color 0.16s;
}
.pn-series-mini a:hover {
  color: var(--accent);
}
.pn-series-mini-title {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pn-series-mini-count {
  flex: none;
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* --- 文章页：眉部的系列标签 + 侧栏「本系列」+ 末篇那句收束语 ---------- */

/* 眉部标签是可点的，按本主题的规矩就该给强调色（灰色只留给不可点的元信息） */
a.pn-article-group {
  color: var(--accent);
  transition: color 0.16s;
}
a.pn-article-group:hover {
  color: var(--accent-2);
}

/* 侧栏这一栏外观对齐 .pn-toc：同样不带边框，靠底部细线与下一块分隔 */
.pn-series-panel {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.pn-series-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pn-series-panel-kicker {
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pn-series-panel-order {
  color: var(--ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.pn-series-panel-title {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pn-series-panel-title:hover {
  color: var(--accent-2);
  text-decoration: underline;
}
.pn-series-panel-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pn-series-panel-item a {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.55;
  transition: color 0.16s;
}
.pn-series-panel-item a:hover {
  color: var(--ink);
}
/* 当前一篇：只换色 + 加粗，不加底色块 —— 和 .pn-toc-item.is-active 同一套做法，
   侧栏里两块列表因此读起来是一个东西 */
.pn-series-panel-item.is-current a {
  color: var(--accent);
  font-weight: 500;
}
.pn-series-panel-no {
  flex: none;
  width: 20px;
  color: var(--ink-3);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}
.pn-series-panel-item.is-current .pn-series-panel-no {
  color: var(--accent);
}
.pn-series-panel-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.pn-series-panel-all {
  display: block;
  padding-top: 12px;
  color: var(--accent);
  font-size: 12.5px;
}
.pn-series-panel-all:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.pn-pager-note {
  margin: 16px 0 0;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.7;
}
.pn-pager-note a {
  color: var(--accent);
}
.pn-pager-note a:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

@media (max-width: 760px) {
  /* 窄屏下时长/日期挤在右侧会把标题压成一列字；不砍信息，改成挪到标题下面横排 */
  .pn-series-link {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 2px 12px;
    padding: 16px 2px;
  }
  .pn-series-item-meta {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding-top: 0;
  }
  .pn-series-item-title {
    font-size: 16px;
  }
}

/* --------------------------------------------------------------------------
   24 · 降级与打印
   -------------------------------------------------------------------------- */

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

@media print {
  .pn-header,
  .pn-footer,
  .theme-hero,
  .pn-progress,
  .pn-article-side,
  .copy-toolbar {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .pn-article {
    display: block;
  }
  .prose {
    max-width: none;
  }
}
