/* SerieAGoal v0.90: corrective layout only for Performance and editorial single articles.
   The general pronostici shell is one-column at desktop, and its sidebar was
   being laid out above the main area instead of to the left. Do not touch the
   actual pronostici list, schedine pages, search, home or account. */
@media (min-width:1121px) {
  html[data-sg-theme] body.sg-body.sg-page-pronostici:has(.sg-performance-layout)
    .sg-shell:has(> .sg-sidebar.sg-sidebar-competition-only) {
    display:grid!important;
    grid-template-columns:220px minmax(0,1fr)!important;
    align-items:start!important;
    gap:14px!important;
    width:100%!important;
    max-width:1400px!important;
    margin-inline:auto!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-pronostici:has(.sg-performance-layout)
    .sg-shell > .sg-sidebar.sg-sidebar-competition-only {
    display:block!important;
    grid-column:1!important;
    min-width:0!important;
    width:auto!important;
    align-self:start!important;
    position:sticky!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-pronostici:has(.sg-performance-layout)
    .sg-shell > .sg-main {
    display:block!important;
    grid-column:2!important;
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-pronostici .sg-performance-layout {
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    align-items:start!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-pronostici .sg-performance-layout > .sg-sales-performance {
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
  }
}
/* Three columns on full-size desktop: competitions / Performance / ads.
   On narrower laptops retain the left sidebar but drop the ads for readability. */
@media (min-width:1280px) {
  html[data-sg-theme] body.sg-body.sg-page-pronostici .sg-performance-layout:has(> .sg-right-rail.sg-right-rail-ads) {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 300px!important;
    gap:14px!important;
    justify-content:stretch!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-pronostici .sg-performance-layout:not(:has(> .sg-right-rail.sg-right-rail-ads)) {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-pronostici .sg-performance-layout > .sg-right-rail.sg-right-rail-ads {
    display:flex!important;
    min-width:0!important;
    width:300px!important;
    max-width:300px!important;
    align-self:start!important;
  }
}
@media (min-width:1121px) and (max-width:1279px) {
  html[data-sg-theme] body.sg-body.sg-page-pronostici .sg-performance-layout {
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-pronostici .sg-performance-layout > .sg-right-rail {
    display:none!important;
  }
}

/* Single News: give the author card its own breathing room after article text. */
html[data-sg-theme] body.sg-body.sg-page-news .sg-article-layout
  .sg-article-story > .sg-article-author-box.sg-card {
  display:flex;
  margin-block-start:20px!important;
  margin-block-end:0!important;
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
}
/* Related articles are siblings of .sg-article-story. The old .sg-section
   max-width:860px rule made the entire related block 70px narrower than
   the preceding author/Google cards. Align their outer edges exactly. */
html[data-sg-theme] body.sg-body.sg-page-news .sg-article-layout
  .sg-article-main > .sg-article-related-smart.sg-section {
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
  margin-inline:0!important;
  margin-block-start:16px!important;
}
@media (max-width:760px) {
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-layout
    .sg-article-story > .sg-article-author-box.sg-card {
    margin-block-start:14px!important;
  }
  html[data-sg-theme] body.sg-body.sg-page-news .sg-article-layout
    .sg-article-main > .sg-article-related-smart.sg-section {
    margin-block-start:14px!important;
  }
}
