#main-content {
  min-height: calc(100dvh - var(--site-header-height, 4.25rem));
  padding-top: calc(var(--site-header-height, 4.25rem) + clamp(0.9rem, 2.5vw, 1.5rem));
  padding-bottom: var(--site-footer-safe-space, clamp(2.5rem, 6vw, 5rem));
}

.content-wrapper {
  box-sizing: border-box;
  width: min(100%, 68.75rem);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.content-card {
  display: block;
  padding: clamp(1rem, 3vw, 2rem);
  border: 0.0625rem solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  box-shadow: 0 0.75rem 2.25rem rgba(0, 0, 0, 0.22);
  backdrop-filter: saturate(1.1);
}

.title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0 clamp(0.75rem, 2vw, 1.25rem);
  padding-bottom: clamp(0.75rem, 2vw, 1.25rem);
  text-align: left;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.08);
  container-type: inline-size;
  container-name: title-row;
}

.title-row h1 {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 2.35rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.article-icon {
  justify-self: start;
  width: clamp(6rem, 12vmin, 8.75rem);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 0.0625rem solid rgba(255, 255, 255, 0.14);
  border-radius: 0.9rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.25);
}

.lead {
  margin-top: clamp(0.875rem, 2.2vw, 1.375rem);
  container-type: inline-size;
  container-name: lead;
}

.lead p {
  margin: 0 0 0.9em;
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.65;
  hyphens: auto;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.links {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: block;
  padding: 0.5rem 0;
  color: inherit;
  text-decoration: none;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.links a:hover {
  border-color: rgba(255, 255, 255, 0.32);
  opacity: 0.92;
}

.footer-buttons {
  margin-top: clamp(1rem, 3vw, 1.75rem);
}

a:focus-visible,
.button:focus-visible {
  outline: 0.15rem solid rgba(255, 255, 255, 0.55);
  outline-offset: 0.2rem;
  border-radius: 0.4rem;
}

@supports (width: 1cqi) {
  .title-row h1 {
    font-size: clamp(1.1rem, 3.4cqi, 2.5rem);
  }

  @container title-row (max-width: 42rem) {
    .title-row h1 {
      font-size: clamp(1.05rem, 3.8cqi, 2.2rem);
    }
  }

  @container title-row (max-width: 30rem) {
    .title-row h1 {
      font-size: clamp(1rem, 4.4cqi, 2rem);
    }
  }

  .lead p {
    font-size: clamp(0.98rem, 2cqi, 1.12rem);
    line-height: clamp(1.55, 2.2cqi, 1.7);
  }
}

.long-title .title-row h1 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

@media (orientation: portrait) {
  #main-content {
    padding-top: calc(var(--site-header-height, 4.25rem) + clamp(0.75rem, 3vw, 1.1rem));
  }

  .title-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(0.6rem, 3vmin, 1rem);
  }

  .article-icon {
    width: clamp(4.5rem, 22vmin, 6.5rem);
  }

  .content-card {
    border-radius: 1.375rem;
  }

  .lead p {
    line-height: 1.68;
  }

  .title-row h1 {
    font-size: clamp(1.05rem, 3.8vw, 2.1rem);
  }
}

@media (orientation: landscape) {
  .content-card {
    padding: 2.25rem 2.5rem;
    border-radius: 1.5rem;
  }

  .title-row {
    padding-bottom: 1.5rem;
  }

  .lead p {
    line-height: 1.7;
  }
}

@media (orientation: landscape) and (min-aspect-ratio: 16 / 9) {
  .content-wrapper {
    width: min(92vw, 68.75rem);
  }

  .article-icon {
    width: clamp(6rem, 10vmin, 8rem);
  }

  .title-row h1 {
    font-size: clamp(1.2rem, 2.2vw, 2.4rem);
  }
}

@media (orientation: portrait) and (max-aspect-ratio: 9 / 16) {
  .article-icon {
    width: clamp(4.25rem, 20vmin, 6rem);
  }

  .content-card {
    padding: clamp(1rem, 5vmin, 1.5rem);
  }

  .title-row h1 {
    font-size: clamp(1rem, 4.2vw, 1.9rem);
  }
}
