.article-page {
  --article-container-width: 100%;
  --article-inline-space: var(--page-gutter);
  --article-section-space: 5rem;
}

.article-page .publication-hero .hero-img::after {
  background: linear-gradient(180deg, rgb(15 8 22 / 58%), rgb(15 8 22 / 36%) 35%, rgb(15 8 22 / 74%));
}

.article-page .publication-hero h1 {
  width: 100%;
  max-width: 74rem;
}

.article-page .hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.article-page .hero-btn img {
  width: 10px;
  height: 10px;
}

.article-page .hero-btn:is(:hover, :focus-visible) img {
  content: var(--publication-button-hover-arrow);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 2.3fr);
  align-items: start;
  gap: 4rem;
  max-width: var(--article-container-width);
  padding: var(--article-section-space) var(--article-inline-space) 0;
  margin: 0 auto;
}

.article-sidebar {
  position: sticky;
  top: 7rem;
  max-height: calc(100svh - 8rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.article-toc h2 {
  margin: 0 0 1rem;
  color: #2a004e;
  font-family: "PPNeueGstaad", sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.3;
}

.article-toc ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.article-toc a {
  display: block;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgb(42 0 78 / 20%);
  color: #2a004e;
  font-size: 1rem;
  font-weight: 200;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.article-toc a:hover,
.article-toc a[aria-current="location"] {
  background-color: #ffda62;
}

.article-toc a:focus-visible,
.article-content a:focus-visible,
.article-checkpoint input:focus-visible,
.article-table-wrapper:focus-visible,
.article-related-card h3 a:focus-visible {
  outline: 2px solid #2a004e;
  outline-offset: 4px;
}

.article-content {
  min-width: 0;
}

.article-content p,
.article-list,
.article-checkpoint {
  margin: 0;
  color: #2c2c2c;
  font-size: 1.2rem;
  font-weight: 200;
  line-height: 1.6;
}

.article-content p + p {
  margin-top: 1rem;
}

.article-chapter {
  margin-top: 3rem;
  scroll-margin-top: 1rem;
}

.article-content h2,
.article-related > h2 {
  margin: 0 0 1.25rem;
  color: #2a004e;
  font-family: "PPNeueGstaad", sans-serif;
  font-size: 2.2rem;
  font-weight: 400;
  line-height: 1.2;
}

.article-related-card h3 {
  margin: 0 0 1rem;
  color: #2a004e;
  font-family: "PPNeueGstaad", sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
}

.article-content .article-source {
  margin-top: 1rem;
  font-size: 1rem;
}

.article-content a,
.article-related-card h3 a {
  color: #2a004e;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2rem;
}

.article-content a:hover,
.article-related-card h3 a:hover {
  text-decoration-thickness: 2px;
}

.article-list {
  padding-left: 1.5rem;
  margin: 1rem 0;
}

.article-list li + li {
  margin-top: 0.5rem;
}

.article-table-wrapper {
  width: 100%;
  margin: 1.5rem 0;
  overflow-x: auto;
  border: 1px solid rgb(42 0 78 / 20%);
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.article-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  table-layout: fixed;
  background-color: #fff;
  color: #2c2c2c;
  font-size: 1.1rem;
  font-weight: 200;
  line-height: 1.5;
}

.article-table th,
.article-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  border-bottom: 1px solid rgb(42 0 78 / 20%);
}

.article-table th {
  color: #2a004e;
  font-weight: 400;
}

.article-table thead {
  background-color: #ffda62;
}

.article-table th:first-child {
  width: 25%;
}

.article-table tbody tr:last-child > * {
  border-bottom: 0;
}

.article-checklist {
  padding: 1.75rem;
  border: 1px solid rgb(42 0 78 / 20%);
  background-color: #fff;
}

.article-checklist fieldset {
  min-width: 0;
  padding: 0;
  margin: 1rem 0 0;
  border: 0;
}

.article-checkpoint {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgb(42 0 78 / 20%);
  cursor: pointer;
}

.article-checkpoint:last-child {
  border-bottom: 0;
}

.article-checkpoint input {
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  margin: 0.32rem 0 0;
  accent-color: #2a004e;
  cursor: pointer;
}

.article-checkpoint input:checked + span {
  color: #2a004e;
}

.article-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.article-closing {
  margin-top: 2rem;
}

.article-closing .main-btn {
  margin-top: 1.5rem;
  text-decoration: none;
}

.article-page .article-related {
  max-width: var(--article-container-width);
  padding: var(--article-section-space) var(--article-inline-space) var(--article-section-space);
  margin: 0 auto;
}

.article-related-card h3 a {
  color: #2a004e;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2rem;
}

.article-related-card h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.article-related-card h3 a:focus-visible {
  outline: 2px solid #2a004e;
  outline-offset: 4px;
}

.article-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-related-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

.article-related-card .main-btn {
  margin-top: auto;
}

.article-related-image {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.article-related-image:focus-visible {
  outline: 2px solid #2a004e;
  outline-offset: 4px;
}

.article-related-card > img,
.article-related-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 22rem;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  margin-bottom: 1rem;
}

.article-related-image img {
  margin-bottom: 0;
}

.article-related-card p {
  margin: 0 0 1rem;
  color: #2c2c2c;
  font-size: 1.2rem;
  font-weight: 200;
  line-height: 1.45;
}

@media (max-width: 1380px) {
  .article-layout {
    gap: 3rem;
  }
}

@media (max-width: 1023px) {
  .article-page {
    --article-section-space: 4rem;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .article-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .article-toc ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 2rem;
  }

  .article-toc li {
    display: flex;
  }

  .article-toc a {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .article-page {
    --article-section-space: 3rem;
  }

  .article-toc ul {
    display: block;
  }

  .article-content h2,
  .article-related > h2 {
    font-size: 1.75rem;
  }

  .article-related-card h3 {
    font-size: 1.3rem;
  }

  .article-content p,
  .article-list,
  .article-checkpoint,
  .article-related-card p {
    font-size: 1.1rem;
  }

  .article-checklist {
    padding: 1.25rem;
  }

  .article-table th,
  .article-table td {
    padding: 0.8rem 1rem;
  }

  .article-related-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .article-toc a {
    transition: none;
  }
}

@media print {
  .article-sidebar,
  .article-closing .main-btn,
  .article-related {
    display: none;
  }

  .article-layout {
    display: block;
    max-width: none;
    padding: 1rem 0;
  }

  .article-table-wrapper {
    overflow: visible;
  }

  .article-table {
    min-width: 0;
  }

  .article-table tr,
  .article-checkpoint {
    break-inside: avoid;
  }
}
