/* AXIOM_EDITORIAL_V67: scoped, post-v6.5 newsroom refinement. */
/* Desktop grid: the digest and latest cards share the left rail,
   while the existing markets/popular widgets begin alongside the digest. */
@media (min-width: 1100px) {
  #app .ax5-home > .ax2-home-columns {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) clamp(310px,24vw,400px)!important;
    column-gap:20px!important;
    row-gap:14px!important;
    align-items:start!important;
  }
  #app .ax2-home.ax5-home #axiom-digest-mount {
    grid-column:1!important;
    grid-row:1!important;
    min-width:0!important;
    margin:0!important;
  }
  #app .ax5-home .ax5-main,
  #app .ax5-home .ax3-main {
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    min-width:0!important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns > aside {
    grid-column:2!important;
    grid-row:1 / span 2!important;
    align-self:start!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    position:sticky!important;
    top:62px!important;
    max-height:calc(100dvh - 74px)!important;
    overflow-y:auto!important;
    scrollbar-width:thin;
    scrollbar-color:#d9d9df transparent;
  }
  #app .ax2-home.ax5-home .ax2-home-columns > aside > .box { margin-bottom:14px!important; }
  #app .ax5-home #axiom-digest-mount .ax3-feature-grid {gap:13px!important;}
}
@media (min-width: 1200px) {
  /* These containers use the same centered width as v6.5; no further shifts. */
  #app .ax5-home .ax2-home-columns {grid-template-columns:minmax(0,1fr) clamp(330px,24vw,408px)!important;}
  #app .ax5-home .ax2-news-block > .grid {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:13px!important;
    align-items:stretch!important;
  }
}
@media (min-width: 1100px) and (max-width: 1199px) {
  #app .ax5-home .ax2-news-block > .grid {
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px!important;
  }
}
@media (min-width:1100px) {
  /* Works both with Home-v3's .ax3-story-row wrapper and raw .card links. */
  #app .ax5-home .ax2-news-block .ax3-story-row {
    position:relative!important;
    min-width:0!important;
    height:100%!important;
    border:1px solid var(--line,#e5e5eb)!important;
    border-radius:9px!important;
    padding:0!important;
    overflow:hidden!important;
    background:var(--paper,#fff)!important;
    transition:border-color .2s ease,transform .2s ease;
  }
  #app .ax5-home .ax2-news-block .ax3-story-row:hover {border-color:#d5a3a8!important;transform:translateY(-2px);}
  #app .ax5-home .ax2-news-block .card {
    min-width:0!important;
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:0!important;
    border:1px solid var(--line,#e5e5eb)!important;
    border-radius:9px!important;
    padding:0 0 12px!important;
    overflow:hidden!important;
    background:var(--paper,#fff)!important;
    text-decoration:none!important;
    transition:transform .2s ease,border-color .2s ease;
  }
  #app .ax5-home .ax2-news-block .ax3-story-row > .card {
    border:0!important;
    border-radius:0!important;
  }
  #app .ax5-home .ax2-news-block .card:hover{border-color:#d5a3a8!important;}
  #app .ax5-home .ax2-news-block .card > .img {
    flex:0 0 auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16/7.7!important;
    min-width:0!important;
    border-radius:0!important;
    order:0!important;
  }
  #app .ax5-home .ax2-news-block .card > .img img {width:100%;height:100%;object-fit:cover;}
  #app .ax5-home .ax2-news-block .card > .meta {
    order:1!important;
    display:flex!important;
    grid-column:auto!important;
    grid-row:auto!important;
    margin:10px 11px 5px!important;
    padding:0!important;
    font-size:10px!important;
    color:var(--mute,#81828b)!important;
  }
  #app .ax5-home .ax2-news-block .card > h3 {
    order:2!important;
    grid-column:auto!important;
    grid-row:auto!important;
    margin:0 11px 7px!important;
    padding:0!important;
    max-width:none!important;
    font-size:15px!important;
    line-height:1.31!important;
    font-weight:800!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:3!important;
    overflow:hidden!important;
  }
  #app .ax5-home .ax2-news-block .card > p.ax3-card-excerpt,
  #app .ax5-home .ax2-news-block .card > p.ax5-real-preview {
    order:3!important;
    grid-column:auto!important;
    grid-row:auto!important;
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:3!important;
    max-width:none!important;
    margin:0 11px!important;
    padding:0!important;
    font-size:11.5px!important;
    line-height:1.44!important;
    color:var(--mute,#737682)!important;
    overflow:hidden!important;
  }
  #app .ax5-home .ax2-news-block .ax3-bookmark {
    z-index:3!important;
    top:8px!important;
    right:8px!important;
    background:var(--paper,#fff)!important;
    border-radius:50%!important;
    box-shadow:0 2px 10px #0002;
  }
  #app .ax5-home .ax2-news-block .card:hover h3 {color:var(--red,#c4101c)!important;}
  #app .ax5-home .ax2-news-block {padding:16px!important;}
  #app .ax5-home #axiom-digest-mount .ax3-feature {min-height:355px!important;}
  #app .ax5-home #axiom-digest-mount .ax3-side-stories{grid-template-rows:repeat(3,minmax(0,1fr))!important;}
  #app .ax5-home #axiom-digest-mount .ax3-feature-secondary{align-items:center!important;}
}
@media (min-width:1100px) and (max-width:1340px) {
  #app .ax5-home .ax2-news-block .card > h3{font-size:13.2px!important;}
  #app .ax5-home .ax2-news-block .card > p.ax3-card-excerpt,
  #app .ax5-home .ax2-news-block .card > p.ax5-real-preview{font-size:10.5px!important;}
}
@media(max-width:1099px){
  /* Older v5.3 rules pinned sidebar into grid col 2 even on narrow screens.
     Explicitly restore one column rather than letting the news rail shrink. */
  #app .ax2-home.ax5-home .ax2-home-columns{
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
  }
  #app .ax2-home.ax5-home #axiom-digest-mount{
    grid-column:1!important;
    grid-row:1!important;
  }
  #app .ax2-home.ax5-home .ax3-main,
  #app .ax2-home.ax5-home .ax5-main{
    grid-column:1!important;
    grid-row:2!important;
    max-width:100%!important;
  }
  #app .ax2-home.ax5-home .ax2-home-columns > aside{
    grid-column:1!important;
    grid-row:3!important;
    position:static!important;
    max-height:none!important;
    overflow:visible!important;
  }
}
/* Digest interior — three real stories fill the full height beside the lead. */
@media(min-width:851px){
  #app .ax58-feature-grid{
    align-items:stretch!important;
    min-height:365px!important;
  }
  #app .ax58-feature-side{
    align-self:stretch!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:space-between!important;
    min-height:0!important;
  }
  #app .ax58-feature-side > .ax58-small{
    flex:1 1 0!important;
    min-height:0!important;
    align-content:center!important;
    padding:10px 0!important;
  }
  #app .ax58-feature-side > .ax58-small:first-child {padding-top:2px!important;}
  #app .ax58-feature-side > .ax58-small:last-child {padding-bottom:2px!important;}
  #app .ax58-hero {height:100%!important;}
  #app .ax58-small h3 {-webkit-line-clamp:3!important;}
  #app .ax58-small p {-webkit-line-clamp:2!important;}
}
@media(min-width:1100px){
  #app .ax58-grid {grid-template-columns:minmax(0,1fr) clamp(325px,25vw,410px)!important;gap:20px!important;}
  #app .ax58-feature-grid {grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)!important;}
}
/* Custom archival sidebar and news timeline, created from actual digest DOM. */
#app .ax67-archive-caption{display:flex;align-items:center;justify-content:space-between;gap:9px;flex-wrap:wrap;}
#app .ax67-archive-caption h2{margin:9px 0 13px;font-size:19px;font-weight:850;}
#app .ax67-archive-caption button{border:0;background:transparent;padding:7px 0;color:var(--red,#c4101c);font:750 11px/1.2 var(--f,system-ui);cursor:pointer;}
#app .ax67-timeline{border:1px solid var(--line,#e4e4e8);background:var(--paper,#fff);padding:18px;border-radius:12px;}
#app .ax67-timeline h2{margin:0 0 14px;font-weight:850;font-size:19px;display:flex;align-items:center;gap:9px;line-height:1.2;}
#app .ax67-timeline h2:before{content:"";display:inline-block;width:4px;height:22px;flex:none;background:var(--red,#c4101c)}
#app .ax67-timeline ol{padding:0;margin:0;list-style:none;}
#app .ax67-timeline li{display:grid;grid-template-columns:55px 10px minmax(0,1fr);gap:8px;align-items:start;padding:10px 0;border-bottom:1px solid var(--line,#e8e8ec);}
#app .ax67-timeline li:last-child{border-bottom:0;padding-bottom:0;}
#app .ax67-timeline time{font-size:11px;color:var(--red,#c4101c);font-weight:800;white-space:nowrap;}
#app .ax67-timeline .ax67-pin{width:7px;height:7px;margin-top:6px;border-radius:50%;background:var(--red,#c4101c);box-shadow:0 0 0 3px #fbe9ea;}
#app .ax67-timeline li a,#app .ax67-timeline li span.ax67-event-title{font-size:12px;line-height:1.45;color:var(--ink,#17171c);font-weight:600;overflow-wrap:anywhere;}
#app .ax67-timeline li a:hover{color:var(--red,#c4101c);}
#app .ax58-aside:has(.ax67-timeline){position:sticky;max-height:calc(100dvh - 75px);overflow:auto;scrollbar-width:thin;scrollbar-color:#dedee3 transparent;}
#app .ax58-aside:has(.ax67-timeline) .ax58-side-cta{display:none!important;}
@media(max-width:850px){#app .ax58-aside:has(.ax67-timeline){position:static;max-height:none;overflow:visible;}}
@media(prefers-reduced-motion:reduce){#app .ax5-home .ax2-news-block .ax3-story-row,#app .ax5-home .ax2-news-block .card{transition:none!important;}}
