/* ============================================================
   v2 Trend detail (article) page
   ============================================================ */

.trend-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
}

/* Breadcrumb */
.trend-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.trend-breadcrumb a {
  color: var(--ink-3);
  text-decoration: none;
  transition: color .12s;
}
.trend-breadcrumb a:hover { color: var(--blue); }
.trend-breadcrumb .sep { color: var(--ink-5); }

/* Header */
.trend-header {
  border-top: 1px solid var(--ink);
  padding-top: 28px;
  margin-bottom: 32px;
}
.trend-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 22px;
}
.trend-eyebrow .sep { color: var(--ink-5); }
.trend-eyebrow .trend-tag {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  transition: color .12s;
}
.trend-eyebrow a.trend-tag:hover { color: var(--blue-2); }
.trend-eyebrow .trend-author { color: var(--ink-2); font-style: italic; text-transform: none; letter-spacing: 0; font-family: "Source Serif 4", Georgia, serif; font-size: 14px; }

.trend-title {
  font-family: "Source Serif 4", "Source Serif Pro", Charter, Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
  text-wrap: balance;
}

.trend-cover {
  margin: 24px 0 36px;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.trend-cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* Body — editorial typography for prose content */
.trend-body {
  font-family: "Source Serif 4", "Source Serif Pro", Charter, Georgia, serif;
  font-feature-settings: "ss01", "lnum";
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  text-wrap: pretty;
}
.trend-body > *:first-child { margin-top: 0; }
.trend-body p { margin: 0 0 18px; }
.trend-body h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 40px 0 14px;
  color: var(--ink);
}
/* CKEditor wraps headings content in <span> with inline color (e.g. #434343).
   Force the editorial colour and weight regardless of inline style. */
.trend-body h2 span,
.trend-body h3 span,
.trend-body h4 span { color: inherit !important; background: transparent !important; }

.trend-body h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
  color: var(--ink);
  /* Editorial accent: short blue rule above heading */
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
}
.trend-body h3:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.trend-body h4 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 28px 0 10px;
  color: var(--blue);
}
.trend-body a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color .12s;
}
.trend-body a:hover { color: var(--blue-2); }
.trend-body strong { font-weight: 600; }
.trend-body em { font-style: italic; }
.trend-body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--blue);
  color: var(--ink-2);
  font-style: italic;
  font-size: 20px;
}
/* CKEditor sometimes wraps figures in <blockquote> for layout. When the
   blockquote contains a figure (image), drop the cite-style rule so the
   image isn't visually treated as a quote. */
.trend-body blockquote:has(> figure),
.trend-body blockquote:has(figure.image) {
  border-left: none;
  padding-left: 0;
  font-style: normal;
  color: inherit;
  font-size: inherit;
}
.trend-body ul, .trend-body ol {
  margin: 0 0 22px;
  padding-left: 24px;
}
.trend-body li { margin-bottom: 8px; }
.trend-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
}
.trend-body figure {
  margin: 24px 0;
}
.trend-body figcaption {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 8px;
}
.trend-body code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 1px 5px;
  border-radius: 2px;
}
.trend-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.trend-body th, .trend-body td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule-soft);
  text-align: left;
}
.trend-body th {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
  background: var(--blue-pale);
}

/* Prev/Next navigation */
.trend-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}
/* When only one card available — center it instead of leaving empty column */
.trend-pn.trend-pn--single {
  grid-template-columns: minmax(0, 480px);
  justify-content: center;
}
.trend-pn-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: var(--paper-2);
  text-decoration: none;
  color: inherit;
  transition: background .12s, transform .15s;
}
.trend-pn-card:hover {
  background: var(--blue-pale);
  transform: translateY(-2px);
}
.trend-pn-next { text-align: right; }
.trend-pn-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
}
.trend-pn-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.trend-pn-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ============================================================
   Related materials section — clean editorial block
   Goal: visually airy, no double-rules, paper-2 cards.
   ============================================================ */
.trend-related {
  padding: 80px var(--gutter) 64px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.trend-related-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-soft);
}
.trend-related-tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 500;
  text-decoration: none;
  transition: color .12s;
}
a.trend-related-tag:hover { color: var(--blue-2); }

.trend-related-h {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0;
}

.trend-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trend-related-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 26px 24px;
  background: var(--paper-2);
  text-decoration: none;
  color: inherit;
  transition: background .15s, transform .15s;
  min-height: 230px;
}
.trend-related-card:hover {
  background: var(--blue-pale);
  transform: translateY(-2px);
}
.trend-related-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.trend-related-card-tag { color: var(--blue); font-weight: 500; }
.trend-related-date { color: var(--ink-3); }
.trend-related-title {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink);
  font-weight: 500;
}
.trend-related-text {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trend-related-link {
  margin-top: auto;
  padding-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trend-related-link span { transition: transform .15s; }
.trend-related-card:hover .trend-related-link span { transform: translateX(3px); }

.trend-related-foot {
  margin-top: 36px;
  text-align: center;
}
.trend-related-all {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color .12s, border-color .12s;
}
.trend-related-all:hover {
  color: var(--blue);
  border-color: var(--blue);
}
.trend-related-all span { display: inline-block; transition: transform .15s; margin-left: 4px; }
.trend-related-all:hover span { transform: translateX(3px); }

@media (max-width: 1024px) {
  .trend-related-grid { grid-template-columns: repeat(2, 1fr); }
}
.trend-pn-related.news-pn-1 { grid-template-columns: minmax(0, 480px); justify-content: center; }
.trend-pn-related.news-pn-2 { grid-template-columns: 1fr 1fr; }
.trend-pn-related.news-pn-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 720px) {
  .trend-pn,
  .trend-pn-related.news-pn-1,
  .trend-pn-related.news-pn-2,
  .trend-pn-related.news-pn-3 { grid-template-columns: 1fr; }
  .trend-pn-next { text-align: left; }
  .trend-related-grid { grid-template-columns: 1fr; }
  .trend-article { padding: 32px var(--gutter); }
  .trend-title { font-size: clamp(32px, 8vw, 44px) !important; }
  .trend-related { padding: 48px var(--gutter); }
  .trend-related-h { font-size: clamp(28px, 7vw, 40px); }
}
