/* A shared title system for every appreciation article. */
body.article-title-unified .unified-article-heading {
  box-sizing: border-box;
  position: relative;
  width: min(calc(100% - 48px), 1500px) !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 auto 64px !important;
  padding: 0 24px 36px !important;
  text-align: center !important;
  transform: none !important;
}

body.article-title-unified .unified-article-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 45px;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

body.article-title-unified .unified-article-heading h1 {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: var(--ink) !important;
  font-family: var(--editorial-cn, "Songti SC", "STSong", "Jianshang Serif", serif) !important;
  font-size: inherit !important;
  font-weight: 600 !important;
  font-synthesis: none !important;
  line-height: 1.18 !important;
  letter-spacing: .01em !important;
  text-align: center !important;
  animation: none !important;
}

body.article-title-unified .unified-title-full {
  display: block;
  width: 100%;
  color: var(--ink);
  font-family: var(--editorial-cn, "Songti SC", "STSong", "Jianshang Serif", serif) !important;
  font-size: clamp(28px, 3.15vw, 52px);
  font-weight: 600;
  font-variant-numeric: lining-nums proportional-nums;
  line-height: 1.18;
  letter-spacing: .01em;
  text-wrap: balance;
}

body.article-title-unified .unified-article-heading :is(.subtitle, .meta, .meta-main, .meta-note, .unified-free-note) {
  max-width: 760px;
  margin-right: auto !important;
  margin-left: auto !important;
  text-align: center !important;
}

body.article-title-unified .unified-article-heading :is(.subtitle, .meta) {
  margin-top: 22px !important;
  margin-bottom: 0 !important;
  line-height: 1.7 !important;
}

body.article-title-unified .unified-article-heading .subtitle {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

body.article-title-unified .unified-article-heading .free-note {
  display: block !important;
  margin: 0 !important;
}

body.article-title-unified .unified-article-heading .unified-free-note {
  display: block !important;
  width: min(100%, 760px);
  margin: 0 auto !important;
  color: var(--muted) !important;
  font: inherit !important;
  line-height: 1.65 !important;
  text-align: center !important;
}

body.article-title-unified .unified-article-heading .meta {
  display: grid !important;
  justify-items: center;
  gap: 8px;
}

body.article-title-unified .unified-article-heading :is(.meta-main, .meta-note) {
  margin: 0 !important;
  line-height: 1.7 !important;
}

body.article-title-unified .unified-article-heading .rule {
  display: none !important;
}

body.article-title-unified .unified-title-full,
body.article-title-unified .unified-article-heading :is(.subtitle, .meta, .rule),
body.article-title-unified .unified-article-heading::after {
  opacity: 0;
  animation: appreciation-title-rise .76s cubic-bezier(.22, .72, .22, 1) both !important;
}

body.article-title-unified .unified-article-heading :is(.subtitle, .meta) { animation-delay: .11s !important; }
body.article-title-unified .unified-article-heading :is(.rule) { animation-delay: .19s !important; }
body.article-title-unified .unified-article-heading::after { animation-delay: .19s !important; }

@keyframes appreciation-title-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1180px) {
  body.article-title-unified .unified-title-full {
    white-space: nowrap;
    text-wrap: nowrap;
  }
}

/* Desktop chapter themes: one centered rhythm across every appreciation article. */
@media (min-width: 761px) {
  /*
   * One reading measure for every appreciation template. Older articles use
   * `.article`, while the imported finished pages use `.page`; both now share
   * the same geometry and paragraph rhythm.
   */
  body.article-title-unified :is(main.article, main.page) {
    box-sizing: border-box;
    width: min(calc(100% - 48px), 820px) !important;
    max-width: 820px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-top: clamp(76px, 7.4vw, 112px) !important;
    font-family: var(--reading-cn, var(--editorial-cn, "Songti SC", "STSong", "Jianshang Serif", serif)) !important;
    font-size: 18px !important;
    line-height: 1.92 !important;
    letter-spacing: .015em !important;
  }

  body.article-title-unified :is(main.article, main.page) > :is(
    p:not(.section-label):not(.chapter-kicker),
    blockquote,
    ul,
    ol
  ) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin-right: auto !important;
    margin-left: auto !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: var(--reading-weight, 400) !important;
    line-height: inherit !important;
    letter-spacing: inherit !important;
  }

  body.article-title-unified :is(main.article, main.page) > p:not(.section-label):not(.chapter-kicker) {
    margin-top: 0 !important;
    margin-bottom: 1.42em !important;
    text-align: justify !important;
    text-justify: inter-ideograph;
  }

  /* A masthead inside the narrow reading column still spans and centres on the viewport. */
  body.article-title-unified main.article > .unified-article-heading {
    width: min(calc(100vw - 48px), 1500px) !important;
    margin-right: 0 !important;
    margin-left: 50% !important;
    transform: translateX(-50%) !important;
  }

  body.article-title-unified .unified-article-heading {
    margin-top: 0 !important;
    margin-bottom: 64px !important;
    padding-top: 0 !important;
    padding-bottom: 36px !important;
  }

  /* Templates with a hero outside the reading column need the same top air. */
  body.article-title-unified > .unified-article-heading {
    margin-top: clamp(76px, 7.4vw, 112px) !important;
  }

  body.article-title-unified > .unified-article-heading + :is(main.article, main.page) {
    padding-top: 0 !important;
  }

  /* Decorated major chapter headings: these are intentional reading pauses. */
  body.article-title-unified :is(main.article, main.page) > :is(
    h2,
    .opening-section,
    .section-heading,
    .conclusion-title,
    .chapter-kicker,
    .section-label
  ) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(24px, 3vw, 54px);
    width: min(calc(100vw - 64px), 960px) !important;
    max-width: none !important;
    margin: 78px 0 48px 50% !important;
    padding: 0 !important;
    color: color-mix(in srgb, var(--ink) 52%, var(--accent) 48%) !important;
    font-family: var(--editorial-cn, "Songti SC", "STSong", "Jianshang Serif", serif) !important;
    font-size: clamp(30px, 2vw, 38px) !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: 1.18 !important;
    letter-spacing: .03em !important;
    text-align: center !important;
    transform: translateX(-50%) !important;
  }

  body.article-title-unified :is(main.article, main.page) > :is(
    h2,
    .opening-section,
    .section-heading,
    .conclusion-title,
    .chapter-kicker,
    .section-label
  )::before,
  body.article-title-unified :is(main.article, main.page) > :is(
    h2,
    .opening-section,
    .section-heading,
    .conclusion-title,
    .chapter-kicker,
    .section-label
  )::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center;
    transform: none !important;
    background: color-mix(in srgb, var(--line) 78%, transparent);
  }

}

@media (max-width: 760px) {
  body.article-title-unified .unified-article-heading {
    width: min(calc(100% - 32px), 1120px) !important;
    margin-bottom: 16px !important;
    padding: 30px 2px 34px !important;
  }

  body.article-title-unified .unified-article-heading::after { bottom: 12px; }

  body.article-title-unified .unified-title-full {
    width: min(100%, 16ch);
    margin-inline: auto;
    font-size: clamp(31px, 8.5vw, 42px);
    line-height: 1.3;
  }

  body.article-title-unified .unified-article-heading :is(.subtitle, .meta) {
    margin-top: 14px !important;
  }

  body.article-title-unified :is(main.article, main.page) > :is(
    h2,
    .opening-section,
    .section-heading,
    .conclusion-title,
    .chapter-kicker,
    .section-label
  ) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto) minmax(0, 1fr);
    align-items: center;
    column-gap: 18px;
    width: min(calc(100vw - 32px), 760px) !important;
    max-width: none !important;
    margin: 54px 0 30px 50% !important;
    padding: 0 !important;
    color: color-mix(in srgb, var(--ink) 62%, var(--accent) 38%) !important;
    font-family: var(--editorial-cn, "Songti SC", "STSong", "Jianshang Serif", serif) !important;
    font-size: clamp(25px, 7.2vw, 31px) !important;
    font-style: normal !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: .03em !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    transform: translateX(-50%) !important;
  }

  body.article-title-unified :is(main.article, main.page) > :is(
    h2,
    .opening-section,
    .section-heading,
    .conclusion-title,
    .chapter-kicker,
    .section-label
  )::before,
  body.article-title-unified :is(main.article, main.page) > :is(
    h2,
    .opening-section,
    .section-heading,
    .conclusion-title,
    .chapter-kicker,
    .section-label
  )::after {
    content: "";
    display: block !important;
    width: 100%;
    height: 1px;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center;
    transform: none !important;
    background: color-mix(in srgb, var(--line) 78%, transparent);
  }

  body.article-title-unified :is(main.article, main.page) > :is(
    h2,
    .opening-section,
    .section-heading,
    .conclusion-title,
    .chapter-kicker,
    .section-label
  ) > .unified-section-title {
    max-width: calc(100vw - 104px) !important;
  }

}

body.article-title-unified :is(main.article, main.page) > :is(
  h2,
  .opening-section,
  .section-heading,
  .conclusion-title,
  .chapter-kicker,
  .section-label
)::before { grid-column: 1; }

body.article-title-unified :is(main.article, main.page) > :is(
  h2,
  .opening-section,
  .section-heading,
  .conclusion-title,
  .chapter-kicker,
  .section-label
) > .unified-section-title {
  grid-column: 2;
  min-width: 0;
  max-width: min(100%, 22em);
  overflow-wrap: anywhere;
}

body.article-title-unified :is(main.article, main.page) > :is(
  h2,
  .opening-section,
  .section-heading,
  .conclusion-title,
  .chapter-kicker,
  .section-label
)::after { grid-column: 3; }

/* Shared VIDEO INFORMATION card: one structure for every existing issue card. */
body.article-title-unified .unified-source-card {
  width: min(calc(100vw - 48px), 960px);
  margin: 58px 0 66px 50%;
  padding: clamp(28px, 3vw, 42px);
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  border-radius: 28px;
  background: color-mix(in srgb, var(--paper) 96%, var(--accent) 4%);
  box-shadow: 0 18px 54px rgba(36, 25, 16, .055);
  color: var(--ink);
  font-family: var(--ui-cn, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif);
}

/* No.17: restore the three late source frames to their intended landscape view. */
body.article-title-unified main.page > .photo.photo--rotate-landscape {
  position: relative;
  aspect-ratio: var(--rotated-display-ratio);
  overflow: hidden;
}

body.article-title-unified main.page > .photo.photo--rotate-landscape > img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--rotated-source-ratio) * 100%) !important;
  height: auto !important;
  max-width: none !important;
  translate: -50% -50%;
  rotate: -90deg;
}

body.article-title-unified main.page > p.image-note {
  text-align: center !important;
}

body.article-title-unified .unified-source-card__head {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: .11em;
  text-align: left;
}

body.article-title-unified .unified-source-card__head i {
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--line) 84%, transparent);
}

body.article-title-unified .unified-source-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

body.article-title-unified .unified-source-card__fact {
  min-width: 0;
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px 30px;
  border: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
  border-radius: 19px;
  background: color-mix(in srgb, var(--paper) 98%, var(--ink) 2%);
}

body.article-title-unified .unified-source-card__fact small,
body.article-title-unified .unified-source-card__fact strong {
  display: block;
  font: inherit;
}

body.article-title-unified .unified-source-card__fact small {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
}

body.article-title-unified .unified-source-card__fact strong {
  color: var(--ink);
  font-family: var(--editorial-cn, "Songti SC", "STSong", serif);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .01em;
}

body.article-title-unified :is(
  .unified-source-card__fact--number,
  .unified-source-card__fact--price
) strong {
  font-family: Baskerville, "Times New Roman", var(--editorial-cn, "Songti SC", serif);
  font-size: clamp(38px, 4vw, 54px);
  font-weight: 400;
  line-height: 1.05;
}

body.article-title-unified .unified-source-card__value-line + .unified-source-card__value-line {
  margin-top: 7px;
}

body.article-title-unified .unified-source-card__value-line {
  display: block;
}

body.article-title-unified :is(
  .unified-source-card__fact--number,
  .unified-source-card__fact--price
) .unified-source-card__value-line:not(:only-child) {
  font-size: .58em;
  line-height: 1.3;
}

/* Legacy page-specific rules remain as a no-JavaScript fallback. */
body.article-title-unified .info:has(.info-fact-grid) {
  width: min(calc(100vw - 48px), 820px);
  padding: 28px;
}

body.article-title-unified .info-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.article-title-unified .info-fact {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 97%, var(--ink) 3%);
  font-family: var(--ui-cn, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif);
}

body.article-title-unified .info-fact small,
body.article-title-unified .info-fact b,
body.article-title-unified .info-fact strong {
  display: block;
  font: inherit;
}

body.article-title-unified .info-fact small {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
}

body.article-title-unified .info-fact b,
body.article-title-unified .info-fact strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.45;
}

body.article-title-unified .info-fact-number strong {
  font-family: Baskerville, "Times New Roman", Times, serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
}

/* No.47: the source card supports the article instead of dominating it. */
body.article-title-unified .source-facts.facts-with-profile {
  width: min(calc(100vw - 48px), 820px);
  padding: 26px;
  gap: 22px;
}

body.article-title-unified .facts-with-profile:has(.facts-profile) {
  grid-template-columns: 138px minmax(0, 1fr);
}

body.article-title-unified .facts-profile {
  width: 138px;
  border-radius: 14px;
}

body.article-title-unified .source-facts .facts-kicker {
  margin-bottom: 16px;
}

body.article-title-unified .source-facts .fact {
  padding: 15px 17px;
}

body.article-title-unified .source-facts .source-title span {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .02em;
}

body.article-title-unified .source-facts .source-title strong:empty {
  display: none;
}

@media (max-width: 760px) {
  body.article-title-unified .unified-source-card {
    width: calc(100vw - 28px);
    margin-top: 42px;
    margin-bottom: 48px;
    padding: 19px;
    border-radius: 20px;
  }

  body.article-title-unified .unified-source-card__head {
    gap: 12px;
    margin-bottom: 17px;
    font-size: 12px;
    letter-spacing: .075em;
  }

  body.article-title-unified .unified-source-card__grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.article-title-unified .unified-source-card__fact {
    min-height: 100px;
    padding: 19px 20px;
    border-radius: 15px;
  }

  body.article-title-unified .unified-source-card__fact small {
    margin-bottom: 8px;
    font-size: 13px;
  }

  body.article-title-unified .unified-source-card__fact strong {
    font-size: 21px;
  }

  body.article-title-unified :is(
    .unified-source-card__fact--number,
    .unified-source-card__fact--price
  ) strong {
    font-size: 36px;
  }

  body.article-title-unified .info:has(.info-fact-grid),
  body.article-title-unified .source-facts.facts-with-profile {
    width: calc(100vw - 28px);
    padding: 18px;
  }

  body.article-title-unified .info-fact-grid,
  body.article-title-unified .facts-with-profile:has(.facts-profile) {
    grid-template-columns: 1fr;
  }

  body.article-title-unified .facts-profile {
    width: 112px;
  }
}

@media (max-width: 760px) {
  html body.article-title-unified :is(main.article, main.page):has(> .unified-article-heading) {
    padding-top: 0 !important;
  }

  html body.article-title-unified > .unified-article-heading + :is(main.article, main.page) {
    padding-top: 20px !important;
  }

  html body.article-title-unified .unified-article-heading {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto 16px !important;
    padding: 30px 18px 44px !important;
    text-align: center !important;
  }

  html body.article-title-unified .unified-title-full {
    width: min(100%, 16ch) !important;
    margin-inline: auto !important;
    font-size: clamp(30px, 8.4vw, 34px) !important;
    line-height: 1.27 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-wrap: balance;
  }

  html body.article-title-unified .unified-article-heading :is(.unified-meta, .subtitle, .meta) {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 14px auto 0 !important;
    text-align: center !important;
  }

  html body.article-title-unified .unified-meta-line {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: baseline;
    gap: 0 6px;
    width: 100%;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.65;
    text-align: center;
  }

  html body.article-title-unified :is(.unified-meta-author, .unified-meta-separator, .unified-meta-date) {
    display: inline-block !important;
    white-space: nowrap !important;
  }

  html body.article-title-unified .unified-meta-disclosure {
    display: block;
    width: min(100%, 34em);
    margin: 7px auto 0;
    color: var(--muted);
    line-height: 1.65;
    text-align: center;
  }

  html body.article-title-unified .unified-free-note {
    display: block !important;
    width: 100% !important;
    margin: 7px auto 0 !important;
    font-size: 12px !important;
    line-height: 1.65 !important;
    text-align: center !important;
  }

  html body.article-title-unified .unified-article-heading::after {
    left: 50% !important;
    right: auto !important;
    bottom: 10px !important;
    width: 45px !important;
    transform: translateX(-50%) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.article-title-unified .unified-title-full,
  body.article-title-unified .unified-article-heading :is(.subtitle, .meta, .rule),
  body.article-title-unified .unified-article-heading::after {
    opacity: 1;
    animation: none !important;
  }
}
