/* 墨泉 Inkwell — 扁平资讯博客主题 */

:root {
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-muted: #888888;
  --color-border: #e8ecf0;
  --color-hover: #f5f7fa;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --page-max: 1240px;
  --sidebar-w: 300px;
  --gap: 20px;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.08);
  --header-h: 60px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --color-surface: #1c2128;
  --color-text: #e6edf3;
  --color-muted: #8b949e;
  --color-border: #30363d;
  --color-hover: #262c36;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-surface: #1c2128;
    --color-text: #e6edf3;
    --color-muted: #8b949e;
    --color-border: #30363d;
    --color-hover: #262c36;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.35);
  }
}

[data-theme="light"] {
  --color-surface: #ffffff;
  --color-text: #333333;
  --color-muted: #888888;
  --color-border: #e8ecf0;
  --color-hover: #f5f7fa;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg, #f3f5f7);
  color: var(--color-text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent, var(--color-primary)); }

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

.container {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 1288px) {
  .container { padding: 0 24px; }
}

@media (max-width: 640px) {
  .container { padding: 0 12px; }
}

/* ── Header ── */
.ink-header {
  background: var(--color-surface);
  box-shadow: 0 1px 0 var(--color-border);
  position: relative;
  z-index: 100;
}

.is-header-fixed .ink-header {
  position: sticky;
  top: 0;
}

.ink-header-inner {
  display: flex;
  align-items: center;
  gap: 12px 20px;
  min-height: var(--header-h);
}

.ink-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.ink-logo:hover { color: var(--color-primary); text-decoration: none; }
.ink-logo-img { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: contain; }
.ink-logo i { font-size: 22px; color: var(--color-primary); }

.ink-search {
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 0 4px 0 14px;
  max-width: 220px;
  flex: 0 1 220px;
  margin-left: auto;
}

.ink-search > i { color: var(--color-muted); font-size: 16px; flex-shrink: 0; }

.ink-search-input {
  border: none;
  background: transparent;
  padding: 8px 8px;
  font-size: 13px;
  width: 100%;
  outline: none;
  color: var(--color-text);
}

.ink-search-input::placeholder { color: var(--color-muted); }

.ink-search-btn {
  border: none;
  background: var(--color-primary, #2d7ff9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition), background var(--transition);
  flex-shrink: 0;
}

.ink-search-btn:hover {
  opacity: 0.92;
  color: #ffffff;
}

.ink-search-toggle,
.ink-nav-toggle,
.ink-theme-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.ink-theme-toggle { display: inline-flex; align-items: center; justify-content: center; }

.theme-icon-light { display: none; }

[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: inline; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-icon-dark { display: none; }
  :root:not([data-theme="light"]) .theme-icon-light { display: inline; }
}

[data-theme="light"] .theme-icon-dark { display: inline; }
[data-theme="light"] .theme-icon-light { display: none; }

.ink-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 6px;
  min-width: 0;
}

.ink-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--color-muted);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  position: relative;
  white-space: nowrap;
  text-decoration: none;
}

.ink-nav-link:hover,
.ink-nav-link.is-active {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
  text-decoration: none;
}

.ink-nav-caret {
  font-size: 14px;
  opacity: 0.7;
  transition: transform var(--transition);
}

.ink-nav-group {
  position: relative;
}

.ink-nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 160px;
  padding: 6px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 120;
}

.ink-nav-group:hover .ink-nav-dropdown,
.ink-nav-group:focus-within .ink-nav-dropdown,
.ink-nav-group.is-open .ink-nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ink-nav-group:hover .ink-nav-caret,
.ink-nav-group.is-open .ink-nav-caret {
  transform: rotate(180deg);
}

.ink-nav-dropdown-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 13px;
  text-decoration: none;
}

.ink-nav-dropdown-link:hover,
.ink-nav-dropdown-link.is-active {
  color: var(--color-primary);
  background: var(--color-hover);
  text-decoration: none;
}

/* legacy */
.ink-nav a { color: inherit; }
.ink-nav-sub { font-size: 13px; opacity: 0.85; }

/* ── Layout ── */
.ink-shell { padding: var(--gap) 0 40px; }

.ink-layout {
  display: grid;
  gap: var(--gap);
  align-items: start;
}

.ink-layout.has-sidebar {
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
}

.layout-content-left .ink-layout.has-sidebar {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

.layout-content-left .ink-sidebar { order: -1; }

.layout-full .ink-sidebar { display: none; }

.ink-main { min-width: 0; }

.ink-sidebar.is-sticky {
  position: sticky;
  top: var(--sidebar-sticky-top, calc(var(--header-h) + var(--gap)));
  align-self: start;
}

.ink-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
  --yh-widget-bg: var(--color-surface);
  --yh-widget-border: var(--color-border);
  --yh-widget-radius: var(--radius-lg);
}

/* ── Index top: slider + hot (上下结构) ── */
.ink-index-top {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  margin-bottom: var(--gap);
}

.ink-index-hero-col {
  min-width: 0;
  width: 100%;
}

.ink-index-hero-col .ink-hero {
  aspect-ratio: 16 / 6;
}

.ink-index-hot {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 18px;
  width: 100%;
}

.ink-hot-list {
  list-style: none;
  counter-reset: hot;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px 16px;
}

.ink-hot-list li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border-bottom: none;
  border-right: 1px solid var(--color-border);
  padding-right: 16px;
}

.ink-hot-list li:last-child {
  border-right: none;
  padding-right: 0;
}

@media (max-width: 960px) {
  .ink-hot-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ink-hot-list li {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 12px;
  }

  .ink-hot-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}

@media (max-width: 520px) {
  .ink-hot-list {
    grid-template-columns: 1fr;
  }
}

.ink-hot-rank {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  background: var(--color-hover);
  color: var(--color-muted);
}

.ink-widget-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text);
}

.ink-widget-title i { color: var(--color-accent, #ff6b35); }

.ink-hot-list li:nth-child(1) .ink-hot-rank { background: #ff4d4f; color: #fff; }
.ink-hot-list li:nth-child(2) .ink-hot-rank { background: #ff7a45; color: #fff; }
.ink-hot-list li:nth-child(3) .ink-hot-rank { background: #ffa940; color: #fff; }

.ink-hot-body a {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ink-hot-body a:hover { color: var(--color-primary); text-decoration: none; }

.ink-hot-meta {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 4px;
  display: flex;
  gap: 10px;
}

/* ── Hero slider ── */
.ink-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 7;
  box-shadow: var(--shadow-card);
}

.ink-hero-track { position: relative; width: 100%; height: 100%; }

.ink-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: block;
}

.ink-hero-slide.is-active { opacity: 1; z-index: 1; }

.ink-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ink-hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.65));
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.ink-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: background var(--transition);
}

.ink-hero-nav:hover { background: var(--color-surface); }
.ink-hero-prev { left: 12px; }
.ink-hero-next { right: 12px; }

.ink-hero-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 6px;
}

.ink-hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.ink-hero-dots button.is-active {
  background: var(--color-surface);
  transform: scale(1.2);
}

/* ── Feed list ── */
.ink-feed { list-style: none; display: flex; flex-direction: column; gap: var(--gap); }

.feed-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.feed-card:hover { box-shadow: var(--shadow-hover); }

.feed-pin {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 12px;
  color: var(--color-accent, #ff6b35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.feed-pin.inline { position: static; margin-bottom: 8px; }

.feed-body { flex: 1; min-width: 0; }

.feed-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.feed-title > a { color: var(--color-text); }
.feed-title > a:hover { color: var(--color-primary); text-decoration: none; }

.feed-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
}

.feed-cat:hover { background: color-mix(in srgb, var(--color-primary) 20%, transparent); text-decoration: none; }

.feed-cat--topic i { margin-right: 2px; font-size: 12px; vertical-align: -1px; }

.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.feed-meta a { color: var(--color-muted); }
.feed-meta a:hover { color: var(--color-primary); text-decoration: none; }
.feed-meta i { margin-right: 3px; font-size: 14px; vertical-align: -1px; }

.feed-excerpt {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.feed-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-tags a {
  font-size: 12px;
  color: var(--color-muted);
  padding: 2px 0;
}

.feed-tags a:hover { color: var(--color-primary); text-decoration: none; }

/* Thumbnail layouts */
.feed-media-side { flex-shrink: 0; width: 200px; }

.feed-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-hover);
  aspect-ratio: 4 / 3;
}

.feed-thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.feed-card:hover .feed-thumb-img { transform: scale(1.03); }

.feed-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 32px;
}

.feed-thumb-cell {
  position: relative;
  overflow: hidden;
}

.feed-thumb-cell.is-video .feed-thumb-img {
  filter: brightness(0.92);
}

.feed-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 28px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.layout-thumb-right { flex-direction: row-reverse; }

.layout-banner .feed-media-banner,
.layout-grid-top .feed-media-banner { display: block; margin: 12px 0; }

.feed-media-banner .feed-thumb { aspect-ratio: 16 / 7; max-height: 220px; }

.feed-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0;
}

.feed-thumb-cell { min-width: 0; }

.layout-grid-top .feed-media-grid .feed-thumb { aspect-ratio: 4 / 3; }

.layout-text { display: block; }

/* ── Load more ── */
.ink-load-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 24px 0 8px;
  position: relative;
}

.ink-load-btn {
  display: inline-block;
  padding: 10px 36px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 24px;
  font-size: 14px;
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.ink-load-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.ink-load-link { text-decoration: none; }

.ink-load-status {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 40px;
}

.ink-load-spin {
  display: none;
  width: 28px;
  height: 28px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: ink-spin 0.7s linear infinite;
}

.ink-load-end {
  display: none;
  color: var(--color-muted);
  font-size: 14px;
}

@keyframes ink-spin { to { transform: rotate(360deg); } }

.ink-load-more.is-loading .ink-load-btn {
  visibility: hidden;
  position: absolute;
}

.ink-load-more.is-loading .ink-load-status,
.ink-load-more.is-ended .ink-load-status {
  display: flex;
}

.ink-load-more.is-loading .ink-load-spin {
  display: block;
}

.ink-load-more.is-ended .ink-load-btn {
  display: none;
}

.ink-load-more.is-ended .ink-load-end {
  display: block;
}

.ink-feed-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-muted);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
}

.ink-feed-empty i { font-size: 48px; display: block; margin-bottom: 12px; opacity: 0.4; }

/* ── Sidebar widgets ── */
.ink-widget {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ink-motto {
  position: relative;
  padding: 0;
  min-height: 168px;
  color: #fff;
  overflow: hidden;
  border: none;
}

.ink-motto-no-img {
  background: linear-gradient(135deg, #2d7ff9 0%, #1a5fcc 100%);
}

.ink-motto-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ink-motto::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.18) 100%);
  pointer-events: none;
}

.ink-motto-no-img::before {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.25) 0%, transparent 100%);
}

.ink-motto-info {
  position: relative;
  z-index: 2;
  padding: 22px 18px 18px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ink-motto-day {
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.ink-motto-ym {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.92;
  letter-spacing: 0.04em;
}

.ink-motto-text {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.95;
  font-style: normal;
  white-space: pre-line;
}

/* 侧栏 · 事件脉络 */
.ink-events {
  padding: 0;
}

.ink-events-banner {
  line-height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ink-events-banner img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.ink-events-head {
  padding: 16px 18px 0;
}

.ink-events-head .ink-widget-title {
  margin-bottom: 8px;
}

.ink-events-desc {
  margin: 0 0 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-muted);
}

.ink-events-list {
  list-style: none;
  margin: 0;
  padding: 8px 18px 0;
}

.ink-events-item {
  position: relative;
  padding: 0 0 16px 14px;
  border-left: 2px solid color-mix(in srgb, var(--color-primary) 35%, var(--color-border));
}

.ink-events-item:last-child {
  padding-bottom: 12px;
  border-left-color: transparent;
}

.ink-events-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 18%, var(--color-surface));
}

.ink-events-meta {
  margin-bottom: 4px;
}

.ink-events-meta time {
  font-size: 12px;
  color: var(--color-muted);
}

.ink-event-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: middle;
}

.ink-event-tag--main { background: color-mix(in srgb, var(--color-primary) 14%, var(--color-surface)); color: var(--color-primary); }
.ink-event-tag--red { background: #fdecea; color: #c0392b; }
.ink-event-tag--orange { background: #fff3e6; color: #d35400; }
.ink-event-tag--green { background: #e8f8ef; color: #1e8449; }
.ink-event-tag--blue { background: #eaf2fd; color: #2471a3; }

[data-theme="dark"] .ink-event-tag--red { background: color-mix(in srgb, #c0392b 18%, var(--color-surface)); color: #f1948a; }
[data-theme="dark"] .ink-event-tag--orange { background: color-mix(in srgb, #d35400 16%, var(--color-surface)); color: #f0b27a; }
[data-theme="dark"] .ink-event-tag--green { background: color-mix(in srgb, #1e8449 16%, var(--color-surface)); color: #82e0aa; }
[data-theme="dark"] .ink-event-tag--blue { background: color-mix(in srgb, #2471a3 16%, var(--color-surface)); color: #85c1e9; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ink-event-tag--red { background: color-mix(in srgb, #c0392b 18%, var(--color-surface)); color: #f1948a; }
  :root:not([data-theme="light"]) .ink-event-tag--orange { background: color-mix(in srgb, #d35400 16%, var(--color-surface)); color: #f0b27a; }
  :root:not([data-theme="light"]) .ink-event-tag--green { background: color-mix(in srgb, #1e8449 16%, var(--color-surface)); color: #82e0aa; }
  :root:not([data-theme="light"]) .ink-event-tag--blue { background: color-mix(in srgb, #2471a3 16%, var(--color-surface)); color: #85c1e9; }
}

.ink-event-time {
  font-size: 12px;
  color: var(--color-muted);
}

.ink-events-link {
  color: var(--color-text);
  text-decoration: none;
}

.ink-events-link h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  transition: color var(--transition);
}

.ink-events-link:hover {
  text-decoration: none;
}

.ink-events-link:hover h4 {
  color: var(--color-primary);
}

.ink-events-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 4px 18px 16px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: var(--color-hover);
  color: var(--color-muted);
  font-size: 13px;
  text-decoration: none;
  transition: all var(--transition);
}

.ink-events-more:hover {
  color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-hover));
  text-decoration: none;
}

/* 分类页 · 事件脉络时间轴 */
.ink-events-page-head {
  position: relative;
  margin-bottom: 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.ink-events-page-banner {
  position: relative;
  line-height: 0;
  max-height: 240px;
  overflow: hidden;
}

.ink-events-page-banner img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

.ink-events-page-banner-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.ink-events-page-intro {
  padding: 24px 28px 28px;
}

.ink-events-page-intro h1 {
  margin: 0 0 10px;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ink-events-page-desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-muted);
}

.ink-events-page-content {
  font-size: 15px;
}

.ink-events-page-content p {
  margin: 0 0 10px;
}

.ink-events-page-content p:last-child {
  margin-bottom: 0;
}

.ink-events-page {
  max-width: 860px;
  margin: 0 auto;
}

.ink-events-page-count {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--color-muted);
}

.ink-event-timeline-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px 28px 12px;
}

.ink-event-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ink-event-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 16px;
  position: relative;
  padding-bottom: 28px;
}

.ink-event-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}

.ink-event-axis {
  position: relative;
  z-index: 1;
}

.ink-event-dot {
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, var(--color-surface));
}

.ink-event-timeline-wrap .ink-event-dot {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 14%, var(--color-hover));
}

.ink-event-card {
  min-width: 0;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition);
}

.ink-event-timeline-wrap .ink-event-card {
  padding: 0 0 4px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

.ink-event-timeline-wrap .ink-event-item:not(:last-child) .ink-event-card {
  padding-bottom: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}

.ink-event-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.ink-event-timeline-wrap .ink-event-card:hover {
  box-shadow: none;
}

.ink-event-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ink-event-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.45;
}

.ink-event-title a {
  color: var(--color-text);
  text-decoration: none;
}

.ink-event-title a:hover {
  color: var(--color-primary);
}

.ink-event-excerpt {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-muted);
}

.ink-event-cover {
  display: block;
  margin-top: 12px;
  line-height: 0;
  text-decoration: none;
}

.ink-event-cover--single .feed-thumb-cell {
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 7;
  max-height: 200px;
  overflow: hidden;
}

.ink-event-cover--single .feed-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ink-event-cover--single:hover .feed-thumb-img {
  transform: scale(1.02);
}

.ink-event-cover--gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.ink-event-cover--gallery .feed-thumb-cell {
  border-radius: var(--radius-sm);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.ink-event-cover--gallery .feed-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.ink-event-cover--gallery:hover .feed-thumb-img {
  transform: scale(1.02);
}

.ink-event-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 20px 20px;
  color: var(--color-muted);
}

.ink-event-empty i {
  font-size: 40px;
  opacity: 0.35;
  display: block;
  margin-bottom: 12px;
}

/* CMS 小工具（.widget）与插件侧栏块 */
.ink-sidebar-widgets {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-width: 0;
}

.yh-widgets--homepage-top,
.yh-widgets--homepage-before-posts,
.yh-widgets--homepage-after-posts {
  margin: var(--gap) 0;
}

/* 墨泉：侧栏 / 首页小工具卡片样式（页脚保持扁平，与页脚背景融为一体） */
.theme-inkwell .yh-widgets:not(.yh-widgets--footer) .widget,
.theme-inkwell .yh-widgets:not(.yh-widgets--footer) section.widget {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: none;
  padding: 16px 18px;
  min-width: 0;
  overflow: hidden;
}

.theme-inkwell .yh-widgets--footer .widget,
.theme-inkwell .yh-widgets--footer section.widget {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
  border-radius: 0;
}

.theme-inkwell .yh-widgets--footer .widget h3,
.theme-inkwell .yh-widgets--footer section.widget h3 {
  display: block;
  margin: 0 0 12px;
  padding-bottom: 0;
  border-bottom: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
}

.ink-sidebar .ink-widget {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.ink-sidebar .ink-motto,
.ink-sidebar .ink-events {
  padding: 0;
}

.theme-inkwell .yh-widgets:not(.yh-widgets--footer) .widget h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
}

.theme-inkwell .yh-widgets .widget h3 i {
  color: var(--color-primary);
  font-size: 17px;
  flex-shrink: 0;
}

.theme-inkwell .yh-widgets .about-text,
.theme-inkwell .yh-widgets .widget-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-muted);
}

.theme-inkwell .yh-widgets .widget-text p,
.theme-inkwell .yh-widgets .about-text {
  margin: 0 0 10px;
}

.theme-inkwell .yh-widgets .widget-text p:last-child,
.theme-inkwell .yh-widgets .about-text:last-child {
  margin-bottom: 0;
}

.theme-inkwell .yh-widgets .widget-text-plain {
  margin: 0;
  padding: 10px 12px;
  background: var(--color-hover);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-muted);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.theme-inkwell .yh-widgets .widget-cta-wrap { margin: 12px 0 0; }

.theme-inkwell .yh-widgets .widget-cta-btn {
  display: inline-block;
  padding: 7px 16px;
  border-radius: 20px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: opacity var(--transition);
}

.theme-inkwell .yh-widgets .widget-cta-btn:hover {
  opacity: 0.9;
  color: #fff;
  text-decoration: none;
}

.theme-inkwell .yh-widgets .search-form {
  display: flex;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.theme-inkwell .yh-widgets .search-form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-hover);
  color: var(--color-text);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
}

.theme-inkwell .yh-widgets .search-form input[type="search"]:focus {
  border-color: color-mix(in srgb, var(--color-primary) 50%, var(--color-border));
}

.theme-inkwell .yh-widgets .search-form button {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--color-primary, #2d7ff9);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: opacity var(--transition), background var(--transition);
}

.theme-inkwell .yh-widgets .search-form button i {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.theme-inkwell .yh-widgets .search-form button:hover {
  opacity: 0.92;
  color: #ffffff;
}

.theme-inkwell .yh-widgets .sidebar-posts,
.theme-inkwell .yh-widgets .sidebar-categories {
  list-style: none;
  margin: 0;
  padding: 0;
}

.theme-inkwell .yh-widgets .sidebar-posts li,
.theme-inkwell .yh-widgets .sidebar-categories li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--color-border);
}

.theme-inkwell .yh-widgets .sidebar-posts li:last-child,
.theme-inkwell .yh-widgets .sidebar-categories li:last-child {
  border-bottom: none;
}

.theme-inkwell .yh-widgets .sidebar-post-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
}

.theme-inkwell .yh-widgets .sidebar-post-link:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.theme-inkwell .yh-widgets .sidebar-post-idx {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: var(--color-hover);
  color: var(--color-muted);
}

.theme-inkwell .yh-widgets .sidebar-post-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theme-inkwell .yh-widgets .sidebar-post-title {
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-inkwell .yh-widgets .sidebar-post-date {
  font-size: 12px;
  color: var(--color-muted);
}

.theme-inkwell .yh-widgets .sidebar-post-arrow {
  display: none;
}

.theme-inkwell .yh-widgets .sidebar-posts > li > a:not(.sidebar-post-link) {
  display: block;
  padding: 9px 0;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: none;
}

.theme-inkwell .yh-widgets .sidebar-posts > li > a:not(.sidebar-post-link):hover {
  color: var(--color-primary);
}

.theme-inkwell .yh-widgets .sidebar-categories li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 14px;
}

.theme-inkwell .yh-widgets .sidebar-categories a {
  color: var(--color-text);
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.theme-inkwell .yh-widgets .sidebar-categories a:hover {
  color: var(--color-primary);
}

.theme-inkwell .yh-widgets .sidebar-categories .count {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--color-muted);
  background: var(--color-hover);
  padding: 1px 8px;
  border-radius: 10px;
}

.theme-inkwell .yh-widgets .sidebar-categories.tree li[style] {
  border-bottom: none;
  padding: 6px 0;
}

.theme-inkwell .yh-widgets .sidebar-topics {
  list-style: none;
  margin: 0;
  padding: 0;
}

.theme-inkwell .yh-widgets .sidebar-topics--cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.theme-inkwell .yh-widgets .sidebar-topics--cards li {
  margin: 0;
  padding: 0;
  border: none;
}

.theme-inkwell .yh-widgets .sidebar-topic-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--color-hover);
  color: var(--color-text);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.theme-inkwell .yh-widgets .sidebar-topic-link:hover {
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-hover));
  text-decoration: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-primary) 18%, transparent);
}

.theme-inkwell .yh-widgets .sidebar-topic-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
}

.theme-inkwell .yh-widgets .sidebar-topic-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.theme-inkwell .yh-widgets .sidebar-topic-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 22px;
}

.theme-inkwell .yh-widgets .sidebar-topic-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.theme-inkwell .yh-widgets .sidebar-topic-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-inkwell .yh-widgets .sidebar-topic-link:hover .sidebar-topic-title {
  color: var(--color-primary);
}

.theme-inkwell .yh-widgets .sidebar-topic-desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.theme-inkwell .yh-widgets .sidebar-topic-count {
  font-size: 12px;
  color: var(--color-muted);
}

.theme-inkwell .yh-widgets .sidebar-topic-count::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  margin: 0 6px 2px 0;
  vertical-align: middle;
  opacity: 0.5;
}

.theme-inkwell .yh-widgets .sidebar-topic-all {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.theme-inkwell .yh-widgets .sidebar-topic-all a {
  font-size: 13px;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.theme-inkwell .yh-widgets .tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-inkwell .yh-widgets .tag-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  color: var(--color-muted);
  background: var(--color-hover);
  border: 1px solid transparent;
  text-decoration: none;
  transition: all var(--transition);
}

.theme-inkwell .yh-widgets .tag-pill:hover {
  color: var(--color-primary);
  border-color: color-mix(in srgb, var(--color-primary) 25%, transparent);
  background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
  text-decoration: none;
}

.theme-inkwell .yh-widgets .widget-ad-body { line-height: 0; }

.theme-inkwell .yh-widgets .widget-ad-link {
  display: block;
  text-decoration: none;
}

.theme-inkwell .yh-widgets .widget-ad-media {
  width: 100%;
  border-radius: var(--radius-md);
  display: block;
}

.theme-inkwell .yh-widgets .widget-ad-caption {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.5;
}

.theme-inkwell .yh-widgets .widget-custom-html {
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  overflow-x: auto;
}

.theme-inkwell .yh-widgets .widget-custom-html img,
.theme-inkwell .yh-widgets .widget-custom-html video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* 插件小工具在侧栏内的适配 */
.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-block,
.theme-inkwell .yh-widgets .widget-crm-inner .yh-crm-form-block {
  margin: 0;
  padding: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.theme-inkwell .yh-widgets .widget-friend-links .fl-widget-body {
  margin: 0;
}

.theme-inkwell .yh-widgets .widget-friend-links .fl-layout-list a,
.theme-inkwell .yh-widgets .widget-friend-links .fl-layout-grid a {
  font-size: 13px;
}

.theme-inkwell .yh-widgets .widget-plugin-hook > * {
  width: 100%;
}

.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0 0 12px;
  max-width: none;
}

.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: none;
}

.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-form input[type="email"] {
  flex: 1;
  min-width: 120px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  font-size: 13px;
  color: var(--color-text);
}

.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-primary);
}

.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-btn {
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-btn:hover {
  opacity: 0.92;
}

.theme-inkwell .yh-widgets .widget-newsletter .yh-newsletter-status {
  flex: 1 1 100%;
  font-size: 12px;
  margin: 0;
}

.theme-inkwell .yh-widgets .widget-friend-links .fl-layout-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.theme-inkwell .yh-widgets .widget-friend-links .fl-card {
  background: var(--color-hover);
  border-color: var(--color-border);
}

.theme-inkwell .yh-widgets .widget-friend-links .fl-card:hover {
  border-color: var(--color-primary);
  box-shadow: none;
}

/* ── Article page ── */
.ink-article {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 32px;
}

.ink-article-head h1 {
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.35;
  margin-bottom: 12px;
}

.ink-article-meta { margin-bottom: 12px; }
.ink-article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.ink-topic-series-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0 24px;
}

.ink-topic-series {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.ink-topic-series-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.ink-topic-series-label {
  font-weight: 600;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ink-topic-series-label i { color: var(--color-primary); }

.ink-topic-series-label:hover { color: var(--color-primary); text-decoration: none; }

.ink-topic-series-progress {
  font-size: 13px;
  color: var(--color-muted);
}

.ink-topic-series-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .ink-topic-series-links { grid-template-columns: 1fr; }
}

.ink-topic-series-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-hover);
  color: var(--color-text);
  min-height: 56px;
}

.ink-topic-series-link:hover {
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-hover));
  color: var(--color-primary);
  text-decoration: none;
}

.ink-topic-series-link-label {
  font-size: 12px;
  color: var(--color-muted);
}

.ink-topic-series-link-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.ink-topic-series-link--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-hover);
  color: var(--color-muted);
  font-size: 13px;
  min-height: 56px;
}

.ink-article-cover {
  margin: 16px 0 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ink-cover-single img,
.ink-article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.ink-cover-video video {
  width: 100%;
  max-height: 480px;
  display: block;
  background: #000;
  border-radius: var(--radius-md);
}

.ink-cover-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ink-cover-gallery-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-hover);
}

.ink-cover-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  max-height: none;
}

.ink-cover-gallery-item.is-video .ink-cover-video-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.ink-cover-gallery-item.is-video .feed-thumb {
  aspect-ratio: 4 / 3;
}

.ink-article-cover--gallery {
  background: transparent;
  box-shadow: none;
}

.ink-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  gap: 24px;
  align-items: start;
}

.ink-article-content {
  font-size: 16px;
  line-height: 1.85;
  color: #444;
}

.ink-article-content h2,
.ink-article-content h3 { margin: 1.5em 0 0.6em; color: var(--color-text); }

.ink-article-content p { margin-bottom: 1em; }
.ink-article-content img { border-radius: var(--radius-md); margin: 1em 0; }
.ink-article-content blockquote {
  border-left: 3px solid var(--color-primary);
  padding: 8px 16px;
  margin: 1em 0;
  background: var(--color-hover);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-muted);
}

.ink-toc {
  position: sticky;
  top: var(--sidebar-sticky-top, calc(var(--header-h) + var(--gap)));
  font-size: 13px;
  padding: 14px;
  background: var(--color-hover);
  border-radius: var(--radius-md);
}

.ink-toc strong { display: block; margin-bottom: 8px; font-size: 14px; }
.ink-toc ul { list-style: none; }
.ink-toc li { margin: 4px 0; }
.ink-toc li.h3 { padding-left: 12px; }
.ink-toc a { color: var(--color-muted); }
.ink-toc a:hover { color: var(--color-primary); text-decoration: none; }

/* 列表页页头：与侧栏 widget / feed 卡片统一视觉 */
.ink-page-intro {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 20px 18px;
  margin-bottom: var(--gap);
}

.ink-page-intro .breadcrumb {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.ink-page-intro .ink-page-head {
  margin-bottom: 0;
}

.ink-page-head { margin-bottom: var(--gap); }
.ink-page-head h1 {
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.35;
}
.ink-page-head h1 i { color: var(--color-primary); font-size: 22px; flex-shrink: 0; }
.ink-page-desc { color: var(--color-muted); margin-top: 8px; font-size: 14px; line-height: 1.65; }

/* ── Search page (engine-style) ── */
.ink-search-hero {
  padding: 16px 20px 32px;
  margin-bottom: var(--gap);
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid color-mix(in srgb, var(--color-border) 80%, transparent);
}

.ink-search-hero .breadcrumb {
  text-align: left;
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.ink-search-engine {
  max-width: 680px;
  margin: 0 auto;
}

.ink-search-engine-title {
  margin: 0 0 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ink-search-engine-title i {
  color: var(--color-primary);
  font-size: 20px;
}

.ink-search-engine-box {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  border: 2px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  background: var(--color-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ink-search-engine-box:focus-within {
  border-color: color-mix(in srgb, var(--color-primary) 50%, var(--color-border));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 14%, transparent);
}

.ink-search-engine-box input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: clamp(16px, 2.5vw, 20px);
  padding: 14px 10px 14px 0;
  outline: none;
  color: var(--color-text);
}

.ink-search-engine-box input[type="search"]::placeholder {
  color: var(--color-muted);
}

.ink-search-engine-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 28px;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  background: var(--color-primary, #2d7ff9);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.ink-search-engine-box button i {
  color: #ffffff;
  font-size: 18px;
}

.ink-search-engine-box button:hover {
  opacity: 0.92;
  color: #ffffff;
}

.ink-search-engine-meta,
.ink-search-engine-hint {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.6;
}

.ink-search-engine-meta strong {
  color: var(--color-primary);
  font-weight: 700;
}

@media (max-width: 640px) {
  .ink-search-hero {
    padding: 14px 16px 24px;
  }

  .ink-search-hero .breadcrumb {
    margin-bottom: 18px;
  }

  .ink-search-engine-box {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 12px;
    gap: 10px;
  }

  .ink-search-engine-box input[type="search"] {
    padding: 10px 8px;
    text-align: center;
  }

  .ink-search-engine-box button {
    width: 100%;
    border-radius: var(--radius-md);
  }
}

/* 专题页头图 */
.ink-topic-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--gap);
  min-height: 220px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 18%, var(--color-surface)), var(--color-surface));
  box-shadow: var(--shadow-card);
}

.ink-topic-hero--plain {
  min-height: 0;
  background: var(--color-surface);
}

.ink-topic-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ink-topic-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.45) 55%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.ink-topic-hero-inner {
  position: relative;
  z-index: 1;
  padding: 18px 22px 22px;
}

.ink-topic-hero .breadcrumb {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid color-mix(in srgb, #fff 22%, transparent);
}

.ink-topic-hero:not(.ink-topic-hero--plain) .breadcrumb,
.ink-topic-hero:not(.ink-topic-hero--plain) .breadcrumb a {
  color: rgba(255, 255, 255, 0.88);
}

.ink-topic-hero:not(.ink-topic-hero--plain) .breadcrumb a:hover {
  color: #fff;
}

.ink-topic-hero-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.ink-topic-avatar {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.ink-topic-hero--plain .ink-topic-avatar {
  border-color: var(--color-border);
  box-shadow: var(--shadow-card);
}

.ink-topic-hero-text {
  flex: 1;
  min-width: 0;
}

.ink-topic-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  background: color-mix(in srgb, var(--color-primary) 14%, transparent);
  color: var(--color-primary);
}

.ink-topic-hero:not(.ink-topic-hero--plain) .ink-topic-badge {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(6px);
}

.ink-topic-hero-content h1 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--color-text);
}

.ink-topic-hero:not(.ink-topic-hero--plain) .ink-topic-hero-content h1 {
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.ink-topic-desc {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-muted);
  max-width: 720px;
}

.ink-topic-hero:not(.ink-topic-hero--plain) .ink-topic-desc {
  color: rgba(255, 255, 255, 0.88);
}

.ink-topic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 13px;
  color: var(--color-muted);
}

.ink-topic-hero:not(.ink-topic-hero--plain) .ink-topic-stats {
  color: rgba(255, 255, 255, 0.82);
}

.ink-topic-stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ink-topic-stats i {
  font-size: 15px;
  opacity: 0.85;
}

.ink-topic-feed {
  margin-top: 0;
}

.ink-topic-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ink-topic-feed-title {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ink-topic-feed-title i {
  color: var(--color-primary);
  font-size: 18px;
}

.ink-topic-feed-meta {
  font-size: 13px;
  color: var(--color-muted);
}

.ink-article > .breadcrumb {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.ink-subcats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--gap);
}

.ink-subcats a {
  padding: 6px 14px;
  background: var(--color-surface);
  border-radius: 20px;
  font-size: 13px;
  color: var(--color-muted);
  box-shadow: var(--shadow-card);
}

.ink-subcats a em { font-style: normal; opacity: 0.6; margin-left: 4px; }
.ink-subcats a:hover,
.ink-subcats a.is-active {
  color: var(--color-primary);
  text-decoration: none;
}

.ink-subcats a.is-active {
  background: color-mix(in srgb, var(--color-primary) 10%, var(--color-surface));
  font-weight: 500;
}

.ink-events-page-intro .breadcrumb {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.ink-author-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}

.ink-author-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.ink-author-card h2 {
  font-size: 17px;
  margin-bottom: 8px;
}

.ink-author-card h2 a {
  color: var(--color-text);
}

.ink-author-card h2 a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.ink-author-bio {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.ink-author-link {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ink-topic-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  margin: 0;
  padding: 0;
}

.ink-topic-grid-empty {
  grid-column: 1 / -1;
}

.ink-topic-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ink-topic-card-link:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.ink-topic-card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-primary) 12%, var(--color-hover)), var(--color-hover));
  overflow: hidden;
}

.ink-topic-card-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ink-topic-card-link:hover .ink-topic-card-cover {
  transform: scale(1.04);
}

.ink-topic-card-media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ink-topic-card-placeholder {
  font-size: 42px;
  color: color-mix(in srgb, var(--color-primary) 35%, var(--color-muted));
}

.ink-topic-card-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
}

.ink-topic-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}

.ink-topic-card-body h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
  color: var(--color-text);
}

.ink-topic-card-link:hover .ink-topic-card-body h2 {
  color: var(--color-primary);
}

.ink-topic-card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.ink-topic-card-more {
  margin-top: auto;
  font-size: 13px;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.ink-page-full { max-width: 900px; margin: 0 auto; }

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--color-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { margin: 0 6px; opacity: 0.5; }

/* ── Pagination ── */
.ink-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 0;
  font-size: 14px;
}

.ink-pagination a {
  padding: 8px 18px;
  background: var(--color-surface);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  color: var(--color-muted);
}

.ink-pagination a:hover { color: var(--color-primary); text-decoration: none; }
.ink-page-info { color: var(--color-muted); }

/* ── Footer ── */
.ink-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 20px;
}

.ink-footer-main {
  padding: 32px 0 24px;
}

.ink-footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 28px 32px;
  align-items: start;
}

.ink-footer-grid .yh-footer-col--widget {
  min-width: 0;
}

.ink-footer-grid .yh-footer-col--widget .yh-widgets--footer {
  gap: 16px;
}

.ink-footer-brand {
  min-width: 0;
}

.ink-footer-logo {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  margin-bottom: 8px;
}

.ink-footer-logo:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.ink-footer-slogan,
.ink-footer-desc {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--color-muted);
}

.ink-footer-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.ink-footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ink-footer-nav a {
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
}

.ink-footer-nav a:hover {
  color: var(--color-primary);
}

.ink-footer-nav-sub {
  padding-left: 12px;
  font-size: 12px;
}

.ink-footer-grid .yh-footer-col--nav .yh-footer-col-title,
.ink-footer-grid .yh-footer-col--nav .ink-footer-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.ink-footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: 14px 0;
  background: color-mix(in srgb, var(--color-hover) 55%, var(--color-surface));
}

.ink-footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.ink-footer-copy {
  margin: 0;
  font-size: 13px;
  color: var(--color-muted);
}

.ink-footer-bottom .footer-beian,
.ink-footer-bottom .site-beian {
  font-size: 12px;
  color: var(--color-muted);
}

/* ── Float tools ── */
.ink-float-tools {
  position: fixed;
  right: 20px;
  bottom: 80px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ink-tool-host {
  position: relative;
}

.ink-tool-item {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 20px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
  padding: 0;
  line-height: 1;
}

.ink-tool-item:hover { color: var(--color-primary); transform: translateY(-2px); text-decoration: none; }

.ink-tool-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.ink-tool-popup {
  position: absolute;
  right: calc(100% + 10px);
  bottom: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hover);
  padding: 12px;
  width: 160px;
  display: none;
  text-align: center;
  z-index: 2;
}

.ink-tool-popup p { font-size: 12px; color: var(--color-muted); margin-bottom: 8px; }
.ink-tool-popup img { width: 100%; border-radius: var(--radius-sm); }

.ink-tool-host.has-popup:hover .ink-tool-popup,
.ink-tool-host.has-popup.is-open .ink-tool-popup { display: block; }

@media (hover: none) {
  .ink-tool-host.has-popup:hover .ink-tool-popup { display: none; }
  .ink-tool-host.has-popup.is-open .ink-tool-popup { display: block; }
}

/* ── Error / Button ── */
.ink-error { text-align: center; padding: 80px 20px; }
.ink-error h1 { font-size: 72px; color: var(--color-primary); opacity: 0.3; }
.ink-error p { color: var(--color-muted); margin: 12px 0 24px; }

.ink-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
}

.ink-btn:hover { opacity: 0.9; color: #fff; text-decoration: none; }

/* ── Comments ── */
.ink-article .comments,
.comments {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.comments h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}

.comments h2 i { color: var(--color-primary); font-size: 20px; }

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 20px;
  background: var(--color-hover);
  border-radius: var(--radius-md);
}

.comment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--color-primary) 50%, var(--color-border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.comment-form textarea {
  min-height: 100px;
  resize: vertical;
  line-height: 1.65;
}

.comment-form button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
}

.comment-form button:hover { opacity: 0.92; transform: translateY(-1px); }

.comment-hint,
.comment-closed,
.comment-empty {
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.55;
}

.comment-list {
  list-style: none;
  margin-top: 8px;
  padding-top: 8px;
}

.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
}

.comment-item:last-child { border-bottom: none; }

.comment-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.comment-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--color-hover);
  border: 2px solid var(--color-border);
}

.comment-item.reply .comment-avatar {
  width: 36px;
  height: 36px;
}

.comment-main { flex: 1; min-width: 0; }

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 6px;
}

.comment-author { font-size: 14px; font-weight: 600; }

.comment-site {
  font-size: 12px;
  color: var(--color-muted);
}

.comment-head time {
  color: var(--color-muted);
  font-size: 12px;
}

.comment-text {
  margin: 0 0 8px;
  line-height: 1.65;
  font-size: 14px;
  color: #555;
}

.reply-btn {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reply-btn:hover { opacity: 0.85; }

.comment-replies {
  list-style: none;
  margin: 12px 0 0 52px;
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--color-primary) 25%, var(--color-border));
}

.comment-item.reply {
  padding: 12px 0;
  border-bottom: none;
}

/* ── Related posts (yh-related-posts 插件) ── */
.ink-article .related-posts,
.related-posts {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
}

.related-posts > h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.related-posts > h3::before {
  content: "\ea6c";
  font-family: "remixicon";
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 400;
}

.related-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.related-grid-list {
  grid-template-columns: 1fr;
}

.related-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.related-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.related-card-cover {
  display: block;
  overflow: hidden;
  background: var(--color-hover);
  line-height: 0;
}

.related-card-cover img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-card-cover img {
  transform: scale(1.03);
}

.related-card-body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-card .card-cat { margin-bottom: 2px; }

.related-card .tag-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
  color: var(--color-primary);
  text-decoration: none;
}

.related-card .tag-pill:hover {
  background: color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.related-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0;
}

.related-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.related-card h3 a:hover { color: var(--color-primary); }

.related-card .excerpt {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--color-muted);
  margin-top: auto;
  padding-top: 4px;
}

.related-card .meta i {
  margin-right: 3px;
  font-size: 13px;
  vertical-align: -1px;
}

.related-grid-list .related-card {
  flex-direction: row;
  align-items: stretch;
}

@media (min-width: 640px) {
  .related-grid-list .related-card-cover {
    flex: 0 0 200px;
    max-width: 200px;
  }

  .related-grid-list .related-card-cover img {
    height: 100%;
    min-height: 120px;
    aspect-ratio: auto;
  }
}

.related-posts-sidebar {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.related-posts-sidebar > h3 {
  font-size: 15px;
  margin-bottom: 14px;
}

.related-posts-sidebar .related-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

.related-posts-sidebar .related-card {
  flex-direction: row;
  box-shadow: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.related-posts-sidebar .related-card:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}

.related-posts-sidebar .related-card-cover {
  flex: 0 0 88px;
  max-width: 88px;
}

.related-posts-sidebar .related-card-cover img {
  aspect-ratio: 1;
  height: 100%;
  min-height: 88px;
}

.related-posts-sidebar .related-card-body {
  padding: 10px 12px;
}

.related-posts-sidebar .related-card h3 {
  font-size: 13px;
}

.related-posts-sidebar .related-card .excerpt {
  -webkit-line-clamp: 1;
  font-size: 12px;
}

.related-posts-sidebar .related-card .meta {
  font-size: 11px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .ink-layout.has-sidebar { grid-template-columns: 1fr; }
  .ink-sidebar.is-sticky { position: static; }
  .ink-article-layout { grid-template-columns: 1fr; }
  .ink-toc { display: none !important; }

  .ink-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ink-footer-brand,
  .ink-footer-grid .yh-footer-col--brand,
  .ink-footer-grid .yh-footer-col--widget {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .ink-header-inner {
    flex-wrap: wrap;
  }

  .ink-search { display: none; margin-left: 0; }
  .ink-search-toggle { display: block; margin-left: auto; }
  .ink-nav-toggle { display: block; }

  .ink-nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 12px;
    border-top: 1px solid var(--color-border);
  }

  .ink-nav.is-open { display: flex; }

  .ink-nav-link {
    width: 100%;
    padding: 10px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--color-hover);
    background: transparent;
  }

  .ink-nav-group {
    width: 100%;
  }

  .ink-nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 12px;
    display: none;
    background: transparent;
  }

  .ink-nav-group.is-open .ink-nav-dropdown {
    display: block;
  }

  .ink-nav-dropdown-link {
    padding: 8px 4px;
    border-bottom: 1px solid var(--color-hover);
  }

  body.is-search-open .ink-search {
    display: flex;
    order: 9;
    width: 100%;
    max-width: none;
    z-index: 10;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-hover);
    border-radius: var(--radius-md);
    padding: 8px;
  }

  .ink-footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .ink-footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .feed-card { flex-direction: column; padding: 16px; }
  .layout-thumb-right { flex-direction: column; }
  .feed-media-side { width: 100%; }
  .feed-media-grid { grid-template-columns: repeat(2, 1fr); }
  .ink-event-cover--gallery { grid-template-columns: repeat(2, 1fr); }
  .ink-article { padding: 20px 16px; }
  .ink-float-tools { right: 12px; bottom: 60px; }

  .comment-form .form-row { grid-template-columns: 1fr; }
  .comment-replies { margin-left: 36px; }
  .related-grid { grid-template-columns: 1fr; }
  .related-grid-list .related-card { flex-direction: column; }
  .related-grid-list .related-card-cover {
    flex: none;
    max-width: none;
  }
  .related-grid-list .related-card-cover img {
    aspect-ratio: 16 / 10;
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .ink-hero { aspect-ratio: 16 / 10; }
  .ink-hero-caption { font-size: 14px; padding: 30px 14px 12px; }
}
