/* SerieAGoal v1.71 — single-canvas editorial system on public football pages.
   No effect on News or article singles (server-side route guard). The Premium
   verdict and entitlement-gated surface are excluded from visual flattening.
   The existing v1.70 LIVE, Free verdict, verified wins and AdSense rails stay raised. */

/* DAY/NIGHT: keep the three columns on precisely the same canvas. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-shell,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-shell .sg-main,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-content-grid,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-content-grid > .sg-feed,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-match-tab-panel {
  background:transparent!important;background-image:none!important;
  box-shadow:none!important;min-width:0!important;
}

/* General section shells, regardless of whether they sit in a match tab,
   competition tab, team tab, fixture list or statistical directory.
   IMPORTANT: never flatten the AI entitlement gate or public verdict card. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-feed :is(
  .sg-card,.sg-section,.sg-league-card,.sg-match-center-card,
  .sg-match-info-card,.sg-result-card,.sg-lineup-card,.sg-leaderboard-card,
  .sg-competition-profile,.sg-team-profile,.sg-player-profile,
  .sg-predictions-carousel-section,.sg-home-predictions-interlude,
  .sg-home-control-strip,.sg-page-intro,.sg-score-home-head,
  .sg-team-overview,.sg-competition-modern-head,.sg-entity-profile,
  .sg-predictions-home-controls,.sg-ai-catalog-head,.sg-ai-publications,
  .sg67-schedine-feed,.sg67-schedine-grid,.sg-player-team-group,
  .sg-team-directory-finder,.sg-team-directory-results,
  .sg-player-directory-tools,.sg-player-scope-tools
):not(:is(
  .sg-ai-premium-panel,.sg-ai-premium-panel *,
  .sg110-verdict-card,.sg110-verdict-card *,
  #sg110-premium-analysis,#sg110-premium-analysis *,
  .sgw-raised,.sgw-raised *
)) {
  background:transparent!important;background-image:none!important;
  box-shadow:none!important;border-color:transparent!important;
  border-radius:0!important;
}

/* Important: actual content sections use spacing, not nested rectangular tiles. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-feed > :is(.sg-card,.sg-section,.sg-page-intro,.sg-score-home-head,.sg-home-control-strip),
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-tab-panel > :is(.sg-card,.sg-section,.sg71-preview,.sgd-intro,.sgd-dossier) {
  margin-inline:0!important;box-shadow:none!important;
  padding-inline:0!important;
  border:0!important;border-radius:0!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-feed > .sg-card:not(.sg-match-center-card),
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-tab-panel > .sg-card:not(.sg-ai-premium-panel) {
  padding-block:9px!important;margin-block:0 15px!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main :is(.sg-card-title,.sg-player-team-head,.sg-match-player-team-head,.sg-roster-group>h3) {
  background:transparent!important;background-image:none!important;
  border:0!important;box-shadow:none!important;border-radius:0!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-card-title {
  padding:7px 0 11px!important;min-height:0!important;
}

/* Remove white/black secondary slabs within lists and content tables.
   Keep the thin rule BETWEEN rows, not a framed box around the entire table. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-feed :is(
  .sg-league-card-body,.sg-standing-table,.sg-full-standings,.sg-full-standing-head,
  .sg-full-standing-row,.sg-match-row-wrap,.sg-match-row,
  .sg-match-main-link,.sg-match-feature-zone,.sg-player-row,
  .sg-player-table,.sg-players-table,.sg-player-stats-table,
  .sg-player-team-head,.sg-roster-group,.sg-roster-list,
  .sg-match-period,.sg-period-head,.sg-period-events,.sg-timeline-phased,
  .sg-match-feed-periods,.sg-flow-event,.sg-stat-team-head,
  .sg-competition-table-head,.sg-standing-head,.sg-standings-table,
  .sg-team-stats-grid,.sg-squad-preview,.sg-team-info-grid,
  .sg-player-directory-grid,.sg-team-grid,.sg-fixture-archive,
  .sg-lineup-list,.sg-lineups-section,.sg71-lineups,.sg71-lineup-team,
  .sg71-preview-prose,.sgd-section,.sgd-compare-team,.sgd-list-group
):not(:is(.sg-ai-premium-panel *,#sg110-premium-analysis *,.sg110-verdict-card *)) {
  background:transparent!important;background-image:none!important;
  box-shadow:none!important;outline:0!important;
}
/* Specific background-filled table heads responsible for the screenshot's white strips. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-match-modern-v2225 :is(
 .sg-period-head,.sg-match-player-team-head,.sg-player-table-head,
 .sg-player-stats-head,.sg-player-row,.sg-stat-team-head,
 .sg-result-card .sg-card-title,.sg-match-cup-bracket-toolbar
) {background:transparent!important;background-image:none!important;box-shadow:none!important}

/* Match hero: remove border/radius completely, including the old bottom
   separator; only the actual tabs retain ONE underline. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-center-card,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-center-head,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-stage.sg-match-stage-compact {
  background:transparent!important;background-image:none!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
  overflow:visible!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-center-card {margin-bottom:4px!important;padding:0!important}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-stage.sg-match-stage-compact {
  min-height:152px!important;padding:6px 8px 13px!important;
}
/* Intermediate logo size: less imposing than v1.70's 118px, fuller than
   the original 62px, proportioned like the attached WinScore example. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-stage-compact .sg-match-team-logo {
  width:clamp(70px,6.1vw,86px)!important;
  height:clamp(70px,6.1vw,86px)!important;
  padding:0!important;margin:0 auto!important;background:transparent!important;
  border:0!important;border-radius:0!important;box-shadow:none!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-stage-compact .sg-match-team-logo img {
  width:100%!important;height:100%!important;max-width:86px!important;
  max-height:86px!important;object-fit:contain!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-primary-tabs.sg-match-tabs-modern {
  background:transparent!important;border:0!important;
  border-bottom:1px solid var(--sgw-hairline)!important;
  border-radius:0!important;box-shadow:none!important;
  margin:0!important;padding:5px 0!important;
}
/* Don't turn selected tabs into a second box. The active cyan underline stays. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-primary-tabs.sg-match-tabs-modern > a {
  box-shadow:none!important;border:0!important;border-radius:0!important;
  background:transparent!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-tab-panel {
  border:0!important;border-radius:0!important;padding-top:13px!important;
}
/* Intro and dossier: remove doubled borders below the navigation and
   between a heading that already has a clear vertical breathing space. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sgd-intro {
  padding:12px 0 16px!important;border:0!important;background:transparent!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sgd-dossier > .sgd-section {
  padding:21px 0 23px!important;border:0!important;background:transparent!important;
}
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sgd-dossier > .sgd-section + .sgd-section {
  border-top:1px solid var(--sgw-hairline)!important;
}

/* Premium exceptions remain visibly raised under both themes. The obscuring
   logic, authorized content and free-market selection are not altered. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg110-verdict-card,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main #sg110-premium-analysis.sg-ai-premium-panel {
  background:var(--sgw-raised)!important;border:1px solid var(--sgw-hairline)!important;
  border-radius:13px!important;box-shadow:0 10px 30px rgba(15,23,42,.08)!important;
  overflow:hidden!important;
}
/* Rail cards are deliberate surfaces: do not flatten or recolor them. */
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-sidebar .sgw-raised,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sgw-right-rail .sgw-raised,
html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-sidebar .sg-sidebar-featured {
  background:var(--sgw-raised)!important;border:1px solid var(--sgw-hairline)!important;
  border-radius:13px!important;box-shadow:0 10px 28px rgba(16,24,40,.075)!important;
}

/* Preserve normal gutters where fixtures and tabular data meet the edge
   on narrow phones, without reintroducing an independent surface. */
@media(max-width:760px) {
 html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-stage.sg-match-stage-compact {min-height:135px!important;padding:5px 9px 11px!important}
 html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-stage-compact .sg-match-team-logo {width:clamp(52px,15vw,66px)!important;height:clamp(52px,15vw,66px)!important}
 html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-modern-v2225 .sg-match-stage-compact .sg-match-team-logo img {max-width:66px!important;max-height:66px!important}
 html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-match-tab-panel > .sg-card:not(.sg-ai-premium-panel):not(.sg110-verdict-card),
 html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sg-feed > .sg-card:not(.sg-league-card):not(.sg-home-league-card):not(.sg-match-center-card):not(.sg-ai-premium-panel) {padding-inline:12px!important}
 html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sgd-intro,
 html[data-sg-theme] body.sg-body.sgw-editorial-mode .sg-main .sgd-dossier > .sgd-section {padding-inline:12px!important}
}
