/* -------------------------------------------------------- */
/* 🔹 Article                                               */
/* -------------------------------------------------------- */
/* One article — readable line length, the markdown body's   */
/* headings, lists and tables, sources and the app CTA       */

.article {
  padding-block: var(--space-xxxl) var(--website-section-spacing);
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xl);
  font-size: var(--text-body-medium);
  font-weight: var(--text-title-weight);
  color: var(--color-primary);
  text-decoration: none;
}

.article__back svg {
  width: 16px;
  height: 16px;
}

.article__title {
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-primary);
  text-wrap: balance;
  margin-bottom: var(--space-l);
}

.article__lead {
  font-size: var(--text-title-large);
  line-height: 1.6;
  color: var(--color-on-surface-variant);
  margin-bottom: var(--space-l);
}

.article__meta {
  font-size: var(--text-body-medium);
  color: var(--color-on-surface-variant);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-outline);
  margin-bottom: var(--space-xxl);
}


/* -------------------------------------------------------- */
/* 🔹 Body                                                  */
/* -------------------------------------------------------- */

.article__body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--color-on-surface);
}

.article__body > * + * {
  margin-top: var(--space-l);
}

.article__body h2 {
  margin-top: var(--space-xxxxl);
  font-size: var(--text-headline-large);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-on-surface);
}

.article__body h3 {
  margin-top: var(--space-xl);
  font-size: var(--text-headline-medium);
  font-weight: var(--text-title-weight);
  color: var(--color-on-surface);
}

.article__body ul,
.article__body ol {
  padding-left: var(--space-xl);
}

.article__body li + li {
  margin-top: var(--space-s);
}

.article__body a {
  color: var(--color-primary);
}

.article__body strong {
  font-weight: var(--text-title-weight);
}

.article__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body-medium);
}

.article__body th,
.article__body td {
  padding: var(--space-s) var(--space-m);
  border-bottom: 1px solid var(--color-outline);
  text-align: left;
}

.article__body td:last-child,
.article__body th:last-child {
  text-align: right;
  white-space: nowrap;
}

.article__body tr:last-child td {
  font-weight: var(--text-title-weight);
}

/* A picture in the body — centered, never wider than the text */
.article__body figure {
  margin-inline: 0;
  margin-block-end: 0;
}

.article__body figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

/* A map stays narrow, so it doesn't fill the screen top to bottom */
.article__map img {
  width: 260px;
}

.article__body blockquote {
  padding: var(--space-l) var(--space-xl);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background-color: var(--color-primary-container);
  color: var(--color-on-surface);
}


/* -------------------------------------------------------- */
/* 🔹 Sources                                               */
/* -------------------------------------------------------- */

.article__sources {
  margin-top: var(--space-xxxxl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-outline);
  font-size: var(--text-body-medium);
  color: var(--color-on-surface-variant);
}

.article__sources-title {
  font-size: var(--text-title-medium);
  font-weight: var(--text-title-weight);
  color: var(--color-on-surface);
  margin-bottom: var(--space-s);
}

.article__sources ul {
  padding-left: var(--space-xl);
}

.article__sources li + li {
  margin-top: var(--space-xs);
}

.article__sources a {
  color: var(--color-primary);
}


/* -------------------------------------------------------- */
/* 🔹 Call to action                                        */
/* -------------------------------------------------------- */

.article__cta {
  margin-top: var(--space-xxxxl);
  padding: var(--space-xxl);
  border-radius: var(--radius);
  background-color: var(--color-primary-container);
}

.article__cta-title {
  font-size: var(--text-headline-medium);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-s);
}

.article__cta-text {
  font-size: var(--text-body-large);
  line-height: 1.6;
  color: var(--color-on-surface-variant);
  margin-bottom: var(--space-xl);
}

.article__cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-l) var(--space-xl);
}

.article__cta-badge img {
  height: 48px;
  width: auto;
}

.article__cta-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-body-large);
  font-weight: var(--text-title-weight);
  color: var(--color-primary);
  text-decoration: none;
}

.article__cta-link svg {
  width: 18px;
  height: 18px;
}


/* -------------------------------------------------------- */
/* 🔹 Mobile                                                */
/* -------------------------------------------------------- */

@media (max-width: 767px) {
  .article__title {
    font-size: 30px;
  }

  .article__lead {
    font-size: var(--text-body-large);
  }

  .article__body {
    font-size: var(--text-body-large);
  }

  .article__body h2 {
    font-size: var(--text-headline-medium);
  }

  .article__cta {
    padding: var(--space-xl);
  }
}


/* -------------------------------------------------------- */
/* 🔹 Year Lines                                            */
/* -------------------------------------------------------- */
/* _includes/components/article_year_lines.njk — legend,     */
/* then the y axis, the plot and the end labels side by side, */
/* the years below. SE1 is drawn wider underneath, so where   */
/* SE2 runs on top of it both colors still show               */

.year-lines__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-l);
  font-size: var(--text-body-medium);
  color: var(--color-on-surface-variant);
}

.year-lines__legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
}

.year-lines__key {
  width: 16px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--series-color);
}

.year-lines__chart {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 4.5rem;
  grid-template-rows: 14rem auto;
  column-gap: var(--space-s);
  margin-top: var(--space-xl);
  font-size: 13px;
  line-height: 1;
  color: var(--color-on-surface-variant);
}

.year-lines__axis,
.year-lines__plot,
.year-lines__labels,
.year-lines__years {
  position: relative;
}

.year-lines__axis span {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
}

.year-lines__grid {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid var(--color-outline);
}

.year-lines__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.year-lines__line {
  fill: none;
  stroke: var(--series-color);
  stroke-width: 2.5px;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.year-lines__line--1 {
  stroke-width: 6px;
}

.year-lines__dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--series-color);
  transform: translate(-50%, -50%);
}

.year-lines__dot--1 {
  width: 10px;
  height: 10px;
}

.year-lines__label {
  position: absolute;
  left: 0;
  transform: translateY(-50%);
  white-space: nowrap;
  color: var(--color-on-surface);
  font-variant-numeric: tabular-nums;
}

.year-lines__years {
  grid-column: 2;
  height: 1.5rem;
  margin-top: var(--space-s);
}

.year-lines__years span {
  position: absolute;
  transform: translateX(-50%);
}

.year-lines__key--1,
.year-lines__line--1,
.year-lines__dot--1 {
  --series-color: var(--color-chart-series-1);
}

.year-lines__key--2,
.year-lines__line--2,
.year-lines__dot--2 {
  --series-color: var(--color-chart-series-2);
}

.year-lines__key--3,
.year-lines__line--3,
.year-lines__dot--3 {
  --series-color: var(--color-chart-series-3);
}

.year-lines__key--4,
.year-lines__line--4,
.year-lines__dot--4 {
  --series-color: var(--color-chart-series-4);
}
