.news-page,
.news-detail {
  --news-border: var(--line);
  --news-category: var(--accent);
  --news-meta: color-mix(in srgb, var(--ink) 72%, var(--paper));
}

.news-page {
  max-width: 85rem;
}

.news-page-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem 1.5rem;
}

.news-page-heading h1 {
  margin-bottom: 0;
}

.news-feeds {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.1rem;
  font-size: .95rem;
}

.news-feeds a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--news-category);
  text-decoration: underline;
  text-underline-offset: .22em;
}

:is(.news-page, .news-detail):is(:target, [data-in-panel]) {
  --news-border: color-mix(in srgb, var(--paper) 19%, transparent);
  --news-category: var(--paper);
  --news-meta: color-mix(in srgb, var(--paper) 82%, transparent);
}

.news-feature,
.news-card {
  min-width: 0;
  border-bottom: 1px solid var(--news-border);
}

.news-feature {
  display: grid;
  column-gap: clamp(1.15rem, 2.7vw, 2rem);
  margin: 1.3rem 0 0;
}

.news-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.news-feature > .news-image {
  object-position: center 57%;
}

.news-feature-body,
.news-card-body {
  padding: 1rem 0;
}

.news-feature-body {
  align-self: center;
}

.news-feature h2 {
  max-width: 23ch;
  margin: .55rem 0 0;
  font-size: clamp(1.85rem, 3.95vw, 3.1rem);
  line-height: 1.06;
}

.news-archive {
  margin-top: clamp(2rem, 4.5vw, 3rem);
}

.news-archive > h2 {
  margin-bottom: 1.15rem;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.news-grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 1.6rem);
}

.news-card {
  display: flex;
  flex-direction: column;
}

.news-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
}

.news-category {
  color: var(--news-category);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .065em;
  text-transform: uppercase;
}

.news-card h3 {
  margin: .55rem 0 0;
  font: 600 clamp(1.35rem, 2.3vw, 1.8rem)/1.12 "League Spartan", sans-serif;
}

.news-card h3 a,
.news-feature h2 a {
  color: inherit;
  text-decoration: none;
}

.news-card h3 a:hover,
.news-feature h2 a:hover {
  text-decoration: underline;
}

.news-card-body > p {
  margin: .65rem 0 1rem;
  font-size: .88rem;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  column-gap: .65rem;
  color: var(--news-meta);
  font-size: .75rem;
}

.news-meta a {
  color: inherit;
}

.news-meta time::before {
  content: "·";
  margin-right: .65rem;
}

.news-card-body > .news-meta {
  margin: 0;
  font-size: .75rem;
}

.news-more {
  display: inline-block;
  margin-top: .6rem;
  padding: .55rem .9rem;
  border: 1px solid var(--news-border);
  border-radius: .4rem;
  color: var(--paper);
  background: var(--accent);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
}

.news-more:hover {
  color: var(--paper);
  background: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

.news-source {
  margin: 1.35rem 0 0;
}

@media (min-width: 39rem) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 47rem) {
  .news-feature:has(> .news-image) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }

  .news-feature > .news-image {
    height: 100%;
    max-height: 27rem;
    aspect-ratio: auto;
  }
}

@media (min-width: 64rem) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.news-meta time:first-child::before {
  content: none;
}

.news-detail {
  max-width: 62rem;
}

.news-back {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-bottom: 1.15rem;
  font-size: .925rem;
  font-weight: 600;
}

.news-detail h1 {
  font-size: clamp(2.15rem, 5vw, 3.7rem);
  line-height: 1.05;
  margin-bottom: .65rem;
  text-wrap: balance;
}

.news-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .75rem;
  margin: 0 0 1.35rem;
  font-size: .9rem;
}

.news-byline span::before {
  content: "·";
  margin-right: .75rem;
}

.news-story {
  display: flow-root;
}

.news-cover {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(54vh, 34rem);
  margin: 0 auto 1.35rem;
}

@media (min-width: 38rem) {
  .news-cover--portrait {
    float: left;
    max-width: 40%;
    margin: 0 clamp(1rem, 2.7vw, 2rem) .75rem 0;
  }
}

.news-article-text {
  overflow-wrap: anywhere;
}

.news-article-text p { max-width: none; }
.news-article-text > :first-child { margin-top: 0; }
.news-article-text > :last-child { margin-bottom: 0; }

html:not([lang="en"]) .news-article-text[lang="en"],
html[lang="en"] .news-article-text[lang="it"] {
  display: none;
}

.news-gallery {
  --photo-gap: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: var(--photo-gap);
  margin-top: 1.5rem;
}

.news-gallery img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc((100% - var(--photo-gap)) / 2);
  max-height: 23rem;
}

.news-gallery img:only-child { max-width: 100%; }

.news-video {
  margin-top: 1.5rem;
  text-align: center;
}

.news-video .video-close {
  color: inherit;
  border-color: currentColor;
}
