@font-face {
  font-family: "BiaoXiaoZhi WuJieHei";
  src: url("./assets/fonts/biaoxiaozhi-wujiehei.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --paper: #f2efe7;
  --ink: #171714;
  --muted: #6f6c65;
  --accent: #f04b22;
  --line: 1px solid var(--ink);
  --page-gutter: clamp(48px, 10.5vw, 220px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
}

.newspaper {
  width: 100%;
  min-height: 100vh;
  padding: 24px var(--page-gutter) 48px;
  background:
    linear-gradient(rgba(23, 23, 20, 0.018) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 6px;
}

.masthead__kicker,
.issue-bar,
.story__eyebrow,
.edition-intro__meta,
.section-label {
  font-family: Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead__kicker {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: var(--line);
  font-size: 11px;
  font-weight: 700;
}

.masthead__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(190px, 15vw, 250px);
}

.masthead__title {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  font-family:
    "BiaoXiaoZhi WuJieHei", "Hiragino Sans", "PingFang SC", sans-serif;
  font-size: clamp(88px, 10vw, 176px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
  white-space: nowrap;
}

.masthead__title span:first-child {
  margin-left: -0.06em;
}

.masthead__title span:last-child {
  margin-right: -0.06em;
}

.issue-bar {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  min-height: 72px;
  padding: 9px 0;
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.issue-bar::before,
.issue-bar::after {
  position: absolute;
  right: 0;
  left: 0;
  content: "";
  border-top: 1px solid var(--ink);
}

.issue-bar::before {
  top: 5px;
}

.issue-bar::after {
  bottom: 5px;
}

.issue-bar p {
  margin: 0;
  text-align: center;
}

.issue-control {
  display: flex;
  gap: 14px;
  align-items: center;
}

.issue-control select {
  max-width: 140px;
  padding: 5px 22px 5px 8px;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font: inherit;
}

.edition-intro {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(260px, 340px);
  gap: 0;
  align-items: stretch;
  padding: 34px 0 32px;
  border-bottom: var(--line);
}

.edition-intro > .section-label {
  padding: 30px 24px 0 0;
  border-right: var(--line);
}

.edition-intro > div {
  padding: 0 clamp(28px, 3.5vw, 60px);
}

.section-label {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.edition-intro__meta {
  display: flex;
  justify-content: space-between;
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
}

.edition-intro h1 {
  max-width: 820px;
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(30px, 2.7vw, 46px);
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.edition-intro__note {
  display: flex;
  align-items: flex-end;
  margin: 0;
  padding: 24px 0 4px clamp(24px, 3vw, 48px);
  border-left: var(--line);
  background: rgba(23, 23, 20, 0.025);
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  line-height: 1.7;
}

.lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  border-bottom: var(--line);
}

.story {
  min-width: 0;
}

.story__link {
  position: relative;
  display: block;
  height: 100%;
}

.story--lead {
  border-right: var(--line);
}

.story--lead .story__link {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
}

.story__media {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  background: #d7d3cb;
}

.story__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(0.94);
  transition:
    filter 0.35s ease,
    transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.story__media--lead {
  min-height: 510px;
}

.story:hover .story__media img,
.story:focus-within .story__media img {
  filter: grayscale(0) contrast(1) saturate(1.08);
  transform: scale(1.018);
}

.story__content {
  padding: 24px;
}

.story__eyebrow {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  transition: color 0.25s ease;
}

.story:hover .story__eyebrow,
.story:focus-within .story__eyebrow {
  color: var(--accent);
}

.story h2,
.story h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  letter-spacing: -0.045em;
}

.story h2 {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.08;
}

.story h3 {
  font-size: clamp(25px, 2.5vw, 34px);
  line-height: 1.16;
}

.story__dek,
.story__content > p:last-child {
  margin: 24px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  line-height: 1.85;
}

.story__byline {
  padding-top: 18px;
  border-top: var(--line);
  font-size: 11px !important;
}

.briefing {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.briefing__head h2 {
  margin: 8px 0 32px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
}

.briefing__list {
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.briefing__list li {
  border-top: var(--line);
}

.briefing__list li:last-child {
  border-bottom: var(--line);
}

.briefing__list a {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 17px 0;
  font-size: 12px;
}

.briefing__list strong {
  font-size: 15px;
  line-height: 1.45;
}

.briefing__list time,
.briefing__list span {
  color: var(--muted);
  font: 700 9px / 1.5 Arial, sans-serif;
}

.briefing__list time {
  max-width: 74px;
  text-align: right;
  text-transform: uppercase;
}

.briefing__list a:hover strong,
.briefing__list a:focus-visible strong {
  color: var(--accent);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row dense;
}

.story-grid > .story {
  border-right: var(--line);
  border-bottom: var(--line);
}

.story-grid > .story:nth-child(2),
.story-grid > .story:nth-child(5),
.story-grid > .story:nth-child(7) {
  border-right: 0;
}

.story-grid .story__media {
  aspect-ratio: 4 / 3;
  min-height: 0;
  border-bottom: var(--line);
}

.story-grid .story__content {
  min-height: 270px;
}

.story-grid .story__content > p:last-child {
  margin-top: 16px;
}

.story--wide {
  grid-column: span 2;
}

.story--wide .story__link {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.story--wide .story__media {
  aspect-ratio: auto;
  min-height: 410px;
  border-right: var(--line);
  border-bottom: 0;
}

.story--wide .story__content {
  min-height: 410px;
}

.story--quote {
  color: var(--paper);
  background: var(--ink);
}

.story--quote .story__link {
  display: flex;
  flex-direction: column;
  min-height: 410px;
  padding: 24px;
}

.story--quote blockquote {
  margin: auto 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(25px, 2.5vw, 36px);
  line-height: 1.3;
}

.story__arrow {
  align-self: flex-end;
  color: var(--accent);
  font: 400 34px / 1 Arial, sans-serif;
}

.story--feature {
  grid-column: 1 / -1;
  border-right: 0 !important;
}

.story--feature .story__link {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
}

.story--feature .story__media {
  min-height: 460px;
  border-bottom: 0;
  border-left: var(--line);
}

.story--feature .story__content {
  display: flex;
  flex-direction: column;
  min-height: 460px;
}

.story--feature .story__arrow {
  margin-top: auto;
}

.story--index,
.story--source-card {
  min-height: 410px;
}

.story--index {
  padding: 24px;
  background:
    linear-gradient(rgba(23, 23, 20, 0.04) 1px, transparent 1px),
    #e9e5dc;
  background-size: 100% 6px;
}

.story--index h3,
.story--source-card h3 {
  margin: 10px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 1.12;
}

.weekly-index {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 48px;
  background: var(--ink);
  border: var(--line);
}

.weekly-index div {
  min-height: 104px;
  padding: 14px;
  background: var(--paper);
}

.weekly-index strong {
  display: block;
  font: 900 34px / 1 Arial, sans-serif;
}

.weekly-index span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.weekly-index__topics {
  grid-column: 1 / -1;
  min-height: 86px !important;
}

.story--source-card {
  color: var(--paper);
  background: var(--accent);
}

.story--source-card .story__link {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.story--source-card .section-label,
.story--source-card .story__eyebrow {
  color: var(--paper);
}

.story--source-card p {
  max-width: 32em;
  margin: 20px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 14px;
  line-height: 1.75;
}

.story--source-card .story__arrow {
  margin-top: auto;
  color: var(--paper);
}

.footer {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 64px;
  padding: 56px 0 0;
}

.footer__statement {
  justify-self: end;
  text-align: right;
}

.footer h2 {
  max-width: 560px;
  margin: 12px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.2;
}

.subscribe-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
}

.subscribe-form div {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 2px solid var(--ink);
}

.subscribe-form input,
.subscribe-form button {
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
}

.subscribe-form input:focus {
  outline: 0;
}

.subscribe-form button {
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.subscribe-form__privacy {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.footer__status {
  grid-column: 1 / -1;
  margin: 36px 0 0;
  padding-top: 12px;
  border-top: var(--line);
  color: var(--muted);
  font-size: 11px;
}

.community-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(36px, 5vw, 72px);
  padding: 48px 0;
  border-bottom: var(--line);
}

.community-panel__intro h2 {
  max-width: 480px;
  margin: 14px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.community-panel__intro > p:last-child {
  max-width: 32em;
  margin: 24px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 14px;
  line-height: 1.8;
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  border: var(--line);
  padding: 14px;
}

.community-card {
  display: grid;
  grid-template-columns: 1fr;
  min-width: 0;
  margin: 0;
  border: var(--line);
  background: var(--paper);
}

.community-card--dark {
  color: var(--paper);
  background: var(--ink);
}

.community-card__image {
  display: grid;
  min-height: 0;
  padding: 16px;
  place-items: center;
  border-right: 0;
  border-bottom: var(--line);
  background: #fff;
}

.community-card__image img {
  width: min(100%, 150px);
  aspect-ratio: 1;
  object-fit: contain;
}

.community-card figcaption {
  display: flex;
  flex-direction: column;
  min-height: 120px;
  padding: 18px;
}

.community-card figcaption > span {
  color: var(--accent);
  font: 800 9px / 1.4 Arial, sans-serif;
  letter-spacing: 0.08em;
}

.community-card figcaption strong {
  margin-top: auto;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.12;
}

.community-card figcaption p {
  margin: 10px 0 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  line-height: 1.7;
}

.reaction-panel {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 64px 0 24px;
}

.reaction-button {
  display: flex;
  gap: 18px;
  align-items: center;
  min-width: 250px;
  padding: 0;
  color: var(--ink);
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.reaction-button__icon {
  position: relative;
  display: grid;
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.reaction-button__icon svg {
  width: 34px;
  fill: currentcolor;
}

.reaction-button__icon i {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
}

.reaction-button__icon i:nth-of-type(1) {
  transform: translate(-31px, 1px);
}

.reaction-button__icon i:nth-of-type(2) {
  transform: translate(-5px, -16px);
}

.reaction-button__icon i:nth-of-type(3) {
  transform: translate(20px, 2px);
}

.reaction-button__copy strong,
.reaction-button__copy span {
  display: block;
}

.reaction-button__copy strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 20px;
}

.reaction-button__copy span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.reaction-button:hover .reaction-button__icon,
.reaction-button:focus-visible .reaction-button__icon,
.reaction-button[aria-pressed="true"] .reaction-button__icon {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-3px);
}

.reaction-button[aria-pressed="true"] .reaction-button__icon i {
  animation: heart-burst 0.55s ease both;
}

.reaction-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 8px;
}

.toast {
  position: absolute;
  bottom: 112px;
  left: 50%;
  z-index: 20;
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 300px;
  padding: 14px 18px;
  color: #fff;
  background: #1fa57a;
  box-shadow: 0 14px 50px rgba(23, 23, 20, 0.2);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast__check {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #1fa57a;
  border-radius: 50%;
  background: #fff;
  font-size: 20px;
}

@keyframes heart-burst {
  0% {
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--burst-x, 0), var(--burst-y, -28px)) scale(0.4);
  }
}

.reaction-button__icon i:nth-of-type(1) {
  --burst-x: -28px;
  --burst-y: -28px;
}

.reaction-button__icon i:nth-of-type(2) {
  --burst-x: 0;
  --burst-y: -40px;
}

.reaction-button__icon i:nth-of-type(3) {
  --burst-x: 28px;
  --burst-y: -28px;
}

@media (max-width: 900px) {
  .newspaper {
    padding-right: clamp(24px, 6vw, 54px);
    padding-left: clamp(24px, 6vw, 54px);
  }

  .masthead__brand {
    min-height: 130px;
  }

  .issue-bar {
    grid-template-columns: 1fr auto;
  }

  .issue-bar p {
    display: none;
  }

  .edition-intro {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .edition-intro > .section-label,
  .edition-intro__note {
    padding-right: 0;
    padding-left: 0;
    border-right: 0;
    border-left: 0;
  }

  .edition-intro > div {
    padding: 0;
  }

  .edition-intro__note {
    padding: 18px;
    border-top: var(--line);
  }

  .edition-intro__note {
    max-width: 520px;
  }

  .lead-layout,
  .story--lead .story__link {
    grid-template-columns: 1fr;
  }

  .story--lead {
    border-right: 0;
    border-bottom: var(--line);
  }

  .briefing {
    min-height: 420px;
  }

  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-grid > .story:nth-child(2),
  .story-grid > .story:nth-child(5),
  .story-grid > .story:nth-child(7) {
    border-right: var(--line);
  }

  .story-grid > .story:nth-child(even) {
    border-right: 0;
  }

  .story--wide,
  .story--feature {
    grid-column: 1 / -1;
  }

  .story--source-card {
    grid-column: 1 / -1;
    border-right: 0 !important;
  }

  .footer {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  .footer__statement {
    justify-self: start;
    text-align: left;
  }

  .community-panel {
    grid-template-columns: 1fr;
  }

  .community-grid {
    grid-template-columns: 1fr;
  }

  .community-card + .community-card {
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .newspaper {
    padding: 16px 18px 32px;
  }

  .masthead__kicker span:last-child,
  .issue-bar time {
    display: none;
  }

  .masthead__brand {
    display: block;
    min-height: 0;
    padding: 28px 0 20px;
  }

  .masthead__title {
    display: flex;
    margin-top: 8px;
    font-size: 44px;
    letter-spacing: 0;
    white-space: nowrap;
  }

  .issue-bar {
    grid-template-columns: 1fr;
  }

  .edition-intro {
    padding: 36px 0;
  }

  .story--lead .story__media--lead,
  .story--wide .story__media,
  .story--feature .story__media {
    min-height: 330px;
    aspect-ratio: auto;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-grid > .story,
  .story-grid > .story:nth-child(2),
  .story-grid > .story:nth-child(5),
  .story-grid > .story:nth-child(7) {
    grid-column: auto;
    border-right: 0;
  }

  .story--wide .story__link,
  .story--feature .story__link {
    grid-template-columns: 1fr;
  }

  .story--wide .story__media,
  .story--feature .story__media {
    border-right: 0;
    border-bottom: var(--line);
    border-left: 0;
  }

  .story--feature .story__content {
    min-height: 360px;
  }

  .story--index,
  .story--source-card {
    min-height: 360px;
  }

  .community-panel {
    padding: 48px 0;
  }

  .community-card {
    grid-template-columns: 1fr;
  }

  .community-card__image {
    min-height: 0;
    border-right: 0;
    border-bottom: var(--line);
  }

  .community-card figcaption {
    min-height: 130px;
  }

  .toast {
    bottom: 108px;
    left: 50%;
    width: min(320px, calc(100vw - 36px));
    min-width: 0;
  }
}

@media (hover: none) {
  .story__media img {
    filter: grayscale(0.15) contrast(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .story__media img,
  .toast,
  .reaction-button__icon {
    transition: none;
  }
}
