.nav [data-nav="cat"] {
  display: inline-flex;
  align-items: center;
  gap: .4em;
}
.nav [data-nav="cat"] svg {
  width: 1em;
  height: 1em;
  flex: none;
}

.category-editions {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(24px, 5vw, 62px);
  border-top: 3px double var(--ink);
  padding-block: clamp(18px, 3vw, 32px);
}
.category-edition {
  min-width: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.category-edition:nth-child(even) {
  margin-top: clamp(20px, 4vw, 45px);
}
.category-edition > a {
  display: block;
  text-decoration: none;
}
.category-edition h3 {
  margin: .45rem 0 .3rem;
  padding-top: .28rem;
  border-top: 1px solid var(--ink);
  font-size: clamp(1rem, 1.9vw, 1.36rem);
  line-height: 1.4;
}
.category-edition > a:hover h3 {
  text-decoration: underline;
  text-underline-offset: .18em;
}
.category-edition .category-desc {
  font-size: .92rem;
  line-height: 1.55;
}
.archive-photo {
  border: 1px solid var(--ink);
  padding: 3px;
  background: var(--surface);
}
.archive-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: grayscale(.84) sepia(.28) contrast(1.06);
}
.photo-credit {
  margin-top: .4rem;
  font: .75rem/1.45 var(--sans);
  color: var(--ink2);
}
.photo-credit a { text-underline-offset: .13em; }
.category-lead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px 36px;
  padding: 0 0 18px;
  border-bottom: 3px double var(--ink);
}
.category-lead .pg-h { margin-bottom: .4em; }
.category-index-title { margin-bottom: .6em; }
#ctabs:empty { display: none; }

.sec { margin-top: clamp(48px, 7vw, 92px); }
.sec:first-child { margin-top: clamp(30px, 5vw, 56px); }
.sec-l { margin-bottom: clamp(16px, 2.4vw, 28px); padding-block: .45rem; }
.sec-l::after { content: none; }
.board-h h2 { letter-spacing: .12em; margin-right: -.12em; }
.btabs { flex-wrap: wrap; justify-content: flex-start; gap: .2rem 0; }
.brow, .it { display: block; padding-block: .87rem; }
.brow .m { margin-top: .32rem; }
.category-stories { margin-block: 1.25rem 1.5rem; }
.category-index-title { margin-bottom: .6em; }
.english-brand strong { letter-spacing: .015em; margin: 0; text-align: center; font-size: clamp(1.8rem, 5vw, 3.6rem); }
.english-brand::after, html[lang=en] .top .wrap::before, html[lang=en] .top .wrap::after { content: none; }
.english-topic-list { margin: .7em 0 .7em 1.4em; }
#p-weekly { max-width: 48rem; }
#p-weekly .newsletter-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1em; }
#p-weekly .newsletter-primary { padding: .4em .7em; background: var(--ink); color: var(--surface); }
#p-weekly details { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: .6rem; }
#p-weekly summary { cursor: pointer; }
.paper-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin-block: 2.4rem 0;
  padding-top: 1rem;
  border-top: 3px double currentColor;
  font-size: .94rem;
  line-height: 1.5;
}
.paper-next a {
  min-width: 0;
  border: 1px solid currentColor;
  padding: .75em .85em;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.paper-next a:hover strong { text-decoration: underline; }
.paper-next span { display: block; margin-bottom: .3em; font-size: .8em; }
.paper-next .previous { grid-column: 1; }
.paper-next .previous span::before { content: "← "; }
.paper-next .next { grid-column: 2; text-align: right; }
.paper-next .next span::after { content: " →"; }
@media (max-width: 520px) {
  .category-editions { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .category-edition:nth-child(even) { margin-top: 0; }
  .category-edition > a {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    grid-template-areas: "photo title" "photo description";
    column-gap: .8rem;
    align-items: start;
  }
  .category-edition:nth-child(even) > a {
    grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
    grid-template-areas: "title photo" "description photo";
  }
  .category-edition .archive-photo { grid-area: photo; }
  .category-edition h3 { grid-area: title; border: 0; margin-top: 0; padding-top: 0; }
  .category-edition .category-desc { grid-area: description; }
  .category-lead { grid-template-columns: minmax(0, 1fr); }
  .nav { justify-content: center; flex-wrap: wrap; }
  .nav a { padding-inline: 8px; letter-spacing: 0; }
}

#board > .brow > b {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#board > .brow { min-width: 0; padding-block: .58rem; }

.top .nav > a,
.preview-head .preview-nav > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .32em;
}
.top .nav > a svg,
.preview-head .preview-nav > a svg {
  width: .95em;
  height: .95em;
  flex: none;
}
.top .nav > a:is(:hover, :focus-visible):not(.on),
.preview-head .preview-nav > a:is(:hover, :focus-visible) {
  background: var(--ink, #29251d);
  color: #f6eddc;
}
body .preview-head .preview-nav { display: flex; flex-wrap: wrap; }
@media (max-width: 420px) {
  body .preview-head .preview-nav > a { padding-inline: .38rem; font-size: .83rem; }
}

.press-article .toc-disclosure > summary {
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding-inline: .25rem;
}
.press-article .toc-disclosure > summary:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.press-article #ai-search { margin-inline: auto; }

/* Keep the mobile track within the available width when headlines cannot wrap. */
@media (max-width: 860px) {
  #p-home .main { grid-template-columns: minmax(0, 1fr); }
}

#p-weekly { max-width: none; }
.weekly-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.weekly-sample { border-top: 3px double var(--ink); padding-top: .8rem; min-width: 0; }
.weekly-sample-subject { margin: .5rem 0 .8rem; font-size: .9rem; }
.weekly-sample-mail { background: #fbfcfa; color: #23362d; font: .93rem/1.55 system-ui, sans-serif; border: 1px solid #dbe6da; }
.weekly-sample-mail header { background: #204735; color: white; padding: .85rem 1rem; }
.weekly-sample-mail ol { padding: 0 1rem; margin: 0; list-style: none; }
.weekly-sample-mail li { border-bottom: 1px solid #dbe6da; padding: .85rem 0; }
.weekly-sample-mail h3 { font-size: 1rem; margin: .3rem 0; }
.weekly-sample-mail .weekly-sample-footer { background: #f7f9f5; padding: .75rem 1rem; font-size: .8rem; }
@media (max-width: 760px) { .weekly-layout { grid-template-columns: minmax(0, 1fr); } }

.trend-rank { list-style: none; margin: 0; padding: 0; }
.trend-rank li { display: grid; grid-template-columns: 2.3rem minmax(0, 1fr); align-items: center; column-gap: .5rem; }
.trend-rank li > span { justify-self: start; min-width: 1.7rem; text-align: center; font-variant-numeric: tabular-nums; }
.trend-rank li:nth-child(1) > span { background: #704819; color: #fff8e9; }
.trend-rank li:nth-child(2) > span { background: #455054; color: #fff8e9; }
.trend-rank li:nth-child(3) > span { background: #794b37; color: #fff8e9; }

/* Shared footer typography for the front page, reading pages and site information. */
.paper-footer .paper-links :is(a, button) {
  font: 600 .875rem/1.5 "Songti TC", "Noto Serif TC", "PMingLiU", serif;
}

body .paper-footer { display:block; background:transparent; color:var(--ink,#26231c); border-top:4px double currentColor; }
.paper-footer .paper-links { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:.4rem 1.15rem; }
.paper-footer .paper-links :is(a, button) { white-space:nowrap; }
