/* Article list and detail pages */
.article-hub-main,
.article-detail-main {
  min-height: calc(100vh - 220px);
  padding: 34px 0 64px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.09) 0%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(225deg, rgba(34, 199, 216, 0.055) 0%, rgba(255, 255, 255, 0) 36%),
    transparent;
}

.article-container {
  width: min(var(--tz-page-width), calc(100% - 56px));
  margin: 0 auto;
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 28px;
  margin-bottom: 20px;
  padding: 34px;
  border: 1px solid var(--tz-line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 255, 0.82)),
    #fff;
  box-shadow: var(--tz-shadow-soft);
}

.article-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--tz-primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.article-hero h1,
.article-detail-hero h1 {
  margin: 0;
  color: var(--tz-text);
  font-weight: 880;
  line-height: 1.2;
}

.article-hero h1 {
  font-size: 34px;
}

.article-hero p {
  max-width: 840px;
  margin: 12px 0 0;
  color: var(--tz-muted);
  font-size: 15px;
  line-height: 1.8;
}

.article-hero-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 170px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(var(--tz-primary-rgb), 0.11), rgba(34, 199, 216, 0.12));
}

.panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: #fff;
  color: var(--tz-primary);
  font-size: 20px;
  box-shadow: var(--tz-shadow-card);
}

.article-hero-panel strong {
  display: block;
  color: var(--tz-primary-dark);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.article-hero-panel span:last-child {
  color: #64748b;
  font-size: 13px;
  font-weight: 760;
}

.article-category-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.article-category-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(133, 116, 161, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(34, 46, 75, 0.04);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.article-category-pill:hover,
.article-category-pill.active {
  transform: translateY(-1px);
  border-color: rgba(var(--tz-primary-rgb), 0.34);
  background: rgba(var(--tz-primary-rgb), 0.1);
  color: var(--tz-primary);
}

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

.article-feed {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.article-list-item {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--tz-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--tz-shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.article-list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--tz-primary-rgb), 0.24);
  box-shadow: var(--tz-shadow-hover);
}

.article-thumb {
  display: block;
  width: 148px;
  aspect-ratio: 1 / 0.74;
  border-radius: 16px;
  background: #f3f4f8;
  overflow: hidden;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-item-body {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}

.article-item-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #7a8798;
  font-size: 13px;
  font-weight: 700;
}

.article-item-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.article-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(var(--tz-primary-rgb), 0.1);
  color: var(--tz-primary);
  font-size: 12px;
  font-weight: 850;
}

.article-item-body h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 850;
}

.article-item-body h2 a {
  color: #1f2937;
}

.article-item-body h2 a:hover {
  color: var(--tz-primary);
}

.article-item-body p {
  display: -webkit-box;
  margin: 0;
  color: #65748a;
  font-size: 14px;
  line-height: 1.75;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-read-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  color: var(--tz-primary);
  font-size: 13px;
  font-weight: 850;
}

.article-read-link i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.article-read-link:hover i {
  transform: translateX(3px);
}

.article-sidebar {
  position: sticky;
  top: 92px;
}

.article-side-section {
  padding: 22px;
  border: 1px solid var(--tz-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--tz-shadow-card);
}

.side-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 880;
}

.side-section-title i {
  color: var(--tz-primary);
}

.side-link-list {
  display: grid;
  gap: 10px;
}

.side-article-link {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.72);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.side-article-link:hover {
  transform: translateY(-1px);
  background: rgba(var(--tz-primary-rgb), 0.08);
}

.side-article-link span {
  color: #273247;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.side-article-link small {
  color: #7a8798;
  font-size: 12px;
}

.article-empty {
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 44px;
  border: 1px dashed rgba(var(--tz-primary-rgb), 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  color: #7a8798;
  text-align: center;
}

.article-empty i {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(var(--tz-primary-rgb), 0.1);
  color: var(--tz-primary);
  font-size: 22px;
}

.article-empty strong {
  color: #273247;
  font-size: 17px;
}

.article-pagination {
  display: flex;
  justify-content: center;
  padding: 8px 0 0;
}

.article-pagination nav,
.article-pagination .pagination {
  margin: 0;
}

.article-pagination .pagination {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
}

.article-pagination li {
  display: inline-flex;
}

.article-pagination a,
.article-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(var(--tz-primary-rgb), 0.16);
  border-radius: 11px;
  background: #fff;
  color: #637189;
  font-size: 13px;
  font-weight: 780;
}

.article-pagination .active span {
  background: var(--tz-primary);
  color: #fff;
}

.article-detail-container {
  width: min(var(--tz-page-width), calc(100% - 56px));
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: #7a8798;
  font-size: 13px;
  font-weight: 760;
}

.article-breadcrumb a {
  color: #64748b;
}

.article-breadcrumb a:hover {
  color: var(--tz-primary);
}

.article-breadcrumb i {
  font-size: 10px;
  color: #a7b1c0;
}

.article-detail-card {
  border: 1px solid var(--tz-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--tz-shadow-soft);
  overflow: hidden;
}

.article-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 26px;
  align-items: center;
  padding: 34px;
  border-bottom: 1px solid var(--tz-line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 244, 255, 0.82));
}

.article-detail-hero h1 {
  font-size: 34px;
}

.detail-meta {
  margin-top: 16px;
}

.detail-cover {
  width: 220px;
  aspect-ratio: 1 / 0.72;
  border-radius: 18px;
  object-fit: cover;
  background: #f3f4f8;
  box-shadow: var(--tz-shadow-card);
}

.article-content-body {
  padding: 34px;
  color: #263047;
  font-size: 16px;
  line-height: 1.95;
}

.article-content-body > *:first-child {
  margin-top: 0;
}

.article-content-body > *:last-child {
  margin-bottom: 0;
}

.article-content-body h2,
.article-content-body h3,
.article-content-body h4 {
  margin: 1.6em 0 0.7em;
  color: #172033;
  line-height: 1.36;
  font-weight: 850;
}

.article-content-body h2 {
  font-size: 25px;
}

.article-content-body h3 {
  font-size: 21px;
}

.article-content-body p {
  margin: 0 0 1.1em;
}

.article-content-body a {
  color: var(--tz-primary);
  font-weight: 760;
}

.article-content-body img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: var(--tz-shadow-card);
}

.article-content-body blockquote {
  margin: 1.3em 0;
  padding: 16px 18px;
  border-left: 4px solid var(--tz-primary);
  border-radius: 14px;
  background: rgba(var(--tz-primary-rgb), 0.07);
  color: #4b5870;
}

.article-content-body pre {
  overflow-x: auto;
  padding: 16px;
  border-radius: 16px;
  background: #121827;
  color: #e5e7eb;
}

.article-content-body code {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(var(--tz-primary-rgb), 0.09);
  color: var(--tz-primary-dark);
}

.article-content-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.article-detail-actions {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

.back-article-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(var(--tz-primary-rgb), 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--tz-primary);
  font-size: 14px;
  font-weight: 850;
  box-shadow: var(--tz-shadow-card);
}

.back-article-link:hover {
  background: rgba(var(--tz-primary-rgb), 0.1);
}

@media (max-width: 1120px) {
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .article-hub-main,
  .article-detail-main {
    padding: 22px 0 92px;
  }

  .article-container,
  .article-detail-container {
    width: min(100% - 28px, 720px);
  }

  .article-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .article-hero h1,
  .article-detail-hero h1 {
    font-size: 28px;
  }

  .article-hero-panel {
    width: 100%;
  }

  .article-category-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .article-category-pill {
    white-space: nowrap;
  }

  .article-list-item {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
  }

  .article-thumb {
    width: 112px;
    border-radius: 14px;
  }

  .article-item-body h2 {
    font-size: 17px;
  }

  .article-item-body p {
    -webkit-line-clamp: 2;
    font-size: 13px;
  }

  .article-detail-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .detail-cover {
    width: 100%;
  }

  .article-content-body {
    padding: 24px;
    font-size: 15px;
  }
}

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

  .article-thumb {
    width: 100%;
  }

  .article-read-link {
    display: none;
  }
}

@media (max-width: 768px) {
  .article-hub-main,
  .article-detail-main {
    padding: 10px 0 96px;
  }

  .article-container,
  .article-detail-container {
    width: 100%;
    max-width: 720px;
    padding: 0 12px;
  }

  .article-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 14px;
    border-radius: 8px;
  }

  .article-hero-copy {
    min-width: 0;
  }

  .article-kicker {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .article-hero h1,
  .article-detail-hero h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  .article-hero p {
    display: -webkit-box;
    margin-top: 6px;
    color: #5b6b82;
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .article-hero-panel {
    display: none;
  }

  .panel-icon {
    display: none;
  }

  .article-hero-panel strong {
    font-size: 24px;
  }

  .article-hero-panel span:last-child {
    font-size: 12px;
    line-height: 1.2;
  }

  .article-category-bar {
    position: sticky;
    top: 56px;
    z-index: 30;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 -12px 12px;
    padding: 8px 12px;
    overflow-x: auto;
    border-top: 1px solid rgba(133, 116, 161, 0.12);
    border-bottom: 1px solid rgba(133, 116, 161, 0.12);
    background: rgba(248, 244, 255, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    scrollbar-width: none;
  }

  .article-category-bar::-webkit-scrollbar {
    display: none;
  }

  .article-category-pill {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    box-shadow: 0 6px 16px rgba(24, 39, 75, 0.06);
    white-space: nowrap;
  }

  .article-category-pill:hover,
  .article-category-pill.active {
    background: var(--tz-primary);
    color: #fff;
  }

  .article-layout {
    display: block;
  }

  .article-feed {
    gap: 10px;
  }

  .article-list-item {
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 24px rgba(24, 39, 75, 0.08);
  }

  .article-list-item:hover {
    transform: none;
  }

  .article-thumb {
    width: 104px;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }

  .article-item-body {
    align-content: start;
    gap: 6px;
  }

  .article-item-body h2 {
    order: 1;
    font-size: 15px;
    line-height: 1.38;
  }

  .article-item-body h2 a {
    display: -webkit-box;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .article-item-meta {
    order: 2;
    gap: 6px;
    font-size: 11.5px;
    line-height: 1.35;
  }

  .article-chip {
    min-height: 22px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 11.5px;
  }

  .article-item-meta span {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .article-item-body p {
    order: 3;
    color: #64748b;
    font-size: 12.5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
  }

  .article-read-link {
    order: 4;
    display: inline-flex;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 8px;
    background: rgba(var(--tz-primary-rgb), 0.08);
    font-size: 12px;
  }

  .article-sidebar {
    display: none;
  }

  .article-detail-card,
  .article-detail-hero,
  .detail-cover,
  .article-content-body img,
  .article-content-body blockquote,
  .article-content-body pre,
  .back-article-link {
    border-radius: 8px;
  }

  .article-breadcrumb {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .article-detail-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .detail-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .detail-meta {
    margin-top: 10px;
    gap: 8px;
    font-size: 12px;
  }

  .article-content-body {
    padding: 16px;
    font-size: 15px;
    line-height: 1.85;
  }

  .article-content-body h2 {
    font-size: 21px;
  }

  .article-content-body h3 {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .article-list-item {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .article-thumb {
    width: 92px;
  }

  .article-item-body h2 {
    font-size: 14.5px;
  }

  .article-item-body p {
    -webkit-line-clamp: 1;
  }
}
