/* Editorial article layout — magazine / long-form feature */

:root {
  --paper: #fafaf8;
  --ink: #1a1a1a;
  --ink-soft: #3d3d3d;
  --muted: #6b6b6b;
  --rule: #d8d5ce;
  --accent: #8b1e1e;
  --measure: 38rem;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC",
    "SimSun", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 52px;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8125rem;
}

.topbar-brand {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topbar-brand:hover {
  color: var(--accent);
}

.topbar-links {
  display: flex;
  gap: 1.25rem;
}

.topbar-links a {
  color: var(--muted);
  text-decoration: none;
}

.topbar-links a:hover {
  color: var(--ink);
}

/* Article shell */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem clamp(1.15rem, 4vw, 1.5rem) 4rem;
}

.article-header {
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.article-header h1 {
  font-size: clamp(1.85rem, 4.8vw, 2.55rem);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0.01em;
  margin-bottom: 1.15rem;
}

.dek {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1.35rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.35rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

.meta .dot {
  width: 3px;
  height: 3px;
  margin: 0 0.35rem;
  border-radius: 50%;
  background: var(--rule);
}

/* Lead image */
.lead-figure {
  margin: 0 0 2.5rem;
}

.lead-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 28%;
}

.lead-figure figcaption,
.inline-figure figcaption {
  font-family: var(--sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 0.65rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--rule);
}

/* Body */
.article-body > * + * {
  margin-top: 1.35rem;
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  margin-top: 2.75rem;
  margin-bottom: 0.85rem;
  letter-spacing: 0.01em;
}

.article-body p {
  color: var(--ink);
  max-width: var(--measure);
}

.dropcap::first-letter {
  float: left;
  font-size: 3.6rem;
  line-height: 0.85;
  font-weight: 700;
  padding: 0.12em 0.12em 0 0;
  color: var(--accent);
  font-family: var(--serif);
}

.inline-figure {
  margin: 2.25rem 0;
}

.inline-figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.inline-figure.narrow {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.inline-figure.narrow img {
  aspect-ratio: 3 / 2;
}

/* Pull quote */
.pullquote {
  margin: 2.75rem 0;
  padding: 1.5rem 0 1.5rem 1.25rem;
  border-left: 3px solid var(--accent);
}

.pullquote p {
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  max-width: none;
}

/* End note */
.endnote {
  margin-top: 3.5rem;
  padding: 2rem 0 0;
  border-top: 1px solid var(--rule);
}

.endnote-brand {
  margin-bottom: 1.25rem;
}

.endnote-brand img {
  height: 40px;
  width: auto;
}

.endnote p {
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.endnote-phone {
  margin-top: 0.85rem !important;
}

.endnote-phone a {
  font-family: var(--sans);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}

.endnote-phone a:hover {
  color: var(--accent);
}

.endnote-tagline {
  margin-top: 1rem !important;
  color: var(--muted) !important;
  font-size: 0.875rem !important;
}

/* Footer */
.article-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(1.15rem, 4vw, 1.5rem) 3.5rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}

.article-footer a {
  color: var(--muted);
  text-decoration: none;
}

.article-footer a:hover {
  color: var(--accent);
}

@media (max-width: 560px) {
  body {
    font-size: 1.0625rem;
    line-height: 1.8;
  }

  .article {
    padding-top: 1.75rem;
  }

  .dropcap::first-letter {
    font-size: 3rem;
  }

  .lead-figure img {
    aspect-ratio: 5 / 4;
  }

  .topbar-links a:first-child {
    display: none;
  }
}

@media print {
  .topbar {
    position: static;
    border: 0;
  }

  .topbar-links {
    display: none;
  }

  body {
    background: #fff;
  }

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