/* Homepage lead and supporting stories. The layout preview has its own styles. */
#hero.hero-grid { grid-template-columns: minmax(0, 1fr); }
#hero .hero-main { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
#hero .hero-media { padding: 28px 0 28px 58px; }
#hero .hero-side {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 22px;
  padding: 22px 0 26px;
}
#hero .hero-side::before, #hero .hero-side::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 100vw;
  background: var(--black); pointer-events: none;
}
#hero .hero-side::before { right: 100%; }
#hero .hero-side::after { left: 100%; display: block; }
#hero .side-title { grid-column: 1 / -1; margin-bottom: 8px; }
#hero .side-item { grid-template-columns: minmax(100px, 38%) minmax(0, 1fr); border-top: 1px solid #2c2c2c; gap: 12px; }
#hero .side-item h3 { font-size: clamp(17px, 1.7vw, 21px); }
@media (max-width: 1080px) {
  #hero .hero-side { margin: 0; padding: 22px 0 26px; }
  #hero .side-item { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  #hero .hero-main { grid-template-columns: minmax(0, 1fr); }
  #hero .hero-media { padding: 22px 0; }
  #hero .hero-side { grid-template-columns: minmax(0, 1fr); padding: 22px 0; }
  #hero .side-item { grid-template-columns: 112px minmax(0, 1fr); }
  #hero .side-item h3 { font-size: 19px; }
}

/* ------------------------------------------------------------------
   Lead story art: uses the unlettered 16:9 hero background at its
   true aspect ratio on the right (falling back to the right side of
   a lettered thumbnail) and fades into the page color behind the headline.
   ------------------------------------------------------------------ */
#hero .hero-main.has-art { --art-seam: 42%; --art-fade: 240px; --bleed: calc(50% - 50vw); }
#hero .has-art .hero-art { display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none; }

#hero .art-tile {
  position: absolute; top: 0; bottom: 0; left: var(--art-seam); right: var(--bleed);
  overflow: hidden; container-type: size; background: #080808;
}
#hero .art-tile.has-hero-bg img {
  position: absolute; top: 0; right: 0; bottom: 0; left: auto;
  width: calc(100cqh * 16 / 9); height: 100cqh; aspect-ratio: 16 / 9; max-width: none;
  object-fit: contain; object-position: right center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .4) 14%, #000 28%);
          mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .4) 14%, #000 28%);
}
#hero .art-tile:not(.has-hero-bg) img {
  --w: max(185cqw, calc(100cqh * 1.22 * 16 / 9)); --h: calc(var(--w) * .5625);
  position: absolute; max-width: none; width: var(--w); height: var(--h); object-fit: cover;
  left: clamp(calc(100cqw - var(--w)), calc(50cqw - var(--w) * .77), calc(var(--w) * -.56));
  top: clamp(calc(100cqh - var(--h) * .94), calc((100cqh - var(--h)) * .65), calc(var(--h) * -.15));
}
#hero .hero-art-photo {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .2) calc(var(--art-fade) * .3), rgba(0, 0, 0, .75) calc(var(--art-fade) * .7), #000 var(--art-fade));
          mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .2) calc(var(--art-fade) * .3), rgba(0, 0, 0, .75) calc(var(--art-fade) * .7), #000 var(--art-fade));
}

/* headline sits straight on the page color: no sheet, no torn clip */
#hero .has-art .hero-field { display: none; }
#hero .has-art .hero-paper { background: none; clip-path: none !important; }
#hero .has-art .hero-paper::before { display: none; }

/* the right column becomes a transparent link over the photo */
#hero .has-art .hero-media { padding: 0; align-items: stretch; }
#hero .has-art .media-card { display: flex; flex-direction: column; height: 100%; background: none; box-shadow: none; padding: 0; }
#hero .has-art .media-card .card-bar { display: none; }
#hero .has-art .media-card .frame { flex: 1; margin: 0; aspect-ratio: auto; background: none; overflow: visible; }
#hero .has-art .media-card .frame > img { display: none; }
#hero .has-art .media-card .play { left: 58%; }
#hero .has-art .media-card .credit {
  align-self: flex-end; margin: 0 0 14px; padding: 5px 9px; color: #fff;
  background: rgba(0, 0, 0, .62); text-shadow: none;
}

@media (max-width: 760px) {
  #hero .hero-main.has-art { --band: 56.25vw; }
  #hero .has-art .hero-media { order: -1; height: var(--band); }
  #hero .has-art .media-card .play { left: 50%; }
  #hero .has-art .media-card .credit { margin-bottom: 10px; }
  #hero .has-art .hero-paper { padding-top: 6px; }
  #hero .art-tile { left: -16px; right: -16px; top: 0; bottom: auto; height: var(--band); }
  #hero .art-tile.has-hero-bg img {
    inset: 0; width: 100%; height: 100%; aspect-ratio: 16 / 9;
    object-fit: cover; object-position: right center;
    -webkit-mask-image: none; mask-image: none;
  }
  #hero .hero-art-photo {
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 24px), rgba(0, 0, 0, .4) calc(100% - 9px), transparent 100%);
            mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 24px), rgba(0, 0, 0, .4) calc(100% - 9px), transparent 100%);
  }
}
#hero .has-art .media-card .art-note { background: rgba(12, 12, 12, .78); }
#hero .has-art .media-card .image-label { left: auto; right: 0; bottom: 14px; font-size: 11px; padding: 5px 9px; }
#hero .has-art .media-card .credit + .art-note { margin-top: -10px; }

/* Desktop lead fits the first screen (see fitHeroToScreen in app.js):
   a wider headline column and a shorter dek leave the headline room to stay big. */
@media (min-width: 761px) {
  #hero .hero-main.has-art { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); --art-seam: 46%; }
  #hero .has-art .hero-paper { gap: 16px; padding-top: 28px; padding-bottom: 30px; }
  #hero .has-art .hero-paper .dek {
    max-width: 46ch; font-size: 17px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
}

/* ------------------------------------------------------------------
   More headlines on the first screen: the lead keeps a fixed share of
   the window (fitHeroToScreen) and "The Latest" is a compact band of six
   under it.
   ------------------------------------------------------------------ */
#hero .side-item { padding: 10px 0; }
#hero .side-item .label-bar.sm { font-size: 10px; padding: 2px 7px; letter-spacing: .06em; }
#hero .side-item h3 {
  font-size: 17px; line-height: 1.05; margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
#hero .side-item .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 11px; }

/* Wide screens: the six sit in three columns of compact rows under the lead. */
@media (min-width: 1081px) {
  #hero .hero-side { gap: 0 26px; padding: 14px 0 12px; }
  #hero .hero-side .side-title { margin-bottom: 2px; }
  #hero .hero-side .side-title h2 { font-size: 24px; }
  #hero .side-item { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
}

/* Mid-size screens: the six sit in two columns under the lead. */
@media (min-width: 761px) and (max-width: 1080px) {
  #hero .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
  #hero .side-item { grid-template-columns: 112px minmax(0, 1fr); }
}

/* Phones: a 16:9 picture band and compact headline bring the list up the page. */
@media (max-width: 760px) {
  #hero .hero-main.has-art { --band: 56.25vw; }
  #hero .hero-paper { gap: 12px; padding-bottom: 18px; }
  #hero .hero-paper .mega { font-size: min(34px, 9.4cqw); line-height: .98; }
  /* the headline is the link; the summary and button wait for the story page */
  #hero .hero-paper .dek, #hero .hero-paper .btn { display: none; }
  #hero .hero-side { padding: 16px 0; }
  #hero .side-item { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 0; }
  #hero .side-item h3 { font-size: 17px; }
}

/* ------------------------------------------------------------------
   Content-width hero (November 13, 2026). The lead story and "The
   Latest" form one outlined panel as wide as the page content; nothing
   runs out to the edges of the window.
   ------------------------------------------------------------------ */
body[data-page="home"] .hero { padding-top: 18px; overflow: visible; }
#hero.hero-grid { background: #fff; border: 3px solid var(--black); box-shadow: 6px 6px 0 var(--black); }
#hero .hero-main { overflow: hidden; }
#hero .hero-main.has-art { --bleed: 0px; }
#hero .hero-paper { background: #fff; padding-left: 30px; }
#hero .has-art .hero-paper { background: none; }
#hero .hero-paper::before { display: none; }
#hero .hero-side { margin: 0; padding-left: 24px; padding-right: 24px; }
#hero .hero-side::before, #hero .hero-side::after { display: none; }
@media (max-width: 760px) {
  body[data-page="home"] .hero { padding-top: 14px; }
  #hero .hero-main.has-art { --band: calc((100vw - 38px) * .5625); }
  #hero .hero-paper { padding-left: 16px; padding-right: 16px; }
  #hero .art-tile { left: 0; right: 0; }
  #hero .hero-field { inset: 0; }
  #hero .hero-media { padding: 18px 16px; }
  #hero .has-art .hero-media { padding: 0; }
  #hero .hero-side { padding-left: 16px; padding-right: 16px; }
}
#hero.hero-grid:empty { display: none; }
