/* Match the centred preview: a 1560px container with 24px side padding. */
body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding {
  padding-inline: max(24px, calc((100% - 1512px) / 2));
}

body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding.bg-zinc-100 {
  padding-block: 24px;
}

/* The navigation already sits inside the padded header container. */
body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > nav > .sn-container-padding {
  padding-inline: 0;
}

body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > nav {
  gap: 24px;
  padding-block: 8px;
}

body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > nav > ul {
  flex-wrap: wrap;
}

body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > nav form {
  flex-shrink: 0;
}

/* Let News and Resources labels set the desktop dropdown width. */
#sponsorship-chartsList,
#newsList {
  font-size: 15px;
  line-height: 1.4;
}

#sponsorship-chartsList a,
#newsList a {
  display: block;
}

@media (min-width: 768px) {
  #sponsorship-chartsList,
  #newsList {
    width: max-content;
  }

  #sponsorship-chartsList a,
  #newsList a {
    white-space: nowrap;
  }
}

@media (max-width: 1023px) {
  body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > nav {
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding {
    padding-inline: 16px;
  }

  body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding.bg-zinc-100 {
    padding-block: 16px;
  }

  body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > .justify-between {
    flex-direction: column;
    gap: 24px;
  }

  body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > nav {
    gap: 16px;
  }

  body:is(.sn-home-page, .sn-article-page, .sn-faq-page) > .sn-container-padding > nav > ul {
    row-gap: 12px;
  }
}

/* Match the three equal tracks above; articles span the same two as the slider. */
.sn-home-content-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  background: #fff;
}

.sn-home-content-layout > #content,
.sn-home-content-layout > #sidebar {
  grid-column: auto;
  min-width: 0;
}

.sn-home-content-layout > #content {
  grid-column: span 2;
}

.sn-home-content-layout > #sidebar {
  padding: 16px 10px;
  border-radius: 0;
  background: #fff;
}

.sn-home-content-layout > #sidebar > aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-wrap: anywhere;
}

.sn-home-content-layout > #sidebar img {
  display: block;
  max-width: 100%;
  height: auto;
}

.sn-home-content-layout .sn-home-news {
  max-width: none;
  margin-block: 0;
  padding-right: 0;
}

@media (max-width: 1023px) {
  .sn-home-content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sn-home-content-layout > #content {
    grid-column: auto;
  }

  .sn-home-content-layout > #sidebar[data-has-content="false"] {
    display: none;
  }
}

.sn-home-news {
  max-width: 1200px;
  margin-inline: 0;
  padding-left: 0;
}

.sn-home-news #latest-pane > article {
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.sn-home-news #latest-pane > article > div {
  grid-column: auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

.sn-home-news #latest-pane > article img {
  display: block;
  width: 250px;
  max-width: 100%;
  height: auto;
}

.sn-home-feature-layout {
  --sn-feature-height: clamp(320px, 30vw, 480px);
  --sn-thumbnail-height: clamp(52px, 6vw, 100px);
  --sn-feature-gap: 8px;
}

#promotional-container {
  display: grid;
  gap: var(--sn-feature-gap, 8px);
  min-width: 0;
}

.sn-feature-stage {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  height: var(--sn-feature-height, clamp(320px, 30vw, 480px));
}

.sn-feature-image-link {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
}

#img-article-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sn-feature-copy {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  overflow: auto;
  background: rgba(83, 88, 98, 0.85);
  color: #fff;
}

.sn-feature-copy h1 {
  font-size: clamp(22px, 1.8vw, 30px);
  line-height: 1.2;
}

#list-featured-articles {
  display: flex;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

#list-featured-articles li {
  flex: 1 1 0;
  min-width: 0;
}

#list-featured-articles button {
  display: block;
  width: 100%;
}

#list-featured-articles img {
  display: block;
  width: 100%;
  height: var(--sn-thumbnail-height, clamp(52px, 6vw, 100px));
  object-fit: cover;
}

#list-featured-articles button[aria-pressed="true"] {
  outline: 3px solid #0284c7;
  outline-offset: -3px;
}

#list-featured-articles button:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 2px;
}

#dealchart-section td {
  vertical-align: middle;
}

#dealchart-section td img {
  display: block;
  margin-inline: auto;
}

@media (min-width: 1024px) {
  .sn-home-feature-layout > :last-child .uk-panel {
    display: flex;
    flex-direction: column;
    height: calc(var(--sn-feature-height) + var(--sn-thumbnail-height) + var(--sn-feature-gap));
    min-height: 0;
  }

  .sn-home-feature-layout > :last-child .uk-panel > a {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .sn-home-feature-layout > :last-child .uk-panel > a > :first-child {
    flex: 0 0 auto;
  }

  .sn-home-feature-layout #dealchart-section {
    flex: 1;
    min-height: 0;
    max-height: none;
  }
}

@media (max-width: 1023px) {
  .sn-home-feature-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sn-home-feature-layout > div {
    grid-column: auto;
  }
}

@media (max-width: 767px) {
  .sn-home-news #latest-pane > article {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 16px;
  }

  .sn-feature-stage {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }

  .sn-feature-image-link {
    grid-row: 1;
  }

  #img-article-image {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .sn-feature-copy {
    grid-column: 1;
    grid-row: 2;
    background: #535862;
  }
}

@media (max-width: 479px) {
  .sn-home-news #latest-pane > article {
    grid-template-columns: minmax(0, 1fr);
  }
}
