:root{--portal-green:#0a5d57;--portal-ink:#142522;--portal-line:#d7e4e1}
html{width:100%;max-width:100%;overflow-x:hidden}
body{width:100%;max-width:100%;padding-top:44px;overflow-x:hidden}
.portal-masterbar{position:fixed;inset:0 0 auto 0;z-index:9998;height:44px;background:rgba(255,255,255,.97);border-bottom:1px solid var(--portal-line);box-shadow:0 5px 18px rgba(10,61,57,.08);font-family:Lato,Arial,sans-serif}
.portal-masterbar__inner{width:min(1180px,calc(100% - 28px));height:100%;margin:auto;display:flex;align-items:center;gap:20px}
.portal-masterbar__brand{color:var(--portal-green);font-weight:900;text-decoration:none;white-space:nowrap}
.portal-masterbar__path{color:#687773;font-size:12px;white-space:nowrap}
.portal-masterbar__nav{display:flex;align-items:center;gap:18px;margin-left:auto}
.portal-masterbar__nav a{color:var(--portal-ink);font-size:13px;font-weight:700;text-decoration:none}
.portal-masterbar__nav a:hover{color:var(--portal-green)}
.portal-to-top{position:fixed;right:18px;bottom:18px;z-index:9999;width:52px;height:52px;padding:0;border:0;border-radius:50%;display:grid;place-items:center;background:#3f86f5;color:#fff;box-shadow:0 10px 30px rgba(35,104,210,.24);cursor:pointer;font:900 25px/1 Lato,Arial,sans-serif;transition:transform .16s ease,background .16s ease,box-shadow .16s ease}
.portal-to-top:hover{transform:translateY(-2px);background:#286fdc;box-shadow:0 12px 32px rgba(35,104,210,.3)}
.portal-to-top:focus-visible{outline:3px solid rgba(63,134,245,.34);outline-offset:4px}
.portal-ai{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:transparent;padding:22px;transition:.35s}
.portal-ai.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
.portal-ai__box{width:min(620px,100%);max-height:min(86vh,680px);overflow:auto;background:#eaf8fc;border:1px solid #b8dfee;border-radius:22px;padding:28px;box-shadow:0 30px 90px rgba(6,75,134,.18);font-family:Lato,Arial,sans-serif;color:#064b86}
.portal-ai__box h2{margin:0 0 12px;color:#064b86;font-size:23px;line-height:1.2}.portal-ai__box p{margin:0 0 18px;color:#064b86;line-height:1.58;text-align:justify;text-justify:inter-word}.portal-ai__box button{border:1px solid #b8dfee;background:#fff;color:#064b86;border-radius:999px;padding:10px 17px;font-weight:900;cursor:pointer}
@media(max-width:760px){body{padding-top:42px}.portal-masterbar{height:42px}.portal-masterbar__path,.portal-masterbar__nav{display:none}.portal-masterbar__inner{justify-content:center}.portal-to-top{right:12px;bottom:max(12px,env(safe-area-inset-bottom));width:48px;height:48px;font-size:23px}.portal-ai{padding:max(16px,env(safe-area-inset-top)) 16px max(16px,env(safe-area-inset-bottom))}.portal-ai__box{width:100%;max-height:calc(100dvh - 32px);border-radius:18px;padding:22px 20px}.portal-ai__box h2{font-size:21px}.portal-ai__box p{font-size:15px;line-height:1.5;text-align:left}}

/* Uniformidad editorial de las páginas de autoridad. */
body[data-portal-type="authority"] .authority-content,
body[data-portal-type="authority"] .section > .container,
body[data-portal-type="authority"] .section > .narrow{
  width:min(1140px,calc(100% - 48px));
  margin-left:auto;
  margin-right:auto;
}
body[data-portal-type="authority"] .gal-hero-lead,
body[data-portal-type="authority"] .hero-lead,
body[data-portal-type="authority"] .lead,
body[data-portal-type="authority"] .part-lead,
body[data-portal-type="authority"] .contact-intro,
body[data-portal-type="authority"] article p,
body[data-portal-type="authority"] .edu-body p,
body[data-portal-type="authority"] .testi-body p{
  text-align:justify;
  text-justify:inter-word;
}
@media(max-width:760px){
  body[data-portal-type="authority"] .authority-content,
  body[data-portal-type="authority"] .section > .container,
  body[data-portal-type="authority"] .section > .narrow{width:min(100% - 28px,1140px)}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.portal-ai,.portal-to-top{transition:none}}

/* Uniformidad editorial de la Ventana pública. */
body[data-portal-type="public_window"]{font-family:Lato,Arial,sans-serif;font-size:16px}
body[data-portal-type="public_window"] .container,
body[data-portal-type="public_window"] .wrap,
body[data-portal-type="public_window"] .site-head .wrap{
  width:min(1140px,calc(100% - 72px));
  margin-left:auto;
  margin-right:auto;
}
body[data-portal-type="public_window"] .hero-lead,
body[data-portal-type="public_window"] .section-lead,
body[data-portal-type="public_window"] .desc,
body[data-portal-type="public_window"] .current-event p,
body[data-portal-type="public_window"] .free-card p,
body[data-portal-type="public_window"] .institutional p,
body[data-portal-type="public_window"] .closing{
  text-align:justify;
  text-justify:inter-word;
}
@media(max-width:700px){
  body[data-portal-type="public_window"] .container,
  body[data-portal-type="public_window"] .wrap,
  body[data-portal-type="public_window"] .site-head .wrap{width:calc(100% - 34px)}
}

/* Eje maestro para todas las herramientas de diagnóstico */
body[data-portal-type="diagnostic"] .site-head .wrap,
body[data-portal-type="diagnostic"] .site-head .head-wrap,
body[data-portal-type="diagnostic"] .hero>.container{
  width:min(calc(100% - var(--bc-page-gutter,72px)),var(--max,1140px))!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body[data-portal-type="diagnostic"] .site-head .wrap,
body[data-portal-type="diagnostic"] .site-head .head-wrap{
  min-height:82px!important;
  padding:10px 0!important;
}

/* Encabezado institucional único para todas las landing del portal */
body .site-head .wrap,
body .site-head .head-wrap,
body .head .wrap{
  width:min(calc(100% - 72px),1140px)!important;
  min-height:82px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding:10px 0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:24px!important;
}
body .site-head .brand,
body .head .brand{
  width:300px!important;
  max-width:300px!important;
  flex:0 1 300px!important;
}
body .site-head .brand img,
body .head .brand img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:72px!important;
  object-fit:contain!important;
}
body .site-head .home-btn,
body .head .home{
  min-width:130px!important;
  min-height:58px!important;
  padding:8px 18px!important;
}
@media(max-width:900px){
  body .site-head .wrap,
  body .site-head .head-wrap,
  body .head .wrap{width:min(calc(100% - 48px),1140px)!important}
}
@media(max-width:700px){
  body .site-head .wrap,
  body .site-head .head-wrap,
  body .head .wrap{width:calc(100% - 32px)!important;min-height:68px!important;padding:8px 0!important;gap:12px!important}
  body .site-head .brand,
  body .head .brand{width:205px!important;max-width:205px!important;flex-basis:205px!important}
  body .site-head .brand img,
  body .head .brand img{max-height:50px!important}
  body .site-head .home-btn,
  body .head .home{min-width:96px!important;min-height:48px!important;padding:7px 11px!important}
}
@media(max-width:420px){
  body .site-head .brand,
  body .head .brand{width:min(55vw,185px)!important;max-width:185px!important;flex-basis:185px!important}
  body .site-head .home-btn,
  body .head .home{min-width:86px!important;padding:7px 9px!important}
}
body[data-portal-type="diagnostic"] .hero,
body[data-portal-type="diagnostic"] .hero>.container{
  min-height:520px!important;
}
body[data-portal-type="diagnostic"] .hero>.container{
  align-items:flex-start!important;
  justify-content:flex-start!important;
  padding-top:48px!important;
  padding-bottom:48px!important;
  text-align:left!important;
}
@media(max-width:700px){
  body[data-portal-type="diagnostic"] .site-head .wrap,
  body[data-portal-type="diagnostic"] .site-head .head-wrap{min-height:68px!important;padding:8px 0!important}
  body[data-portal-type="diagnostic"] .hero,
  body[data-portal-type="diagnostic"] .hero>.container{min-height:600px!important}
  body[data-portal-type="diagnostic"] .hero>.container{width:calc(100% - 34px)!important;padding-top:36px!important;padding-bottom:36px!important}
}

/* Rector transversal: geometría, tipografía, rotación y pie institucional */
body[data-portal-type]{
  --bc-max:1140px;
  --bc-gutter:72px;
  max-width:100%;
  overflow-x:hidden;
  font-family:Lato,Arial,sans-serif!important;
  font-size:16px!important;
  line-height:1.62;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body[data-portal-type] .site-head,
body[data-portal-type] .head{
  position:sticky!important;
  top:44px!important;
  z-index:100!important;
  min-height:82px!important;
  border-bottom:1px solid #dce8ef!important;
  background:#fff!important;
}
body[data-portal-type] .site-head .head-logo,
body[data-portal-type] .site-head .brand,
body[data-portal-type] .head .brand,
body[data-portal-type] .site-head .wrap>img{
  display:block!important;
  width:300px!important;
  max-width:300px!important;
  flex:0 1 300px!important;
  margin:0!important;
}
body[data-portal-type] .site-head .head-logo img,
body[data-portal-type] .site-head .brand img,
body[data-portal-type] .head .brand img,
body[data-portal-type] .site-head .wrap>img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:72px!important;
  object-fit:contain!important;
  object-position:left center!important;
}
body[data-portal-type] .site-head .home-btn,
body[data-portal-type] .head .home{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:130px!important;
  min-height:58px!important;
  padding:8px 18px!important;
  border:1px solid #9dcfea!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,#fff,#eef8fd)!important;
  color:#064b86!important;
  line-height:1.08!important;
}
body[data-portal-type] main h1{font-family:Lato,Arial,sans-serif!important;font-size:clamp(40px,5vw,58px);line-height:1.06;font-weight:700;text-wrap:balance}
body[data-portal-type] main h2{font-family:Lato,Arial,sans-serif!important;line-height:1.15;text-wrap:balance}
body[data-portal-type] main h3{font-family:Lato,Arial,sans-serif!important;line-height:1.25;text-wrap:balance}
body[data-portal-type] main p,
body[data-portal-type] main li{
  font-family:Lato,Arial,sans-serif!important;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
  -webkit-hyphens:auto;
}
body[data-portal-type] img,
body[data-portal-type] svg,
body[data-portal-type] video,
body[data-portal-type] iframe{max-width:100%}
body[data-portal-type] .container,
body[data-portal-type] main .wrap,
body[data-portal-type] footer .wrap,
body[data-portal-type] footer .container{
  width:min(calc(100% - var(--bc-gutter)),var(--bc-max))!important;
  max-width:var(--bc-max)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}
body[data-portal-type] .footer{
  width:100%!important;
  padding:30px 0 20px!important;
  border-top:1px solid #dce8ef!important;
  background:#fff!important;
  color:#26333e!important;
  font-family:Lato,Arial,sans-serif!important;
}
body[data-portal-type] .footer *{font-family:Lato,Arial,sans-serif!important}
body[data-portal-type] .footer-logo{
  display:block!important;
  width:300px!important;
  max-width:100%!important;
  height:auto!important;
  margin:0 auto 18px!important;
  object-fit:contain!important;
}
body[data-portal-type] .footer .locations{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  width:100%!important;
  max-width:1020px!important;
  margin:0 auto 16px!important;
}
body[data-portal-type] .footer .location,
body[data-portal-type] .footer .location-card{
  position:relative!important;
  min-height:112px!important;
  padding:15px 16px 15px 46px!important;
  border:1px solid #cce6f4!important;
  border-radius:8px!important;
  background:linear-gradient(135deg,#fbfdff,#f2faff)!important;
  color:#5e7184!important;
}
body[data-portal-type] .footer .location p,
body[data-portal-type] .footer .location-card p{margin:0!important;color:#5e7184!important;font-size:12px!important;line-height:1.45!important;text-align:justify!important}
body[data-portal-type] .footer .copyright{margin:16px 0 0!important;color:#758391!important;font-size:11px!important;text-align:center!important}
@media(max-width:900px){
  body[data-portal-type]{--bc-gutter:48px}
  body[data-portal-type] .footer .locations{grid-template-columns:1fr!important}
}
@media(min-width:701px) and (max-width:1100px){
  body[data-portal-type="program"] .hero{min-height:550px!important;padding-top:62px!important;padding-bottom:56px!important}
}
@media(max-width:700px){
  body[data-portal-type]{--bc-gutter:32px}
  body[data-portal-type] .site-head,
  body[data-portal-type] .head{top:42px!important;min-height:68px!important}
  body[data-portal-type] .site-head .head-logo,
  body[data-portal-type] .site-head .brand,
  body[data-portal-type] .head .brand,
  body[data-portal-type] .site-head .wrap>img{width:205px!important;max-width:205px!important;flex-basis:205px!important}
  body[data-portal-type] .site-head .head-logo img,
  body[data-portal-type] .site-head .brand img,
  body[data-portal-type] .head .brand img,
  body[data-portal-type] .site-head .wrap>img{max-height:50px!important}
  body[data-portal-type] main h1{font-size:clamp(34px,10vw,42px)}
  body[data-portal-type] .footer-logo{width:205px!important}
}
@media(max-width:420px){
  body[data-portal-type] .site-head .head-logo,
  body[data-portal-type] .site-head .brand,
  body[data-portal-type] .head .brand,
  body[data-portal-type] .site-head .wrap>img{width:min(55vw,185px)!important;max-width:185px!important;flex-basis:185px!important}
}
@media(orientation:landscape) and (max-height:560px) and (min-width:600px){
  body[data-portal-type] .site-head,
  body[data-portal-type] .head{position:relative!important;top:auto!important}
  body[data-portal-type="diagnostic"] .hero,
  body[data-portal-type="diagnostic"] .hero>.container{min-height:460px!important}
  body[data-portal-type="diagnostic"] .hero>.container{padding-top:28px!important;padding-bottom:28px!important}
}
@supports(padding:max(0px)){
  body[data-portal-type] .site-head,
  body[data-portal-type] .head,
  body[data-portal-type] .footer{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
  body[data-portal-type] .footer{padding-bottom:max(20px,env(safe-area-inset-bottom))!important}
}

/* Continuidad cromática rectora entre la portada y las 14 landings */
body[data-portal-type]{
  --blue:#064b86;
  --blue2:#006fba;
  --blue-2:#006fba;
  --cyan:#08a9ec;
  --sky:#08a9ec;
  --sky2:#d9f2fc;
  --skysoft:#f1faff;
  --sky-soft:#f1faff;
  --soft:#f7fbfd;
  --text:#29445a;
  --ink:#29445a;
  --line:#d7e8f1;
  --line2:#c7dfec;
  --line-soft:#d7e8f1;
  background:#fff!important;
  color:var(--text)!important;
}
body[data-portal-type] main{background:#fff}
body[data-portal-type] .site-head,
body[data-portal-type] .head,
body[data-portal-type] .footer{background:#fff!important}
body[data-portal-type] main h1,
body[data-portal-type] main h2,
body[data-portal-type] main h3{color:var(--blue)}
body[data-portal-type] a{accent-color:var(--cyan)}
