.category-page,
.article-page {
  --muted: #5b565c;
  --reading: 790px;
}

.category-page,
.article-page {
  scroll-padding-top: 8.875rem;
  overflow-x: clip;
  overflow-y: visible;
  background: var(--paper);
  color: var(--ink);
}

.category-page a:focus-visible,
.article-page a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 0.625rem 0.875rem;
  background: var(--paper);
  color: var(--rose-deep);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(var(--shell), calc(100% - 96px));
  margin-inline: auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5625rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.breadcrumb a:hover {
  color: var(--rose-deep);
}

/* Category archive */
.channel-page-header {
  position: relative;
  min-height: 300px;
  padding: 1.75rem 0 2rem;
  overflow: hidden;
  isolation: isolate;
  background: #30363a;
  color: #fff;
}

.channel-page-header::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: rgba(24, 27, 29, 0.55);
  content: "";
}

.channel-page-hero-image {
  display: block;
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.channel-page-header--product .channel-page-hero-image {
  object-position: 68% bottom;
}

.channel-page-header > .shell {
  display: flex;
  min-height: 240px;
  padding: 0;
  flex-direction: column;
}

.channel-page-header .breadcrumb {
  margin-bottom: auto;
  color: rgba(255, 255, 255, 0.82);
}

.channel-page-header .breadcrumb a:hover {
  color: #fff;
}

.channel-page-title-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 2.625rem;
  align-items: end;
}

.channel-page-header h1 {
  margin: 0;
  color: #fff;
  font-family: "Source Han Serif CN", serif;
  font-size: 2.625rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.channel-page-header .channel-page-intro {
  margin: 0 0 0.25rem;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.75;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-tabs {
  position: sticky;
  top: var(--global-header-height, 94px);
  z-index: 20;
  height: 58px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 250, 0.97);
}

.channel-tabs-inner {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 1.875rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.channel-tabs-inner > a:first-child {
  flex: 0 0 auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.channel-tabs-inner::-webkit-scrollbar {
  display: none;
}

.channel-tab {
  display: inline-flex;
  height: 100%;
  flex: 0 0 auto;
  align-items: center;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
}

.channel-tab:hover,
.channel-tab[aria-current="page"] {
  border-bottom-color: var(--rose);
  color: var(--rose-deep);
}

.channel-feed {
  padding: 2.25rem 0 3rem;
}

.channel-feed-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 0.9375rem;
  border-bottom: 1px solid rgba(33, 31, 36, 0.82);
  gap: 1.25rem;
}

.channel-feed-head h2 {
  margin: 0;
  font-family: "Source Han Serif CN", serif;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.channel-feed-head p {
  margin: 0 0 0.125rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.channel-feed-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1.75rem;
}

.channel-feed-item {
  display: grid;
  min-width: 0;
  min-height: 140px;
  grid-template-columns: 128px minmax(0, 1fr) 20px;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.channel-feed-item:nth-child(even) {
  padding-left: 1.75rem;
  border-left: 1px solid var(--line);
}

.channel-feed-thumb {
  width: 128px;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--panel);
}

.channel-feed-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.channel-feed-copy {
  min-width: 0;
}

.channel-feed-meta {
  display: flex;
  color: var(--gold-text);
  font-size: 0.75rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.channel-feed-copy h2,
.channel-feed-copy h3 {
  display: block;
  margin: 0.375rem 0 0;
  color: var(--ink);
  font-family: "Source Han Serif CN", serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.channel-feed-copy p {
  display: block;
  margin: 0.3125rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.65;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-feed-arrow {
  color: var(--rose-deep);
  font-size: 1.1875rem;
  transition: transform 160ms ease;
}

.channel-feed-item:hover .channel-feed-thumb img {
  transform: scale(1.025);
}
.channel-feed-item:hover .channel-feed-copy h2,
.channel-feed-item:hover .channel-feed-copy h3 {
  color: var(--rose-deep);
}
.channel-feed-item:hover .channel-feed-arrow {
  transform: translateX(3px);
}

.channel-feed-note {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.news-pagination {
  display: flex;
  min-height: 64px;
  padding-top: 0.875rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
}

.news-pagination-status {
  color: var(--muted);
  font-size: 0.8125rem;
}

.news-pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.news-pagination-controls .page-numbers,
.news-page-button,
.news-page-direction {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  padding: 0 0.625rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.8125rem;
}

.news-pagination-controls .page-numbers.current,
.news-page-button[aria-current="page"],
.news-page-button:hover,
.news-page-direction:hover {
  border-color: var(--rose);
  background: var(--rose);
  color: #fff;
}

/* Article reading page */
.article-masthead {
  padding: var(--yj-section-y-tight) 0;
  background: var(--paper);
}

.article-masthead .shell,
.article-hero {
  width: min(820px, calc(100% - 80px));
}

.article-masthead .breadcrumb {
  margin-bottom: 2.125rem;
}

.article-heading {
  display: block;
}

.article-meta-line {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.article-meta-line span {
  color: var(--rose-deep);
  font-weight: 600;
}
.article-meta-line time {
  font-variant-numeric: tabular-nums;
}

.article-heading h1 {
  max-width: none;
  margin: 1rem 0 0;
  font-family: "Source Han Serif CN", serif;
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: 0;
}

.article-deck {
  max-width: none;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-hero {
  height: auto;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 3px;
  background: var(--panel);
}

.article-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-body-section {
  padding: var(--yj-section-y-tight) 0 var(--yj-section-y);
}

.article-layout {
  display: block;
  width: min(760px, calc(100% - 80px));
}

.article-content > p:first-child,
.article-content p,
.article-content li {
  color: #464247;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.9;
}

.article-content > p:first-child {
  margin-top: 0;
  color: var(--ink);
}
.article-content p {
  margin: 0;
}
.article-content p + p {
  margin-top: 1.25rem;
}

.article-content h2 {
  margin: 3.25rem 0 1.125rem;
  scroll-margin-top: 9.875rem;
  font-family: "Source Han Serif CN", serif;
  font-size: 1.6875rem;
  font-weight: 600;
  line-height: 1.5;
}

.article-content #article-copy > h2:first-child {
  margin-top: 0;
}
.article-content h2::before {
  display: none;
}

.article-content ul,
.article-content ol {
  display: grid;
  margin: 1.25rem 0 0;
  padding-left: 1.5rem;
  gap: 0.5rem;
}

.article-content a {
  border-bottom: 1px solid var(--gold);
  color: var(--rose-deep);
}

.article-figure {
  margin: 2.375rem 0;
}

.article-figure img {
  display: block;
  width: 100%;
  max-height: 480px;
  border-radius: 3px;
  object-fit: cover;
}

.article-figure figcaption {
  margin-top: 0.625rem;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.fact-grid {
  display: grid;
  margin: 1.625rem 0 2.125rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2.5rem;
  border-top: 1px solid var(--line);
}

.fact-grid div {
  min-height: 0;
  padding: 1.0625rem 0;
  border-bottom: 1px solid var(--line);
}

.fact-grid div:nth-child(even) {
  border-left: 0;
}
.fact-grid dt {
  color: var(--gold-text);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.fact-grid dd {
  margin: 0.4375rem 0 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.65;
}

.article-callout {
  margin: 2.125rem 0;
  padding: 1.1875rem 1.375rem;
  border-left: 2px solid var(--rose);
  background: #f7f5f4;
}

.article-callout strong {
  display: block;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.55;
}

.article-callout p {
  margin-top: 0.4375rem;
  font-size: 1rem;
  line-height: 1.8;
}

.article-nav-bottom {
  display: flex;
  margin-top: 1.875rem;
  padding-top: 1.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.875rem;
  border-top: 1px solid var(--line);
}

.article-nav-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 0.5625rem;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
}

.article-nav-bottom a:hover {
  color: var(--rose-deep);
}

@media (max-width: 1440px) {
  .shell {
    width: min(var(--shell), calc(100% - 80px));
  }
}

@media (max-width: 1440px) {
  .shell {
    width: min(100% - 48px, 790px);
  }
  .channel-page-title-row {
    grid-template-columns: 1fr;
    gap: 1.125rem;
  }
  .channel-page-header .channel-page-intro {
    overflow: visible;
    text-align: left;
    white-space: normal;
  }
  .channel-feed-list {
    grid-template-columns: 1fr;
  }
  .channel-feed-item:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }
  .article-masthead .shell,
  .article-hero,
  .article-layout {
    width: min(100% - 48px, 790px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .category-page,
  .article-page {
    scroll-behavior: auto;
  }
  .channel-feed-thumb img {
    transition: none;
  }
}

@media (max-width: 680px) {
  .shell,
  .article-masthead .shell,
  .article-hero,
  .article-layout {
    width: min(100% - 28px, 790px);
  }

  .article-masthead {
    padding: 2rem 0 1.75rem;
  }

  .article-masthead .breadcrumb {
    margin-bottom: 1.25rem;
  }

  .article-meta-line {
    gap: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.55;
  }

  .article-heading h1 {
    margin-top: 0.75rem;
    font-size: 2rem;
    line-height: 1.28;
  }

  .article-deck {
    margin-top: 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.75;
  }

  .article-body-section {
    padding: 2rem 0 3rem;
  }

  .article-content > p:first-child,
  .article-content p,
  .article-content li {
    font-size: 0.9375rem;
    line-height: 1.8;
  }

  .article-content p + p {
    margin-top: 1rem;
  }

  .article-content h2 {
    margin: 2.25rem 0 0.875rem;
    scroll-margin-top: 5rem;
    font-size: 1.375rem;
    line-height: 1.42;
  }

  .article-content ul,
  .article-content ol {
    margin-top: 1rem;
    padding-left: 1.25rem;
    gap: 0.375rem;
  }
}
