/* News uses the atelier's existing type, colours and spacing. The homepage
   stays a native scrolling list, including when JavaScript is unavailable. */
.p1-news-section .p1-news-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: 40px;
}
.p1-news-heading h2 { max-width: 14ch; }
.p1-news-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; }
.p1-news-tools > .text-link { min-height: 44px; white-space: nowrap; }
.p1-news-controls { display: flex; align-items: center; gap: 12px; }
.p1-news-controls[hidden] { display: none; }
.p1-news-controls button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line, #3a3d3f);
  border-radius: 50%;
  background: transparent;
  color: var(--light, #f1eee7);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.p1-news-controls button svg { width: 22px; height: 22px; }
.p1-news-controls [data-news-prev] svg { transform: rotate(180deg); }
.p1-news-controls button:disabled { opacity: .35; cursor: default; }
.p1-news-controls [data-news-position] {
  min-width: 72px;
  text-align: center;
  color: var(--muted, #b9b8b2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.p1-news-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 3);
  align-items: stretch;
  gap: 24px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: auto;
  scrollbar-width: thin;
  scrollbar-color: #656661 transparent;
  padding-block: 4px 24px;
}
.p1-news-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  color: var(--light, #f1eee7);
  border-bottom: 1px solid var(--line, #3a3d3f);
  text-decoration: none;
  scroll-snap-align: start;
  overflow-wrap: anywhere;
}
.p1-news-cover {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1b1e20;
}
.p1-news-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.p1-news-cover.p1-news-video {
  width: 100%;
  max-width: none;
  margin: 0;
  align-self: stretch;
  grid-template-areas: 'media';
  grid-template-rows: minmax(0, 1fr);
}
.p1-news-cover.p1-news-video video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}
.p1-news-video .p1-case-original { display: none; }
.p1-news-video .p1-case-video-fallback {
  grid-area: media;
  align-self: end;
  z-index: 4;
  padding: 12px 16px;
  background: #111315e8;
}
.p1-news-video [data-case-play] { min-height: 0; gap: 8px; padding: 12px; }
.p1-news-video [data-case-play] > svg { width: 52px; height: 52px; padding: 14px; }
.p1-news-card > a.p1-news-copy { color: inherit; text-decoration: none; }
.p1-news-card > a.p1-news-copy:focus-visible { outline: 2px solid var(--accent, #c39b7e); outline-offset: 4px; }
body.p1-interior .p1-news-article .p1-news-article-media { max-width: 1120px; margin-top: 40px; }
.p1-news-cover--text {
  display: flex;
  align-items: flex-end;
  padding: 24px;
  border: 1px solid var(--line, #3a3d3f);
  color: var(--muted, #b9b8b2);
  font-size: 15px;
}
.p1-news-media-label {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 5px 10px;
  background: #111315e8;
  color: #f1eee7;
  font-size: 13px;
}
.p1-news-copy { display: flex; flex-direction: column; flex: 1; align-items: flex-start; padding-block: 22px 24px; }
.p1-news-copy .p1-story-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 14px; color: var(--muted, #b9b8b2); font-size: 13px; line-height: 1.5; }
.p1-news-copy .p1-story-meta time { font-variant-numeric: tabular-nums; }
.p1-news-pin { color: var(--accent, #c39b7e); }
.p1-news-copy :is(h2, h3), body.p1-interior .p1-news-copy :is(h2, h3) { margin: 0 0 14px; font-size: clamp(24px, 2.15vw, 30px); line-height: 1.2; font-weight: 500; letter-spacing: -.025em; }
.p1-news-copy > p { max-width: 56ch; margin: 0 0 24px; color: var(--muted, #b9b8b2); font-size: 16px; line-height: 1.6; }
.p1-news-copy > .text-link { margin-top: auto; min-height: 44px; font-size: 15px; }
.p1-news-empty { max-width: 100%; margin: 0; padding-block: 28px; border-top: 1px solid var(--line, #3a3d3f); color: var(--muted, #b9b8b2); font-size: 18px; line-height: 1.6; }
.p1-news-empty a { color: var(--light, #f1eee7); text-decoration: underline; text-underline-offset: 4px; }
body.p1-interior .p1-news-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 24px; }
body.p1-interior .p1-news-article .p1-story-cover { max-width: 1120px; }
body.p1-interior .p1-news-article .p1-published-hero { aspect-ratio: 16 / 9; max-height: 600px; object-fit: cover; }
.p1-news-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px 40px;
  align-items: start;
  padding-block: 32px 64px;
  border-top: 1px solid var(--line, #3a3d3f);
}
.p1-news-neighbor { display: grid; gap: 10px; padding-block: 10px; overflow-wrap: anywhere; }
.p1-news-neighbor > span { color: var(--muted, #b9b8b2); font-size: 14px; }
.p1-news-neighbor > strong { font-size: clamp(20px, 2vw, 28px); font-weight: 500; line-height: 1.3; }
.p1-news-neighbor--prev { grid-column: 1; }
.p1-news-all { grid-column: 2; justify-self: center; white-space: nowrap; }
.p1-news-neighbor--next { grid-column: 3; text-align: right; }
.p1-news-card:focus-visible { outline: 2px solid var(--accent, #c39b7e); outline-offset: -2px; }
:is(.p1-news-track, .p1-news-controls button, .p1-news-neighbor, .p1-news-all):focus-visible { outline: 2px solid var(--accent, #c39b7e); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .p1-news-controls button:not(:disabled):hover { border-color: var(--accent, #c39b7e); background: #ffffff08; }
  .p1-news-card:hover :is(h2, h3), .p1-news-neighbor:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
}
/* The player supplies is-portrait and --case-aspect from saved dimensions,
   then corrects them from loadedmetadata when a file has no saved dimensions.
   Keep this layout scoped to desktop news; the same player also serves cases. */
@media (min-width: 1001px) {
  .p1-news-track { grid-auto-columns: calc((100% - 32px) / 2); gap: 32px; }
  body.p1-interior .p1-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
  .p1-news-card:has(> .p1-news-video.is-portrait) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    column-gap: 24px;
    padding-bottom: 24px;
  }
  .p1-news-card > .p1-news-cover.p1-news-video.is-portrait {
    align-self: start;
    aspect-ratio: var(--case-aspect, 9 / 16);
  }
  .p1-news-card > .p1-news-video.is-portrait video { aspect-ratio: var(--case-aspect, 9 / 16); }
  .p1-news-card:has(> .p1-news-video.is-portrait) > .p1-news-copy { min-width: 0; padding-block: 0; }
}
@media (max-width: 1000px) {
  .p1-news-track { grid-auto-columns: calc((100% - 24px) / 2); }
  body.p1-interior .p1-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p1-news-tools { gap: 12px 24px; }
}
@media (max-width: 680px) {
  .p1-news-section .p1-news-heading { align-items: flex-start; flex-direction: column; gap: 20px; margin-bottom: 24px; }
  .p1-news-tools { width: 100%; justify-content: space-between; gap: 12px; }
  .p1-news-track { grid-auto-columns: 86%; gap: 18px; }
  .p1-news-track:has(> :only-child) { grid-auto-columns: 100%; }
  .p1-news-controls { gap: 8px; }
  .p1-news-controls [data-news-position] { min-width: 58px; }
  .p1-news-copy { padding-top: 18px; }
  .p1-news-copy :is(h2, h3), body.p1-interior .p1-news-copy :is(h2, h3) { font-size: 25px; }
  .p1-news-empty { font-size: 16px; padding-block: 22px 0; }
  body.p1-interior .p1-news-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .p1-news-pagination { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; padding-block: 24px 40px; }
  .p1-news-neighbor--next { grid-column: 2; }
  .p1-news-all { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .p1-news-neighbor > strong { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .p1-news-controls button { transition: none; }
  .p1-news-track { scroll-behavior: auto; }
}
@media (max-width: 480px) {
  .p1-news-pagination { display: flex; flex-direction: column; gap: 20px; }
  .p1-news-neighbor { width: 100%; }
  .p1-news-neighbor--next { text-align: left; }
  .p1-news-all { order: 1; }
}

