/* DANANG2NITE · PC HOME editorial card QA (2026-10-18)
   Locale: EN. Existing phase sheet revised in place; no extra CSS request.
   Image remains complete 16:9 (object-fit: contain); no crop.
*/
@media (min-width:821px) {
  html[lang="en"] body.page-home .d2n-category-section {
    margin-top:25px!important;
    padding-top:0!important;
  }
  html[lang="en"] body.page-home .d2n-category-section__head { margin-bottom:16px!important; }
  html[lang="en"] body.page-home .d2n-category-stories,
  html[lang="en"] body.page-home .d2n-category-stories.count-1,
  html[lang="en"] body.page-home .d2n-category-stories.count-2,
  html[lang="en"] body.page-home .d2n-category-stories.count-3 {
    display:flex!important;
    flex-wrap:wrap!important;
    align-items:stretch!important;
    gap:16px!important;
  }
  /* One-article or 3-article feature: balanced editorial split, not 70:30. */
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child {
    flex:0 0 100%!important;
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)!important;
    align-items:stretch!important;
    overflow:hidden!important;
    border-radius:20px!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child .d2n-category-story__media {
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:16/9!important;
    border-bottom:0!important;
    border-inline-end:1px solid rgba(255,255,255,.055)!important;
    background:#08090b!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child .d2n-category-story__media img {
    width:100%!important;
    height:100%!important;
    object-fit:contain!important;
    object-position:center!important;
    background:#08090b!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child .d2n-category-story__body {
    min-height:0!important;
    flex:1 1 auto!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:flex-start!important;
    padding:clamp(19px,2vw,28px)!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child .d2n-category-story__category {
    font-size:10px!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child h3 {
    font-size:clamp(23px,2vw,30px)!important;
    line-height:1.12!important;
    letter-spacing:-.6px!important;
    -webkit-line-clamp:3!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child p {
    font-size:13.5px!important;
    line-height:1.6!important;
    -webkit-line-clamp:5!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child .d2n-category-story__foot {
    margin-top:auto!important;
    padding-top:15px!important;
  }
  /* In a category with exactly 2 posts, two consistent 16:9 cards
     reduce scroll length and remove the almost-empty right-hand panels. */
  html[lang="en"] body.page-home .d2n-category-stories.count-2 {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:16px!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:first-child,
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:last-child {
    grid-column:auto!important;
    flex:initial!important;
    min-width:0!important;
    max-width:100%!important;
    width:100%!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    grid-template-columns:none!important;
    border-radius:18px!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:first-child .d2n-category-story__media,
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:last-child .d2n-category-story__media {
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    aspect-ratio:16/9!important;
    border-bottom:1px solid rgba(255,255,255,.055)!important;
    border-inline-end:0!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:first-child .d2n-category-story__body,
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:last-child .d2n-category-story__body {
    width:100%!important;
    min-height:192px!important;
    padding:19px 20px 16px!important;
    justify-content:flex-start!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:first-child h3,
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:last-child h3 {
    font-size:clamp(21px,1.7vw,25px)!important;
    line-height:1.13!important;
    letter-spacing:-.3px!important;
    -webkit-line-clamp:3!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:first-child p,
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:last-child p {
    font-size:12.5px!important;
    line-height:1.5!important;
    -webkit-line-clamp:3!important;
  }
  /* 3-post category: the two secondary items share a balanced row. */
  html[lang="en"] body.page-home .d2n-category-stories.count-3 > .d2n-category-story:not(:first-child) {
    flex:1 1 calc(50% - 8px)!important;
    min-width:calc(50% - 8px)!important;
    max-width:100%!important;
  }
  html[lang="en"] body.page-home .d2n-category-section + .d2n-category-section {
    border-top-color:rgba(255,255,255,.06)!important;
  }
}
@media (min-width:821px) and (max-width:1100px) {
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child {
    grid-template-columns:minmax(0,1.18fr) minmax(0,1fr)!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child .d2n-category-story__body {
    padding:17px 18px!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child h3 {
    font-size:21px!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories > .d2n-category-story:first-child p {
    font-size:12px!important;
    -webkit-line-clamp:3!important;
  }
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:first-child h3,
  html[lang="en"] body.page-home .d2n-category-stories.count-2 > .d2n-category-story:last-child h3 {
    font-size:20px!important;
  }
}
