/* =========================================================
   UniSST V243 — CARDS ACADÊMICOS COMPACTOS ANTES E DEPOIS DO LOGIN
   Regra final: mesma geometria responsiva em público e autenticado.
   Mantém recursos; altera somente geometria/escala dos cards e previews.
   ========================================================= */
:root{--v243-preview-ratio:1.7777778;--v243-glance-ratio:1.5579710145;--v243-hover-scale:1.025}

html body.course-cards-compact-v243.streaming-system-v220{
  --v243-card-w:276px;--v243-card-h:155.25px;
  --v243-poster-w:276px;--v243-poster-h:414px;
  --v243-gap:24px;--v243-super-w:736px;--v243-glance-w:430px;
}
@media (min-width:1400px) and (max-width:1759px){html body.course-cards-compact-v243.streaming-system-v220{--v243-card-w:clamp(250px,17vw,276px);--v243-card-h:calc(var(--v243-card-w) * .5625);--v243-poster-w:var(--v243-card-w);--v243-poster-h:calc(var(--v243-poster-w) * 1.5);--v243-gap:20px;--v243-super-w:calc(var(--v243-poster-h) * var(--v243-preview-ratio));--v243-glance-w:calc(var(--v243-card-w) * var(--v243-glance-ratio))}}
@media (min-width:1100px) and (max-width:1399px){html body.course-cards-compact-v243.streaming-system-v220{--v243-card-w:clamp(246px,22vw,264px);--v243-card-h:calc(var(--v243-card-w) * .5625);--v243-poster-w:var(--v243-card-w);--v243-poster-h:calc(var(--v243-poster-w) * 1.5);--v243-gap:16px;--v243-super-w:calc(var(--v243-poster-h) * var(--v243-preview-ratio));--v243-glance-w:calc(var(--v243-card-w) * var(--v243-glance-ratio))}}
@media (min-width:681px) and (max-width:1099px){html body.course-cards-compact-v243.streaming-system-v220{--v243-card-w:clamp(220px,29vw,252px);--v243-card-h:calc(var(--v243-card-w) * .5625);--v243-poster-w:var(--v243-card-w);--v243-poster-h:calc(var(--v243-poster-w) * 1.5);--v243-gap:14px;--v243-super-w:calc(var(--v243-poster-h) * var(--v243-preview-ratio));--v243-glance-w:calc(var(--v243-card-w) * var(--v243-glance-ratio))}}
@media (max-width:680px){html body.course-cards-compact-v243.streaming-system-v220{--v243-card-w:76vw;--v243-card-h:42.75vw;--v243-poster-w:42vw;--v243-poster-h:63vw;--v243-gap:10px;--v243-super-w:var(--v243-poster-w);--v243-glance-w:min(430px,calc(100vw - 28px))}}

/* Uma fonte de geometria para todos os aliases históricos. */
html body.course-cards-compact-v243.streaming-system-v220{
  --pv-rail-gap:var(--v243-gap)!important;--pv-card-w:var(--v243-card-w)!important;--pv-card-h:var(--v243-card-h)!important;--pv-poster-w:var(--v243-poster-w)!important;--pv-poster-h:var(--v243-poster-h)!important;--pv-super-focus-w:var(--v243-super-w)!important;
  --u112-card-w:var(--v243-card-w)!important;--u112-card-h:var(--v243-card-h)!important;--u112-poster-w:var(--v243-poster-w)!important;--u112-poster-h:var(--v243-poster-h)!important;
  --v215-pv205-card-w:var(--v243-card-w)!important;--v220-gap:var(--v243-gap)!important;
  --v221-poster-w:var(--v243-poster-w)!important;--v221-poster-h:var(--v243-poster-h)!important;--v221-card-gap:var(--v243-gap)!important;
  --uv237-card-w:var(--v243-card-w)!important;--uv237-card-h:var(--v243-card-h)!important;--uv237-poster-w:var(--v243-poster-w)!important;--uv237-poster-h:var(--v243-poster-h)!important;--uv238-card-w:var(--v243-card-w)!important;--uv238-card-h:var(--v243-card-h)!important;
  --v239-card-w:var(--v243-card-w)!important;--v239-card-h:var(--v243-card-h)!important;--v239-poster-w:var(--v243-poster-w)!important;--v239-poster-h:var(--v243-poster-h)!important;
  --v225-focus-h:var(--v243-poster-h)!important;--v225-focus-w:var(--v243-super-w)!important;--v240-focus-h:var(--v243-poster-h)!important;--v240-focus-w:var(--v243-super-w)!important;
  --v241-card-w:var(--v243-card-w)!important;--v241-card-h:var(--v243-card-h)!important;--v241-poster-w:var(--v243-poster-w)!important;--v241-poster-h:var(--v243-poster-h)!important;--v241-super-w:var(--v243-super-w)!important;--v241-gap:var(--v243-gap)!important;
}

/* Containers antigos também recebem os aliases finais, impedindo reescrita local. */
html body.course-cards-compact-v243.streaming-system-v220 :is(.v078-reference-home,.pv-public-showcase,[data-v239-home-card-contract],.v217-streaming-rails,.prime-experience-v205){
  --pv-card-w:var(--v243-card-w)!important;--pv-card-h:var(--v243-card-h)!important;--pv-poster-w:var(--v243-poster-w)!important;--pv-poster-h:var(--v243-poster-h)!important;--pv-super-focus-w:var(--v243-super-w)!important;
  --u112-card-w:var(--v243-card-w)!important;--u112-card-h:var(--v243-card-h)!important;--u112-poster-w:var(--v243-poster-w)!important;--u112-poster-h:var(--v243-poster-h)!important;
  --v215-pv205-card-w:var(--v243-card-w)!important;--v241-card-w:var(--v243-card-w)!important;--v241-card-h:var(--v243-card-h)!important;--v241-poster-w:var(--v243-poster-w)!important;--v241-poster-h:var(--v243-poster-h)!important;--v241-super-w:var(--v243-super-w)!important;
}

html body.course-cards-compact-v243.streaming-system-v220 :is(.course-rail,.public-course-rail,.v217-course-rail,.pv-public-course-rail,.pv205-card-rail,.pv203-card-rail,.learning-course-rail,.related-courses){gap:var(--v243-gap)!important;column-gap:var(--v243-gap)!important;align-items:flex-start!important}

/* Horizontal 16:9 — trilhos e cards legados/modernos. */
html body.course-cards-compact-v243.streaming-system-v220 a[data-course-preview="1"].v220-reference-card.v220-landscape-card:not(.v220-grid-card),
html body.course-cards-compact-v243.streaming-system-v220 .v078-reference-home a.reference-landscape-card,
html body.course-cards-compact-v243.streaming-system-v220 .v078-reference-home .reference-standard-rail a.course-card,
html body.course-cards-compact-v243.streaming-system-v220 .pv-public-landscape-rail .pv-public-course-card,
html body.course-cards-compact-v243.streaming-system-v220.prime-experience-v205 :is(.pv205-card-rail,.pv203-card-rail)>a[data-course-preview="1"],
html body.course-cards-compact-v243.streaming-system-v220.prime-experience-v205 :is(.pv205-card-rail>a.pv205-title-card,.pv203-card-rail>a.pv203-title-card){
  flex:0 0 var(--v243-card-w)!important;flex-basis:var(--v243-card-w)!important;width:var(--v243-card-w)!important;min-width:var(--v243-card-w)!important;max-width:var(--v243-card-w)!important;height:var(--v243-card-h)!important;min-height:var(--v243-card-h)!important;max-height:var(--v243-card-h)!important;aspect-ratio:16/9!important;box-sizing:border-box!important
}

/* Vertical 2:3. */
html body.course-cards-compact-v243.streaming-system-v220 a[data-course-preview="1"].v220-reference-card.v220-poster-card:not(.v220-grid-card),
html body.course-cards-compact-v243.streaming-system-v220 .v078-reference-home .reference-poster-rail>a,
html body.course-cards-compact-v243.streaming-system-v220 .v078-reference-home a.prime-poster-card,
html body.course-cards-compact-v243.streaming-system-v220 .v078-reference-home a.featured-preview-card,
html body.course-cards-compact-v243.streaming-system-v220 .pv-public-poster-rail .pv-public-course-card{
  flex:0 0 var(--v243-poster-w)!important;flex-basis:var(--v243-poster-w)!important;width:var(--v243-poster-w)!important;min-width:var(--v243-poster-w)!important;max-width:var(--v243-poster-w)!important;height:var(--v243-poster-h)!important;min-height:var(--v243-poster-h)!important;max-height:var(--v243-poster-h)!important;aspect-ratio:2/3!important;box-sizing:border-box!important
}

/* Mídia V203/V205 continua preenchendo o mesmo card. */
html body.course-cards-compact-v243.streaming-system-v220.prime-experience-v205 :is(.pv205-card-rail,.pv203-card-rail)>a[data-course-preview="1"] :is(.pv205-card-media,.pv203-title-card-media){position:absolute!important;inset:0!important;width:100%!important;height:100%!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;border-radius:inherit!important;overflow:hidden!important}

/* Grades e playlists deixam de esticar para 4 colunas; entram mais cards. */
html body.course-cards-compact-v243.streaming-system-v220 :is(.catalog-grid,.prime-catalog-grid,.catalog-20-grid,.catalog-24-grid,.library-page .catalog-grid,.course-playlist-grid){display:grid!important;grid-template-columns:repeat(auto-fill,var(--v243-card-w))!important;gap:var(--v243-gap)!important;justify-content:start!important;align-items:start!important}
html body.course-cards-compact-v243.streaming-system-v220 a.v220-reference-card.v220-grid-card.v220-landscape-card{width:var(--v243-card-w)!important;min-width:var(--v243-card-w)!important;max-width:var(--v243-card-w)!important;height:var(--v243-card-h)!important;min-height:var(--v243-card-h)!important;max-height:var(--v243-card-h)!important;aspect-ratio:16/9!important}
html body.course-cards-compact-v243.streaming-system-v220 a.v220-reference-card.v220-grid-card.v220-poster-card{width:var(--v243-poster-w)!important;min-width:var(--v243-poster-w)!important;max-width:var(--v243-poster-w)!important;height:var(--v243-poster-h)!important;min-height:var(--v243-poster-h)!important;max-height:var(--v243-poster-h)!important;aspect-ratio:2/3!important}

/* Altura de fileira/setas acompanha o card normal compacto. */
html body.course-cards-compact-v243.streaming-system-v220 .v217-landscape-section{min-height:calc(var(--v243-card-h) + 62px)!important}
html body.course-cards-compact-v243.streaming-system-v220 .v217-poster-section{min-height:calc(var(--v243-poster-h) + 62px)!important}
html body.course-cards-compact-v243.streaming-system-v220 .rail-shell>.rail-arrow{height:var(--v243-card-h)!important;min-height:var(--v243-card-h)!important;max-height:var(--v243-card-h)!important}
html body.course-cards-compact-v243.streaming-system-v220 :is(.v217-poster-section .rail-shell>.rail-arrow,.rail-shell:has([data-v220-rail-orientation="poster"])>.rail-arrow,.rail-shell:has(.reference-poster-rail)>.rail-arrow){height:var(--v243-poster-h)!important;min-height:var(--v243-poster-h)!important;max-height:var(--v243-poster-h)!important}

@media (min-width:681px) and (hover:hover) and (pointer:fine){
  html body.course-cards-compact-v243.streaming-system-v220 a[data-course-preview="1"].v220-reference-card.v220-landscape-card:is(:hover,:focus-visible,.preview-pending,.preview-active),
  html body.course-cards-compact-v243.streaming-system-v220 .v078-reference-home a.reference-landscape-card:is(:hover,:focus-visible),
  html body.course-cards-compact-v243.streaming-system-v220 .pv-public-landscape-rail .pv-public-course-card:is(:hover,:focus-visible){transform:scale(var(--v243-hover-scale))!important;z-index:70!important;filter:brightness(1.04)!important;box-shadow:0 12px 26px rgba(0,0,0,.48)!important}
  html body.course-cards-compact-v243.streaming-system-v220 a[data-course-preview="1"].v220-reference-card.v220-poster-card:is(:hover,:focus-visible,.preview-pending){transform:none!important}
  html body.course-cards-compact-v243.streaming-system-v220:is(.prime-v086,.prime-public-v086) a[data-course-preview="1"].v220-reference-card.v220-poster-card.prime-poster-card.pv-super-focus-active{flex:0 0 var(--v243-super-w)!important;flex-basis:var(--v243-super-w)!important;width:var(--v243-super-w)!important;min-width:var(--v243-super-w)!important;max-width:var(--v243-super-w)!important;height:var(--v243-poster-h)!important;min-height:var(--v243-poster-h)!important;max-height:var(--v243-poster-h)!important;aspect-ratio:16/9!important;margin:0!important;transform:none!important;transform-origin:left center!important;z-index:75!important;box-shadow:0 12px 26px rgba(0,0,0,.48)!important}
  html body.course-cards-compact-v243 .course-hover-preview.pv-glance{width:min(var(--v243-glance-w),calc(100vw - 28px))!important;max-width:var(--v243-glance-w)!important}
}

@media (max-width:680px),(hover:none),(pointer:coarse){
  html body.course-cards-compact-v243.streaming-system-v220 a[data-course-preview="1"].v220-reference-card{transform:none!important;box-shadow:none!important}
  html body.course-cards-compact-v243.streaming-system-v220 a[data-course-preview="1"].v220-poster-card.prime-poster-card.pv-super-focus-active{flex:0 0 var(--v243-poster-w)!important;width:var(--v243-poster-w)!important;min-width:var(--v243-poster-w)!important;max-width:var(--v243-poster-w)!important;height:var(--v243-poster-h)!important;min-height:var(--v243-poster-h)!important;max-height:var(--v243-poster-h)!important;aspect-ratio:2/3!important}
  html body.course-cards-compact-v243 .course-hover-preview,html body.course-cards-compact-v243 .pv-super-focus-pane{display:none!important}
  html body.course-cards-compact-v243.streaming-system-v220 .rail-shell>.rail-arrow{display:none!important}
}
