/* 通用文章中心、文章归档与单篇文章。 */
.tw-article-index,
.tw-article-index * {
  min-width: 0;
}

.tw-article-index__header {
  max-width: 860px;
  margin-bottom: 24px;
}

.tw-article-categories {
  margin-bottom: clamp(28px, 4vw, 44px);
  overflow: hidden;
}

.tw-article-categories__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tw-article-categories a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--tw-line);
  border-radius: 999px;
  background: var(--tw-surface);
  color: var(--tw-text);
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.tw-article-categories a:hover,
.tw-article-categories a:focus-visible,
.tw-article-categories a[aria-current="page"] {
  border-color: var(--tw-accent);
  color: var(--tw-accent);
}

.tw-article-index .tw-entry-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
  align-items: stretch;
}

.tw-article-index .tw-entry-card {
  display: flex;
  min-width: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
  flex-direction: column;
}

.tw-article-index .tw-entry-card__image {
  flex: 0 0 auto;
  aspect-ratio: 16 / 10;
  margin: 0;
  border-radius: 0;
  background: var(--tw-surface-raised);
}

.tw-article-index .tw-entry-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tw-article-index .tw-entry-card__content {
  display: flex;
  min-width: 0;
  height: 100%;
  padding: clamp(20px, 2.3vw, 28px);
  flex: 1 1 auto;
  flex-direction: column;
}

.tw-article-index .tw-entry-meta {
  margin: 0 0 10px;
}

.tw-article-index .entry-title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--tw-text);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tw-article-index .entry-title a {
  color: inherit;
}

.tw-article-index .entry-summary {
  display: -webkit-box;
  margin-top: 14px;
  overflow: hidden;
  line-height: 1.75;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.tw-article-index .entry-summary > :first-child {
  margin-top: 0;
}

.tw-article-index .entry-summary > :last-child {
  margin-bottom: 0;
}

.tw-article-index .tw-entry-card__content > p:last-child {
  margin: auto 0 0;
  padding-top: 20px;
}

.tw-article-index .tw-entry-more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--tw-accent);
  font-weight: 800;
}

.tw-article-index .navigation.pagination {
  margin-top: clamp(32px, 5vw, 56px);
}

.tw-article-index .navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tw-article-index .navigation.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--tw-line);
  border-radius: 10px;
  background: var(--tw-surface);
  color: var(--tw-text);
  overflow-wrap: anywhere;
}

.tw-article-index .navigation.pagination .current,
.tw-article-index .navigation.pagination a:hover,
.tw-article-index .navigation.pagination a:focus-visible {
  border-color: var(--tw-accent);
  color: var(--tw-accent);
}

.single-post .tw-content-layout {
  padding-top: clamp(32px, 4vw, 52px);
}

.tw-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 800px) minmax(280px, 300px);
  justify-content: center;
  align-items: start;
  gap: clamp(36px, 4vw, 56px);
  min-width: 0;
}

.tw-single-layout--no-sidebar {
  grid-template-columns: minmax(0, 820px);
}

.tw-single-main,
.tw-article-sidebar {
  min-width: 0;
}

.tw-article-sidebar {
  align-self: stretch;
}

.single-post .tw-page-heading {
  margin-bottom: 20px;
}

.single-post .tw-page-heading h1 {
  overflow-wrap: anywhere;
}

.single-post .tw-entry-featured {
  display: grid;
  width: min(100%, 520px);
  max-width: 100%;
  max-height: 220px;
  margin: 0 0 24px;
  place-items: center;
  background: var(--tw-surface-soft);
}

.single-post .tw-entry-featured img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
}

.single-post .entry-content figure,
.single-post .entry-content .wp-block-image {
  width: fit-content;
  max-width: min(100%, 760px);
  margin-right: auto;
  margin-left: auto;
}

.single-post .entry-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 540px;
  margin-right: auto;
  margin-left: auto;
  object-fit: contain;
}

.tw-content-image-link {
  display: grid;
  width: fit-content;
  max-width: 100%;
  margin-right: auto;
  margin-left: auto;
  border-radius: 14px;
  cursor: zoom-in;
  text-decoration: none !important;
}

.tw-content-image-link:focus-visible {
  outline: 3px solid var(--tw-accent);
  outline-offset: 4px;
}

.tw-article-sidebar__inner {
  position: sticky;
  top: 32px;
  display: grid;
  max-height: calc(100vh - 64px);
  gap: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}

.admin-bar .tw-article-sidebar__inner {
  top: 64px;
  max-height: calc(100vh - 96px);
}

.tw-article-sidebar .widget {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--tw-line);
  border-radius: var(--tw-radius);
  background: var(--tw-surface);
}

.tw-article-sidebar .widget-title {
  margin: 0 0 14px;
  color: var(--tw-text);
  font-size: 1.05rem;
  line-height: 1.4;
}

.tw-article-sidebar ul,
.tw-article-sidebar ol {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.tw-article-sidebar a {
  color: var(--tw-text);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tw-article-sidebar a:hover,
.tw-article-sidebar a:focus-visible {
  color: var(--tw-accent);
}

.tw-lightbox[hidden] {
  display: none !important;
}

.tw-lightbox {
  position: fixed;
  z-index: 100000;
  inset: 0;
  display: grid;
  padding: clamp(56px, 7vw, 88px) clamp(16px, 4vw, 48px) clamp(20px, 4vw, 48px);
  place-items: center;
  background: rgba(10, 12, 22, 0.92);
}

body.tw-lightbox-open {
  overflow: hidden;
}

.tw-lightbox__image {
  display: block;
  width: auto;
  max-width: min(94vw, 1600px);
  height: auto;
  max-height: 86vh;
  object-fit: contain;
}

.tw-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: #fff;
  color: #111;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.tw-lightbox__close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 1180px) {
  .tw-single-layout {
    grid-template-columns: minmax(0, 820px);
  }

  .tw-article-sidebar {
    width: 100%;
    max-width: 820px;
  }

  .tw-article-sidebar__inner,
  .admin-bar .tw-article-sidebar__inner {
    position: static;
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }
}

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

@media (max-width: 640px) {
  .tw-article-index .tw-entry-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .tw-article-categories__list {
    gap: 8px;
  }

  .tw-article-categories a {
    padding-inline: 14px;
  }

  .single-post .tw-entry-featured,
  .single-post .tw-entry-featured img {
    max-height: 240px;
  }

  .single-post .tw-prose .entry-content {
    padding: 18px 16px;
    font-size: 16px;
    line-height: 1.75;
  }

  .single-post .entry-content p {
    margin-top: 0;
    margin-bottom: 1.15em;
    line-height: 1.75;
  }

  .single-post .entry-content h2 {
    margin-top: 1.65em;
    margin-bottom: 0.65em;
    line-height: 1.4;
  }

  .single-post .entry-content ul,
  .single-post .entry-content ol {
    margin-top: 0.85em;
    margin-bottom: 1.25em;
    padding-left: 1.55em;
  }

  .single-post .entry-content li {
    line-height: 1.7;
  }

  .single-post .entry-content li + li {
    margin-top: 0.45em;
  }

  .single-post .entry-content a {
    overflow-wrap: anywhere;
  }

  .single-post .entry-content img {
    max-height: 520px;
  }

  .tw-article-sidebar--hide-mobile {
    display: none;
  }
}
