/*
 * Compact mobile news list for the MattSnep homepage.
 * Loaded last so it decisively overrides older card layouts.
 */

@media screen and (max-width: 900px) {
  .home .story-grid,
  .home .story-grid--editorial {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .home .story-grid > .story-card,
  .home .story-grid > .story-card:nth-child(2n),
  .home .story-grid > .story-card:nth-child(3n),
  .home .story-grid > .story-card.story-card--major,
  .home .story-grid > .story-card.story-card--has-media {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 108px !important;
    grid-template-areas: "body media" !important;
    align-items: start !important;
    column-gap: 18px !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 24px 0 !important;
    border-top: 1px solid var(--ms-line, #d8d5ce) !important;
    border-right: 0 !important;
  }

  .home .story-grid > .story-card:first-child {
    border-top: 3px solid var(--ms-navy, #071b2d) !important;
  }

  .home .story-card .story-card__body {
    grid-area: body !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .home .story-card .story-card__media {
    grid-area: media !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: hidden !important;
    width: 108px !important;
    height: 108px !important;
    max-width: 108px !important;
    min-width: 108px !important;
    margin: 0 !important;
    background: var(--ms-paper, #f5f3ee) !important;
  }

  .home .story-card .story-card__media img,
  .home .story-card.story-card--major .story-card__media img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 108px !important;
    height: 108px !important;
    max-width: none !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
  }

  .home .story-card .card-kicker {
    display: block !important;
    width: auto !important;
    margin: 0 0 8px !important;
    color: var(--ms-navy, #071b2d) !important;
    font-size: 0.72rem !important;
    line-height: 1.15 !important;
    letter-spacing: 0.13em !important;
  }

  .home .story-card h3,
  .home .story-card.story-card--major h3 {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    font-size: clamp(1.35rem, 6.4vw, 1.72rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.025em !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .home .story-card h3 a,
  .home .story-card.story-card--major h3 a {
    display: inline !important;
    width: auto !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
  }

  .home .story-card .story-card__excerpt {
    display: none !important;
  }

  .home .story-card time {
    display: block !important;
    width: auto !important;
    margin: 14px 0 0 !important;
    color: var(--ms-muted, #626870) !important;
    font-family: var(--ms-sans, sans-serif) !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
  }

  .home .story-grid > .story-card.story-card--no-media {
    display: block !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "body" !important;
  }
}

@media screen and (max-width: 420px) {
  .home .story-grid > .story-card,
  .home .story-grid > .story-card:nth-child(2n),
  .home .story-grid > .story-card:nth-child(3n),
  .home .story-grid > .story-card.story-card--major,
  .home .story-grid > .story-card.story-card--has-media {
    grid-template-columns: minmax(0, 1fr) 96px !important;
    column-gap: 15px !important;
    padding: 21px 0 !important;
  }

  .home .story-card .story-card__media,
  .home .story-card .story-card__media img,
  .home .story-card.story-card--major .story-card__media img {
    width: 96px !important;
    height: 96px !important;
    max-width: 96px !important;
    min-width: 96px !important;
  }
}
